Ticket #107 (closed defect)
Problem on file uploads
| Reported by: | brmichel | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | Camping 1.6 |
| Component: | camping.rb | Version: | 1.5 |
| Keywords: | Cc: |
Description
In some (bad) cases, uploading a file can failed. In Base#initialize near the line 400 of camping-unabridged.rb, the uploaded file is read by block of 16384 bytes:
while l=@in.read(16384)
if l=~b
o<<$`.chomp
@in.seek(-$'.size,IO::SEEK_CUR)
break
end
o<<l
end
b is a regexp for detecting the boundary. But if the boundary is splitted on 2 blocks, the regexp doesn't match it.
I have this problem while uploading a file of 65516 bytes, with an HTML form data after it. The HTML form data doesn't appear in @input, but the temporary file created by camping contains the uploaded file and the HTML data.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
