1
0
Fork 0

Adding debian version 2.4.63-1.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
Daniel Baumann 2025-06-22 11:01:27 +02:00
parent 7263481e48
commit f56986e2d9
Signed by: daniel.baumann
GPG key ID: BCC918A2ABD66424
1490 changed files with 80785 additions and 0 deletions

View file

@ -0,0 +1,4 @@
#!/bin/sh
echo Content-type: text/plain
echo
echo $PATH_INFO

View file

@ -0,0 +1,4 @@
#!/bin/sh
echo Content-type: text/plain
echo
echo $PATH_INFO

View file

@ -0,0 +1,4 @@
#!/bin/sh
echo Content-type: text/plain
echo
echo $PATH_INFO

View file

@ -0,0 +1,10 @@
use strict;
print "Content-type: text/plain\n\n";
print $ENV{PATH_INFO} . "\n";
if (my $ct = $ENV{CONTENT_LENGTH}) {
read STDIN, my $buffer, $ct;
print $buffer;
}

View file

@ -0,0 +1,22 @@
# This is a regression test for PR 31247.
# By sleeping, it ensures that the CGI bucket is left in the brigade
# (the first 8K will be morphed into a HEAP bucket), and hence *must*
# be setaside correctly when the byterange filter calls
# ap_save_brigade().
# Without the fix for PR 31247, the STDOUT content does not get
# consumed as expected, so the server will deadlock as it tries to
# consume STDERR after script execution in mod_cgi, whilst the script
# tries to write to STDOUT. So close STDERR to avoid that.
close STDERR;
print "Content-type: text/plain\n\n";
print "x"x8192;
sleep 1;
print "x"x8192;

View file

@ -0,0 +1,2 @@
print "perl cgi";

View file

@ -0,0 +1,2 @@
#!/bin/sh
echo sh cgi

View file

@ -0,0 +1,2 @@
print "N"x1024;

View file

@ -0,0 +1,6 @@
use strict;
print "Content-type: text/plain\r\n";
print "Content-Length: 0\r\n";
print "\r\n";

View file

@ -0,0 +1,7 @@
use strict;
print "Content-type: text/plain\n\n";
for (sort keys %ENV) {
print "$_ = $ENV{$_}\n";
}

View file

@ -0,0 +1,4 @@
use strict;
print "Status: 304 Not Modified\r\n\r\n";

View file

@ -0,0 +1,9 @@
print "HTTP/1.1 102 Please Wait...\r\n";
print "Host: nph-102\r\n\r\n";
print "HTTP/1.1 200 OK\r\n";
print "Content-Type: text/plain\r\n\r\n";
print "this is nph-stdout";

View file

@ -0,0 +1,17 @@
print "HTTP/1.0 200 OK\r\n";
print "Transfer-Encoding: chunked\r\n";
print "\r\n";
$| = 1;
sub dripfeed {
my $s = shift;
while (length($s)) {
select(undef, undef, undef, 0.2);
print substr($s, 0, 1);
$s = substr($s, 1);
}
}
dripfeed "0005\r\nabcde\r\n1; foo=bar\r\nf\r\n0\r\n\r\n";

View file

@ -0,0 +1,12 @@
# produces output with folded response headers
print "HTTP/1.0 200 OK\r\n";
for (1..50) {
print "X-Foo-Bar-$_:\n " . 'x'x($_*10) . "\n";
print "X-Bar-$_:\n gamm\r\n beta\n theta\r\n";
}
print "Content-type: \n text/plain\n\n";
print "hello, world";

View file

@ -0,0 +1,16 @@
foreach $i (1..5) {
print <<EOT1
HTTP/1.1 100 Continue
Server: Sausages/1.0
EOT1
;
}
print <<EOT2
HTTP/1.1 200 OK
Content-Type: text/html
Hello world
EOT2
;

View file

@ -0,0 +1,16 @@
foreach $i (1..50) {
print <<EOT1
HTTP/1.1 100 Continue
Server: Sausages/1.0
EOT1
;
}
print <<EOT2
HTTP/1.1 200 OK
Content-Type: text/html
Hello world
EOT2
;

View file

@ -0,0 +1,12 @@
# produces lots of stderr output
print "HTTP/1.0 200 OK\r\n";
print STDERR 'x'x8192;
print "Content-Type: text/plain\r\n\r\n";
print "this is nph-stdout";
close STDOUT;
print STDERR "this is nph-stderr";

View file

@ -0,0 +1,9 @@
print "HTTP/1.0 200 OK\r\n";
print join("\n",
'Content-type: text/html',
'Pragma: no-cache',
'Cache-control: must-revalidate, no-cache, no-store',
'Expires: -1',
"\n");
print "ok\n";

View file

@ -0,0 +1,78 @@
use File::Temp qw/:POSIX/;
my $caroot = $ENV{SSL_CA_ROOT};
if (! -d $caroot) {
print <<EOT
Status: 500 Internal Server Error
Content-Type: text/plain
Cannot find CA root at "$ENV{SSL_CA_ROOT}"
EOT
;
print STDERR "SSL_CA_ROOT env var not set or can't find CA root.\n";
exit(1);
}
chdir($caroot);
my $filein = tmpnam();
my $fileout = tmpnam();
# Enable slurp mode (read all lines at once)
local $/;
# Copy STDIN to $filein, which will be used as input for openssl
open(IN, '>', "$filein") or die "Could not open file '$filein' for write: $!";
binmode IN;
print IN <STDIN>;
close(IN);
my $cmd = 'openssl ocsp -CA certs/ca.crt'.
' -index index.txt'.
' -rsigner certs/server.crt'.
' -rkey keys/server.pem'.
' -reqin ' . $filein .
' -respout ' . $fileout;
system($cmd);
# Check system result
my $err = '';
if ($? == -1) {
my $err = "failed to execute '$cmd': $!\n";
}
elsif ($? & 127) {
my $err = sprintf("child '$cmd' died with signal %d, %s coredump\n",
($? & 127), ($? & 128) ? 'with' : 'without');
}
else {
my $rc = $? >> 8;
my $err = "child '$cmd' exited with value $rc\n" if $rc;
}
unlink($filein);
if ($err ne '') {
print <<EOT
Status: 500 Internal Server Error
Content-Type: text/plain
$err
EOT
;
print STDERR $err;
exit(1);
}
print <<EOT
Content-Type: application/ocsp-response
EOT
;
# Copy openssl result from $fileout to STDOUT
open(OUT, '<', "$fileout") or die "Could not open file '$fileout' for read: $!";
binmode OUT;
print <OUT>;
close(OUT);
unlink($fileout);

View file

@ -0,0 +1,3 @@
print "Content-type: text/plain\n\n";
print "perl cgi";

View file

@ -0,0 +1,14 @@
#echo some data back to the client
print "Content-type: text/plain\n\n";
if (my $ct = $ENV{CONTENT_LENGTH}) {
read STDIN, my $buffer, $ct;
print $buffer;
}
elsif (my $qs = $ENV{QUERY_STRING}) {
print $qs;
}
else {
print "nada";
}

View file

@ -0,0 +1,23 @@
local ($buffer, @pairs, $pair, $name, $value);
print "Content-type: text/plain\n\n";
$ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;
print "$ENV{'REQUEST_METHOD'}\n";
# Read in text
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
} else {
$buffer = $ENV{'QUERY_STRING'};
}
# Split information into name/value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%(..)/pack("C", hex($1))/eg;
print "$name: $value\n";
}

View file

@ -0,0 +1,8 @@
print <<EOT
Status: 200
Last-Modified: Tue, 15 Feb 2005 15:00:00 GMT
Content-Type: text/html
Hello world
EOT
;

View file

@ -0,0 +1,11 @@
use strict;
print "Content-type: text/plain\n";
if ($ENV{'HTTP_RANGE'} eq 'bytes=5-10/10') {
print "Content-Range: bytes 5-10/10\n\n";
print "hello\n";
} else {
print "\npardon?\n";
}

View file

@ -0,0 +1,5 @@
print <<EOT
Location: /foobar.html
EOT
;

View file

@ -0,0 +1,4 @@
#!/bin/sh
echo Content-type: text/plain
echo
echo sh cgi

View file

@ -0,0 +1,7 @@
# produces lots of stderr output
print STDERR 'x'x8192;
print "Content-Type: text/plain\n\n";
print "this is stdout";

View file

@ -0,0 +1,9 @@
# closes stderr during script execution
close STDERR;
print "Content-Type: text/plain\n\n";
sleep 1;
print "this is also stdout";

View file

@ -0,0 +1,8 @@
# closes stderr during script execution
print "Content-Type: text/plain\n\n";
print "this is more stdout";
close STDOUT;
print STDERR "this is a post-stdout-closure error message";

View file

@ -0,0 +1,3 @@
print "Content-type: text/plain\n\n";
print $ENV{UNIQUE_ID};

View file

@ -0,0 +1,6 @@
use strict;
print "X-Foo: bar\n";
print "Content-type: text/plain\n\n";
print "helloworld";