Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Version 2.56

  • Loading branch information...
commit 0bb044f567040fa999f90b4779f3f53197b1a387 1 parent 818eff3
lstein authored
Showing with 23 additions and 23 deletions.
  1. +5 −11 ANNOUNCE
  2. +9 −10 CGI.pm
  3. +9 −2 cgi_docs.html
View
16 ANNOUNCE
@@ -1,4 +1,4 @@
-CGI.pm version 2.54 is now available for your fun and edification.
+CGI.pm version 2.56 is now available for your fun and edification.
This will be the last version of the monolithic CGI.pm module.
The new version, 3.0, will be fully modularized and optimized for
@@ -7,19 +7,13 @@ David James).
Fixes in this version:
-1. Removed automatic domain name addition from CGI::Cookie. This will
-BREAK some versions of Internet Explorer, but will fix problems that
-arise in internal networks when the host table-based domain names are
-not fully qualified. To avoid breaking browsers, ALWAYS use the
--domain argument when creating cookies -- and fix your host tables!
+1. Fixed bugs in file uploaded introduced in version 2.55.
-2. Fixed problems in escape() handling of + signs.
-
-3. Improvements to CGI::Pretty from Brian Paulsen (*not* regression
-tested).
+2. Fixed long-standing bug which prevented two files with identical
+names from being uploaded.
Lincoln Stein
-8/9/99
+9/14/99
========================================================================
Lincoln D. Stein
View
19 CGI.pm
@@ -17,8 +17,8 @@ require 5.004;
# The most recent version and complete docs are available at:
# http://stein.cshl.org/WWW/software/CGI/
-$CGI::revision = '$Id: CGI.pm,v 1.19 1999-08-31 17:04:37 lstein Exp $';
-$CGI::VERSION='2.55';
+$CGI::revision = '$Id: CGI.pm,v 1.20 1999-10-11 13:56:16 lstein Exp $';
+$CGI::VERSION='2.56';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -2859,7 +2859,7 @@ sub read_multipart {
# If no filename specified, then just read the data and assign it
# to our parameter list.
- unless (defined $filename) {
+ if ( !defined($filename) || $filename eq '' ) {
my($value) = $buffer->readBody;
push(@{$self->{$param}},$value);
next;
@@ -2900,7 +2900,7 @@ sub read_multipart {
# Save some information about the uploaded file where we can get
# at it later.
- $self->{'.tmpfiles'}->{$filename}= {
+ $self->{'.tmpfiles'}->{fileno($filehandle)}= {
name => $tmpfile,
info => {%header},
};
@@ -2923,8 +2923,8 @@ END_OF_FUNC
'tmpFileName' => <<'END_OF_FUNC',
sub tmpFileName {
my($self,$filename) = self_or_default(@_);
- return $self->{'.tmpfiles'}->{$filename}->{name} ?
- $self->{'.tmpfiles'}->{$filename}->{name}->as_string
+ return $self->{'.tmpfiles'}->{fileno($filename)}->{name} ?
+ $self->{'.tmpfiles'}->{fileno($filename)}->{name}->as_string
: '';
}
END_OF_FUNC
@@ -2932,7 +2932,7 @@ END_OF_FUNC
'uploadInfo' => <<'END_OF_FUNC',
sub uploadInfo {
my($self,$filename) = self_or_default(@_);
- return $self->{'.tmpfiles'}->{$filename}->{info};
+ return $self->{'.tmpfiles'}->{fileno($filename)}->{info};
}
END_OF_FUNC
@@ -2984,7 +2984,7 @@ $AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD';
sub asString {
my $self = shift;
# get rid of package name
- (my $i = $$self) =~ s/^\*(\w+::)+//;
+ (my $i = $$self) =~ s/^\*(\w+::fh\d{5})+//;
$i =~ s/\\(.)/$1/g;
return $i;
# BEGIN DEAD CODE
@@ -3010,8 +3010,7 @@ END_OF_FUNC
sub new {
my($pack,$name,$file,$delete) = @_;
require Fcntl unless defined &Fcntl::O_RDWR;
- ++$FH;
- my $ref = \*{'Fh::' . quotemeta($name)};
+ my $ref = \*{'Fh::' . ++$FH . quotemeta($name)};
sysopen($ref,$file,Fcntl::O_RDWR()|Fcntl::O_CREAT()|Fcntl::O_EXCL(),0600) || return;
unlink($file) if $delete;
CORE::delete $Fh::{$FH};
View
11 cgi_docs.html
@@ -6,7 +6,7 @@
<BODY bgcolor="#FFFFFF">
<H1><IMG SRC="examples/dna.small.gif" ALT="[logo]">
CGI.pm - a Perl5 CGI Library</H1>
-Version 2.55, 8/31/1999, L. Stein
+Version 2.56, 9/13/1999, L. Stein
<p>
<H2>Abstract</H2> This perl 5 library uses objects to create Web
@@ -4567,6 +4567,13 @@
<H2><A NAME="new">Revision History</A></H2>
+<h3>Version 2.56</h3>
+<ol>
+ <li>Fixed bugs in file upload introduced in version 2.55
+ <li>Fixed long-standing bug that prevented two files with identical
+ names from being uploaded.
+</ol>
+
<h3>Version 2.55</h3>
<ol>
<li>Fixed cookie regression test so as not to produce an error.
@@ -5283,6 +5290,6 @@
<a href="http://www.cshl.org/">Cold Spring Harbor Laboratory</a></ADDRESS>
<P>
<!-- hhmts start -->
-Last modified: Tue Aug 31 13:03:44 EDT 1999
+Last modified: Mon Sep 13 17:08:28 EDT 1999
<!-- hhmts end -->
</BODY> </HTML>
Please sign in to comment.
Something went wrong with that request. Please try again.