-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unzip does not work when using pipe #240
Conversation
very good ! 👍 |
ugh, this breaks on node 0.8. Investigating. |
@visionmedia help :( |
i get a different error in each version of node :( checking it out |
I almost think we should just get rid if .pipe() it's pretty horrid trying to get things to work properly |
formidable is super unhappy too for whatever reason, used to work fine :s might have to revert to an older version |
just disabling multipart for now it's so broken, i'll try and check the rest of this out soon |
ah, yeah, multipart is borked, even without my changes. I have a feeling, at least in theory, a more streams-oriented approach will actually help straighten the code out here, but you're likely to disagree with that haha |
yeah haha I stay as far away from them as possible, especially after seeing how broken the streams 2 implementation is, we'd be rewriting things left and right. I haven't had tons of time to look into it but it seems like it may be a node bug: node-formidable/formidable#240 really hard to follow core's code though, but the removal of agent and keep-alive is what screws over all the multipart tests, which is kind of interesting because that means there is probably a race regardless, just one that is intermittent when agent is enabled. |
im getting
|
oh nvm you said it breaks 0.8.x |
definitely need to rework this lib, even when we get this working .pipe() is still super half-assed, won't follow redirects or anything |
fixed that but now one of the stream tests fails :S haha.. woot |
Related to componentjs/component#369
simple fix, there's a lot of stuff going on in utils.unzip so I just skipped that and made it work.
But, this is total crap because it unzips the thing twice because it still runs https://github.com/timoxley/superagent/blob/e36814a3e5a9b95fc68fb7a76bf2feb79a5772ee/lib/node/index.js#L679-L682
Which, I guess, isn't any more inefficient than it the current code, since using
.pipe
also unzips the data but it just does nothing with it, haha great.This makes it work, but yeah sucks, and overall that area's code could do with straightening out.