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: 27455
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: info [...] gknw.de
Cc:
AdminCc:

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



Subject: CGI.pm doesnt use binmode() on NetWare platform
Date: Wed, 6 Jun 2007 02:54:48 +0200
To: bug-CGI.pm [...] rt.cpan.org
From: Guenter Knauf <info [...] gknw.de>
Download (untitled) / with headers
text/plain 1.2k
Hi Lincoln, while testing with POST data I found that CGI.pm doesnt use binmode() on NetWare; below is a patch against CGI.pm 3.29 which fixes this: ########################################################################### # patch to fix CGI.pm to use binmode() on NetWare -- by G. Knauf. # ########################################################################### --- CGI.pm.orig Mon Apr 16 18:58:46 2007 +++ CGI.pm Wed Jun 06 02:45:06 2007 @@ -155,12 +155,14 @@ $OS = 'EPOC'; } elsif ($OS =~ /^cygwin/i) { $OS = 'CYGWIN'; +} elsif ($OS =~ /^NetWare/i) { + $OS = 'NETWARE'; } else { $OS = 'UNIX'; } # Some OS logic. Binary mode enabled on DOS, NT and VMS -$needs_binmode = $OS=~/^(WINDOWS|DOS|OS2|MSWin|CYGWIN)/; +$needs_binmode = $OS=~/^(WINDOWS|DOS|OS2|MSWin|CYGWIN|NETWARE)/; # This is the default class for the CGI object to use when all else fails. $DefaultClass = 'CGI' unless defined $CGI::DefaultClass; @@ -171,7 +173,7 @@ # The path separator is a slash, backslash or semicolon, depending # on the paltform. $SL = { - UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/', + UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/', NETWARE => '/', WINDOWS => '\\', DOS => '\\', MACINTOSH => ':', VMS => '/' }->{$OS}; thanks, Guenter.
Download CGI.pm.diff
text/x-diff 1.1k
########################################################################### # patch to fix CGI.pm to use binmode() on NetWare -- by G. Knauf. # ########################################################################### --- CGI.pm.orig Mon Apr 16 18:58:46 2007 +++ CGI.pm Wed Jun 06 02:45:06 2007 @@ -155,12 +155,14 @@ $OS = 'EPOC'; } elsif ($OS =~ /^cygwin/i) { $OS = 'CYGWIN'; +} elsif ($OS =~ /^NetWare/i) { + $OS = 'NETWARE'; } else { $OS = 'UNIX'; } # Some OS logic. Binary mode enabled on DOS, NT and VMS -$needs_binmode = $OS=~/^(WINDOWS|DOS|OS2|MSWin|CYGWIN)/; +$needs_binmode = $OS=~/^(WINDOWS|DOS|OS2|MSWin|CYGWIN|NETWARE)/; # This is the default class for the CGI object to use when all else fails. $DefaultClass = 'CGI' unless defined $CGI::DefaultClass; @@ -171,7 +173,7 @@ # The path separator is a slash, backslash or semicolon, depending # on the paltform. $SL = { - UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/', + UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/', NETWARE => '/', WINDOWS => '\\', DOS => '\\', MACINTOSH => ':', VMS => '/' }->{$OS};
Download (untitled) / with headers
text/plain 1.4k
On Tue Jun 05 20:55:55 2007, info@gknw.de wrote: Show quoted text
> Hi Lincoln, > while testing with POST data I found that CGI.pm doesnt use binmode() > on NetWare; > below is a patch against CGI.pm 3.29 which fixes this: > >
########################################################################### Show quoted text
> # patch to fix CGI.pm to use binmode() on NetWare -- by G. Knauf. > # >
########################################################################### Show quoted text
> --- CGI.pm.orig Mon Apr 16 18:58:46 2007 > +++ CGI.pm Wed Jun 06 02:45:06 2007 > @@ -155,12 +155,14 @@ > $OS = 'EPOC'; > } elsif ($OS =~ /^cygwin/i) { > $OS = 'CYGWIN'; > +} elsif ($OS =~ /^NetWare/i) { > + $OS = 'NETWARE'; > } else { > $OS = 'UNIX'; > } > > # Some OS logic. Binary mode enabled on DOS, NT and VMS > -$needs_binmode = $OS=~/^(WINDOWS|DOS|OS2|MSWin|CYGWIN)/; > +$needs_binmode = $OS=~/^(WINDOWS|DOS|OS2|MSWin|CYGWIN|NETWARE)/; > > # This is the default class for the CGI object to use when all else > fails. > $DefaultClass = 'CGI' unless defined $CGI::DefaultClass; > @@ -171,7 +173,7 @@ > # The path separator is a slash, backslash or semicolon, depending > # on the paltform. > $SL = { > - UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/', > + UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/', > NETWARE => '/', > WINDOWS => '\\', DOS => '\\', MACINTOSH => ':', VMS => '/' > }->{$OS};
Thanks for the patch. I recommend it be apply for the next release. Mark
Thanks, this patch has been applied in my git repo now. Mark
Subject: released, thanks.
I believe this change was released today as part of CGI.pm 3.45. Thanks for the contribution.


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.