httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Hmmm... nice problem with CGIs and Env variables
Date Fri, 04 Sep 1998 19:45:01 GMT

Hmmmm... I've currently enhanced the environment variable support for mod_ssl
2.1 and there I've now create variables longer than 80 characters in length.
When I strip these variables down to 80 chars in length, all works fine. When
I strip e.g. after 100 chars, Apache hangs.  Same when I set the full contents
to the variable (length 1052 bytes - it's a PEM encoded certificate, BTW).
When it's longer than 80 chars it hangs.

When I run the beast with -X and break after some time I always get:

(gdb) bt
#0  0x201079e1 in select ()
#1  0x28e50 in ap_send_fb_length (fb=0xd7b64, r=0xd6034, length=-1) at
http_protocol.c:1760
#2  0x28c60 in ap_send_fb (fb=0xd7b64, r=0xd6034) at http_protocol.c:1693
#3  0xcf34 in cgi_handler (r=0xd6034) at mod_cgi.c:546
#4  0x1aceb in ap_invoke_handler (r=0xd6034) at http_config.c:505
#5  0x2bd39 in process_request_internal (r=0xd6034) at http_request.c:1174
#6  0x2bd6d in ap_process_request (r=0xd6034) at http_request.c:1191
#7  0x25108 in child_main (child_num_arg=0) at http_main.c:3665
#8  0x25243 in make_child (s=0x9b034, slot=0, now=904937774) at
http_main.c:3738
#9  0x25331 in startup_children (number_to_start=5) at http_main.c:3812
#10 0x25a62 in standalone_main (argc=3, argv=0xefbfd66c) at http_main.c:4090
#11 0x260f9 in main (argc=3, argv=0xefbfd66c) at http_main.c:4367

In other words: The whole processing was done right up to the point where
mod_cgi sends the body of the script to the client.  Here it hangs after a few
KB in the select(). "ps" shows a "piperd". The script itself is the printenv
script. 

The question now is: Have we hard-coded any limits on the length for CGI
variables anywhere? I cannot find a limit, but perhaps it's there. 
Any clues?
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message