@@ -191,13 +191,13 @@ const httpController = {
191191 reqResObj . connectionType = 'plain' ;
192192 }
193193
194- // FIXME: There is something wrong with the logic below.
195- // First, it is checking if the headers have a 'content-length'
196- // or 'Content-Length' property. If it does not, it sets the
197- // responseSize to null. It it does, it checks if the headers have
198- // a 'content-length' property. If it does, it sets the contentLength
199- // to 'content-length' or 'Content-Length'. This does not make sense.
200- // I think it should be setting contentLength to headers['content-length']
194+ // FIXME: There is something wrong with the logic below.
195+ // First, it is checking if the headers have a 'content-length'
196+ // or 'Content-Length' property. If it does not, it sets the
197+ // responseSize to null. It it does, it checks if the headers have
198+ // a 'content-length' property. If it does, it sets the contentLength
199+ // to 'content-length' or 'Content-Length'. This does not make sense.
200+ // I think it should be setting contentLength to headers['content-length']
201201 // or headers['Content-Length'].
202202
203203 // check if response comes with 'content-length' header
@@ -209,14 +209,14 @@ const httpController = {
209209 ? ( contentLength = 'content-length' )
210210 : ( contentLength = 'Content-Length' ) ;
211211
212- // FIXME: A previous group used a conversion figure of 1023.89427 to
213- // convert octets to bytes. This is incorrect because both an octet
214- // and byte are exactly 8 bits in modern computing. There could, however,
215- // be some ambiguity because "bytes" may have a different meaning in legacy
216- // systems. Check out this link for more info: https://en.wikipedia.org/wiki/Octet_(computing).
217- // If the desired responseSize is in bytes, it is enough to simply assign the value
212+ // FIXME: A previous group used a conversion figure of 1023.89427 to
213+ // convert octets to bytes. This is incorrect because both an octet
214+ // and byte are exactly 8 bits in modern computing. There could, however,
215+ // be some ambiguity because "bytes" may have a different meaning in legacy
216+ // systems. Check out this link for more info: https://en.wikipedia.org/wiki/Octet_(computing).
217+ // If the desired responseSize is in bytes, it is enough to simply assign the value
218218 // of the content-length header.
219-
219+
220220 // Converting content length octets into bytes
221221 const conversionFigure = 1023.89427 ;
222222 const octetToByteConversion =
@@ -295,7 +295,7 @@ const httpController = {
295295 const { method, headers, body } = args . options ;
296296 const response = await fetch ( headers . url , { method, headers, body } ) ;
297297 const headersResponse = response . headers . raw ( ) ;
298-
298+ event . sender . send ( 'console' , 'WHATS UP' ) ;
299299 if ( headersResponse [ 'content-type' ] [ 0 ] . includes ( 'stream' ) ) {
300300 return {
301301 headers : headersResponse ,
@@ -334,7 +334,6 @@ const httpController = {
334334 reqResObj . timeSent = Date . now ( ) ;
335335
336336 const options = this . parseFetchOptionsFromReqRes ( reqResObj ) ;
337-
338337 //-----------------------------------------
339338 // Check if the URL provided is a stream
340339 //-----------------------------------------
@@ -404,9 +403,10 @@ const httpController = {
404403 cookies . forEach ( ( cookie ) => {
405404 const cookieString = `${ cookie . key } =${ cookie . value } ` ;
406405 // attach to formattedHeaders so options object includes this
407- formattedHeaders . cookie = cookieString ;
406+ formattedHeaders . cookie = formattedHeaders . cookie + ';' + cookieString ;
408407 } ) ;
409408 }
409+ console . log ( formattedHeaders ) ;
410410
411411 const outputObj = {
412412 method,
0 commit comments