Skip Menu |

This queue is for tickets about the CGI-Lite CPAN distribution.

Report information
The Basics
Id: 16236
Status: resolved
Worked: 15 min
Priority: 0/
Queue: CGI-Lite

People
Owner: HOUSTON [...] cpan.org
Requestors: geira [...] tinde.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.02
Fixed in: 2.03



Subject: Fix for forms upload with explicit decoding
CGI::Lite currently checks for an exact match against the MIME type when deciding to deal with file uploads. Depending on browsers and page encodings, sometimes the MIME type string is on the form "application/x-www-form-urlencoded; encoding=utf-8", which will fail. One should instead only check if the string starts with the correct MIME type: 676c676 < ($content_type eq 'application/x-www-form-urlencoded')) { --- Show quoted text
> ($content_type =~ /^application\/x-www-form-urlencoded/)) {
Hello, Thanks for this bug report and suggested patch. Looking at CGI.pm as a reference, your change is precisely the way that the content type is tested there and it makes perfect sense to perform the same test in CGI::Lite. This fix will be present in the next release. Pete On Thu Dec 01 09:25:39 2005, guest wrote: Show quoted text
> CGI::Lite currently checks for an exact match against the MIME type > when deciding to deal with file uploads. Depending on browsers and > page encodings, sometimes the MIME type string is on the form > "application/x-www-form-urlencoded; encoding=utf-8", which will fail. > One should instead only check if the string starts with the correct > MIME type: > > 676c676 > < ($content_type eq 'application/x-www-form-urlencoded')) { > ---
> > ($content_type =~ /^application\/x-www-form-urlencoded/)) {