File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -55,23 +55,26 @@ module.exports = class OriginRequestInterface {
5555 this . headers [ key ] = val ;
5656 } ,
5757 end : body => {
58- if ( body && body . length >= 255000 ) {
59- console . log ( "bailing out because size is over 256kb" ) ;
60- return next ( ) ;
61- }
62-
6358 const res = {
6459 status : this . status ,
6560 statusDescription : "OK" ,
6661 headers : this . headers ,
6762 body : body
6863 } ;
6964
70- if ( this . originalHeaders [ "content-encoding" ] && this . originalHeaders [ "content-encoding" ] . match ( / g z i p / ) ) {
65+ if (
66+ this . originalHeaders [ "content-encoding" ] &&
67+ this . originalHeaders [ "content-encoding" ] . match ( / g z i p / )
68+ ) {
7169 res . body = res . body . toString ( "base64" ) ;
7270 res . bodyEncoding = "base64" ;
7371 }
7472
73+ if ( body && body . length >= 255000 ) {
74+ console . log ( "bailing out because size is over 256kb" ) ;
75+ return next ( ) ;
76+ }
77+
7578 return this . callback ( null , res ) ;
7679 } ,
7780 writeHead : ( _status , _headers ) => {
You can’t perform that action at this time.
0 commit comments