Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 79829
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: chris_jack [...] msn.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: CGI Documentation issue versus 3.49 code behaviour
Date: Mon, 24 Sep 2012 16:31:27 +0100
To: <bug-cgi [...] rt.cpan.org>
From: Chris Jack <chris_jack [...] msn.com>
Download (untitled) / with headers
text/plain 851b
I'm using perl 5.12.1 with version 3.49 of CGI.pmI was attempting to get more information about a file I was uploading and tried to follow the documentation at:http://search.cpan.org/~lds/CGI.pm-3.50/lib/CGI.pm#PROCESSING_A_FILE_UPLOAD_FIELD which reads: $filename = param('uploaded_file'); $type = uploadInfo($filename)->{'Content-Type'}; unless ($type eq 'text/html') { die "HTML FILES ONLY!"; }I tried various variations on this but uploadInfo($filename) was always returning undef. After a bit of fiddling, I got it to work by changing the first line to use upload rather than param aka: $filename = upload('uploaded_file'); $type = uploadInfo($filename)->{'Content-Type'}; unless ($type eq 'text/html') { die "HTML FILES ONLY!"; }This worked. Thought you might like to think about changing the documentation.Regards Chris
Subject: Re: [rt.cpan.org #79829] CGI Documentation issue versus 3.49 code behaviour
Date: Tue, 25 Sep 2012 11:34:54 -0400
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Thanks for the report, Chris. Mark
Download (untitled) / with headers
text/plain 241b
This issue has been copied to: https://github.com/leejo/CGI.pm/issues/104 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Documentation was clarified in 82c53ac491c61ac1a4902be604849ed80b543226. Closing, thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.