@@ -292,12 +292,18 @@ var self = module.exports = {
292292 * @returns {Boolean }
293293 */
294294 shouldAddHttpMethod : function ( request , options ) {
295- const followRedirect = _ . get ( request , 'protocolProfileBehavior.followRedirects' , options . followRedirect ) ,
296- followOriginalHttpMethod =
297- _ . get ( request , 'protocolProfileBehavior.followOriginalHttpMethod' , options . followOriginalHttpMethod ) ,
298- disableBodyPruning = _ . get ( request , 'protocolProfileBehavior.disableBodyPruning' , true ) ,
295+ let followRedirect = options . followRedirect ,
296+ followOriginalHttpMethod = options . followOriginalHttpMethod ,
297+ disableBodyPruning = true ,
299298 isBodyEmpty = self . isBodyEmpty ( request . body ) ;
300299
300+ if ( _ . has ( request , 'protocolProfileBehavior' ) && request . protocolProfileBehavior !== null ) {
301+ followRedirect = _ . get ( request , 'protocolProfileBehavior.followRedirects' , followRedirect ) ;
302+ followOriginalHttpMethod =
303+ _ . get ( request , 'protocolProfileBehavior.followOriginalHttpMethod' , followOriginalHttpMethod ) ;
304+ disableBodyPruning = _ . get ( request , 'protocolProfileBehavior.disableBodyPruning' , true ) ;
305+ }
306+
301307 if ( followRedirect && followOriginalHttpMethod ) {
302308 return true ;
303309 }
0 commit comments