Closed paneq closed 6 years ago
Thanks for the heads-up. When I wrote this, I was running it under 1.8.7, where the (old) tests still pass. Running them under 1.9 produces the errors you mention, though. I'm on vacation this week, meaning that I might actually be able to look into it :)
@danabr i am also getting errors with html5 FormData in all Webkit browsers at least, could you take a look at it?
Hi Hendrik,
I wrote/converted this multipart parser many years ago now, and have not used it after the first project (a prototype for my thesis project) I needed it for. I'm not convinced I remember enough details to be able to solve the problems.
I'll try to have a look this week, but I won't promise anything. Feel free to come up with a patch!
@danabr when i take a look at a normal form and a javascript FormData i can't see a difference, but its complaining https://github.com/danabr/multipart-parser/blob/master/lib/multipart_parser/reader.rb#L46 here, maybe newline handling isn't corrent?
I intend test some different scenarios with recent browsers to try to understand the issue. You can help by sending the raw multipart message that the browser sends to the server, so that we can use it as a test case.
I've done tests with the most recent firefox and chromium recently, and I have been able to parse form data generated by them. To me it seems like the "long boundary" test is incorrect. But you are saying you have problems parsing real, browser-generated, multipart/form-data messages, right?
Yes, i am having trouble with javascript FormData. In WebKit.
Von einem mobilen Gerät gesendet
Am 12.05.2014 um 11:11 schrieb Daniel Abrahamsson notifications@github.com:
I've done tests with the most recent firefox and chromium recently, and I have been able to parse form data generated by them. To me it seems like the "long boundary" test is incorrect. But you are saying you have problems parsing real, browser-generated, multipart/form-data messages, right?
— Reply to this email directly or view it on GitHub.
Could you start a netcat session with "nc -l 8888", and then make your form post to "localhost:8888", and then post the output (from netcat) here?
I'll make a gist of it soonish.
Von einem mobilen Gerät gesendet
Am 12.05.2014 um 11:44 schrieb Daniel Abrahamsson notifications@github.com:
Could you start a netcat session with "nc -l 8888", and then make your form post to "localhost:8888", and then post the output (from netcat) here?
— Reply to this email directly or view it on GitHub.
@Asmod4n I am using Safari, testing a celluloid/reel implementation of this library, and I've successfully used moxiecode/plupload ( html5 mode ) and an ordinary html form field. So I've used JavaScript FormData successfully.
Once I post the code to a branch of Reel, maybe we can find what's going on for you?
Oh i forgot, have used it inside a web worker for chunked uploading, and since FormData is not available there i took https://gist.github.com/lemonhall/3120320 as a polyfill, maybe the error is there.
Made a gist of a now disfunct uploader: https://gist.github.com/Asmod4n/28e5440fd47af471da9c crypto.js is from https://code.google.com/p/crypto-js/
Will check that out shortly, and be in #celluloid to talk if you're around.
Again, it would be helpful to get the full request sent to the server (by using netcat, for example).
Including the one that I submitted in another pull request.