form_data icon indicating copy to clipboard operation
form_data copied to clipboard

Server-side parser.

Open digitalextremist opened this issue 10 years ago • 2 comments

Per our brief discussion on Twitter @ixti, here is an issue to collect together our progress on a server-side parser for this multipart form-data library. I'll gladly help with this, time allowing.

This will also resolve the following associated issues:

  • celluloid/reel#149
  • kenichi/angelo#47

I have functioning server-side parsing code I'm using myself, which is based on danabr/multipart-parser. Rather than just forking that repository I figured we could absorb and continue to maintain whatever we use, as that code is released under MIT.

Are there any objections to that? The last commit on that repository was 3 years back, and the code is all ruby-native.

/cc: @tarcieri, @kenichi

digitalextremist avatar Feb 21 '15 00:02 digitalextremist

Sounds good to me. Although I think that we can utilize http_parser to read headers of parts instead.

ixti avatar Feb 22 '15 14:02 ixti

I just wanted to note that I tried danabr/multipart-parser, and surprisingly I found it to be significantly slower than Rack's multipart parser. I generated a multipart body from a 25MB file, and parsed it with both multipart-parser and Rack's multipart parser, and Rack took about 4s whereas multipart-parser took around 35s.

It's not that I needed it or anything, I was just wondering what was the performance comparison between the two.

janko avatar May 23 '17 05:05 janko