parse_multipart bug fix for Content-Type and No Filename
Reported by Brendan Baldwin | March 24th, 2011 @ 05:32 PM
I posted this to github issues for rack project several months ago, but there have only been a couple replies from other users pushing for it. I assume that it is ignored because nobody on Rack team uses the github issues system. Reposting this here.
https://github.com/rack/rack/pull/116
Rack 1.2 parse_multipart bug fix for Content-Type and No Filename
Ran into an issue upgrading to Rack 1.2 when users of our API using Apache HTTP Client were submitting multipart requests with a Content-Type but a Content-Disposition without "filename". This triggered a logical bug in the parse_multipart code that invoked a "rewind" call on a String object, expecting a Tempfile object instead.
Broke my commits into 2:
First one: 2c15ef595a509453bd94 has the spec and fixture that
proves the bug.
Second one: 8f7fcf0fdd9fd99aa529 has the bug "fix".
I hesitate to say I grok everything going on in the parse_multipart code (whoaboy, thats some code) but this change appears innocuous enough, breaks no other specs and does what we expected it to on our end.
Cheers,
Brendan Baldwin
Comments and changes to this ticket
-
raggi May 3rd, 2011 @ 07:16 AM
- State changed from new to resolved
I included your test for coverage, it looks like the issue was solved elsehow.
Thanks!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป