Skip to content

Commit

Permalink
Brought repository uptodate before big changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lstein committed Mar 20, 2000
1 parent 074da3a commit d494b3f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
18 changes: 12 additions & 6 deletions CGI.pm
Expand Up @@ -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.24 2000-02-18 19:22:29 lstein Exp $';
$CGI::VERSION='2.573';
$CGI::revision = '$Id: CGI.pm,v 1.25 2000-03-20 03:29:44 lstein Exp $';
$CGI::VERSION='2.574';

# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
Expand Down Expand Up @@ -441,6 +441,7 @@ sub init {
$query_string = Apache->request->args;
} else {
$query_string = $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'};
$query_string = $ENV{'REDIRECT_QUERY_STRING'} if defined $ENV{'REDIRECT_QUERY_STRING'};
}
last METHOD;
}
Expand Down Expand Up @@ -557,7 +558,8 @@ sub save_request {
# us to have several of these objects.
@QUERY_PARAM = $self->param; # save list of parameters
foreach (@QUERY_PARAM) {
$QUERY_PARAM{$_}=$self->{$_};
next unless defined $_;
$QUERY_PARAM{$_}=$self->{$_};
}
}

Expand All @@ -570,12 +572,13 @@ sub parse_params {
$param = unescape($param);
$value = unescape($value);
$self->add_parameter($param);
push (@{$self->{$param}},$value);
push (@{$self->{$param}},$value) if defined $value;
}
}

sub add_parameter {
my($self,$param)=@_;
return unless defined $param;
push (@{$self->{'.parameters'}},$param)
unless defined($self->{$param});
}
Expand Down Expand Up @@ -2198,6 +2201,7 @@ sub url {
}
$url .= $path if $path_info and defined $path;
$url .= "?" . $self->query_string if $query and $self->query_string;
$url = '' unless defined $url;
$url =~ s/([^a-zA-Z0-9_.%;&?\/\\:+=~-])/uc sprintf("%%%02x",ord($1))/eg;
return $url;
}
Expand Down Expand Up @@ -4276,8 +4280,10 @@ different from the current location, as in
All relative links will be interpreted relative to this tag.
The argument B<-target> allows you to provide a default target frame
for all the links and fill-out forms on the page. See the Netscape
documentation on frames for details of how to manipulate this.
for all the links and fill-out forms on the page. B<This is a
non-standard HTTP feature which only works with Netscape browsers!>
See the Netscape documentation on frames for details of how to
manipulate this.
-target=>"answer_window"
Expand Down
5 changes: 2 additions & 3 deletions CGI/Carp.pm
Expand Up @@ -201,7 +201,7 @@ BEGIN {

$main::SIG{__WARN__}=\&CGI::Carp::warn;
$main::SIG{__DIE__}=\&CGI::Carp::die;
$CGI::Carp::VERSION = '1.15';
$CGI::Carp::VERSION = '1.16';
$CGI::Carp::CUSTOM_MSG = undef;

# fancy import routine detects and handles 'errorWrap' specially.
Expand Down Expand Up @@ -335,8 +335,7 @@ $outer_message
END
;

if ($mod_perl) {
my $r = Apache->request;
if ($mod_perl && (my $r = Apache->request)) {
# If bytes have already been sent, then
# we print the message out directly.
# Otherwise we make a custom error
Expand Down
21 changes: 13 additions & 8 deletions cgi_docs.html
Expand Up @@ -3136,6 +3136,13 @@ <H2><A NAME="frames">Support for Frames</A></H2>
Explorer 3.0 and higher. Frames are supported in two ways:

<ol>
<li> You can provide the name of a new or preexisting frame in the startform()
and start_multipart_form() methods using the <code>-target</code>
parameter. When the form is submitted, the output
will be redirected to the indicated frame:
<pre>
print $query-&gt;start_form(-target=&gt;'result_frame');
</pre>
<li> You can direct the output of a script into a new window or into a
preexisting named frame by providing the name of the frame as a
<code>-target</code> argument in the header method. For example,
Expand All @@ -3145,13 +3152,8 @@ <H2><A NAME="frames">Support for Frames</A></H2>
$query = new CGI;
print $query-&gt;header(-target=&gt;'_blank');
</pre>
<li> You can provide the name of a new or preexisting frame in the startform()
and start_multipart_form() methods using the <code>-target</code>
parameter. When the form is submitted, the output
will be redirected to the indicated frame:
<pre>
print $query-&gt;start_form(-target=&gt;'result_frame');
</pre>
This feature is a non-standard extension to HTTP which is supported
by Netscape browsers, but <b>not by Internet Explorer</b>.
</ol>
Using frames effectively can be tricky. To create a proper frameset in which
the query and response are displayed side-by-side requires you to
Expand Down Expand Up @@ -4571,8 +4573,11 @@ <H2><A NAME="new">Revision History</A></H2>

<h3>Version 2.57</h3>
<ol>
<li>Handle REDIRECT_QUERY_STRING correctly.
<li>Removed use_named_parameters() because of dependency problems
and general lameness.
<li>Fixed problems with bad HREF links generated by url(-relative=>1)
when the url is like /people/.
<li>Silenced a warning on upload (patch provided by Jonas Liljegren)
<li>Fixed race condition in CGI::Carp when errors occur during parsing
(patch provided by Maurice Aubrey).
Expand Down Expand Up @@ -5304,6 +5309,6 @@ <H3>Bug fixes</H3>
<a href="http://www.cshl.org/">Cold Spring Harbor Laboratory</a></ADDRESS>
<P>
<!-- hhmts start -->
Last modified: Tue Feb 15 15:04:12 EST 2000
Last modified: Fri Mar 17 12:42:33 EST 2000
<!-- hhmts end -->
</BODY> </HTML>

0 comments on commit d494b3f

Please sign in to comment.