Automattic / knox

S3 Lib
MIT License
1.74k stars 284 forks source link

Error: HPE_CB_headers_complete #285

Open GeoffreyPlitt opened 9 years ago

GeoffreyPlitt commented 9 years ago

I'm initilializing knox with the same key/secret/bucket that works with another library.

Then I get an object (5 bytes, text/plain) that I know exists in S3:

  knox_client.getFile(key, function(err, kres){
    if(err) return next(error(500, new Error(err)))
   // ...
  });

And I get an error. Don't know what to do next, but I have a vague suspicion this might be something about HTTPS cert incorrect or something?

{ [Error: Parse Error] bytesParsed: 0, code: 'HPE_CB_headers_complete' }
Error: Error: Parse Error
    at ClientRequest.<anonymous> (/vagrant/MY_CODE.js:1:1)
    at ClientRequest.emit (events.js:107:17)
    at TLSSocket.socketOnData (_http_client.js:322:9)
    at TLSSocket.emit (events.js:107:17)
    at readableAddChunk (_stream_readable.js:163:16)
    at TLSSocket.Readable.push (_stream_readable.js:126:10)
    at TCP.onread (net.js:538:20)
      Error: Parse Error

I worked around this by adding secure=false to my client, but I'd prefer to use a secure client. Is this perhaps caused by SSL certs being wrong in my vagrant box 3.13.0-45-generic ?

osher commented 6 years ago

reproduced with us as well