EvanOxfeld / node-unzip

node.js cross-platform unzip using streams
MIT License
613 stars 343 forks source link

Can't pipe http.incomingMessage to unzip.Parse() #39

Closed collin closed 10 years ago

collin commented 10 years ago

This has an error

module.exports = function zipHandler(request, response, next) {
  request.pipe(unzip.Parse());
}

error is:

Error: invalid signature: 0x8074b50
    at node_modules/unzip/lib/parse.js:63:13
    at process._tickCallback (node.js:415:13)

This works, the file is written to http.zip and I can unzip in in my terminal.

module.exports = function zipHandler(request, response, next) {
  request.pipe(require('fs').createWriteStream("./http.zip"));
}

Looks like the data coming over the wire is correct but piping the request to unzip.Parse() doesn't work, what should I be doing?

collin commented 10 years ago

No clue, but after banging the the machine with a wrench long enough and rewriting the thing a few times... It works.

totty90 commented 10 years ago

Did you found the problem? You are the only result: https://www.google.pt/search?num=100&safe=off&q=%22Error%3A+invalid+signature%3A+0x8074b50%22&oq=%22Error%3A+invalid+signature%3A+0x8074b50%22&gs_l=serp.3...1139.1139.0.1296.1.1.0.0.0.0.98.98.1.1.0....0...1c.1.41.serp..1.0.0.H9avHa47STA

collin commented 10 years ago

@totty90 since then we have abandoned efforts to use this library.

Abandon all hope ye who enter...

totty90 commented 10 years ago

Ok, Now I'm using "archiver" if somebody need to know.