httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten P. Gehrke" <>
Subject Re: [users@httpd] CGI script executing twice
Date Mon, 15 Dec 2003 08:17:23 GMT
At 17:58 14-12-03, you wrote:
>Brian Dessent wrote:
> >
> > Chris W wrote:
> >
> > > I fixed my html as you suggested and it still does the same thing.  It
> > > has this behavior with IE, Netscape 7.1, and opera.  With Netscape 4.7 I
> > > get this. . .
> > >
> > >  "POST /cgi-bin/ HTTP/1.0" 200 6521
> > >  "GET /cgi-bin/? HTTP/1.0" 403 286
> >
> > If I were you I'd download and install Ethereal and get a packet capture
> > of the entire browser-server conversation.  Something is obviously wrong
> > here, but without a capture it's rather like looking for a needle in a
> > haystack, blindfolded.  THere are precompiled Ethereal binaries for
> > windows, it's really not terribly hard to do.  You might also try
> > Mozilla's "live headers" plug-in.  There are doubtless countless other
> > programs that can achieve the same effect, but Ethereal is the old
> > standby.
>This can't be that hard. . . there has to be something I'm missing
>here.  This happens on a redhat 6.2 machine with Apache, a win 2k
>machine with Apache 2 and a redhat 9.0 machine with apache 2.

Just for fun, I connected to your site with telnet and ran a conversation 
by hand.

First I retrieved your static page:
$ telnet 8086
Connected to
Escape character is '^]'.
GET /song2.html HTTP/1.1

HTTP/1.1 200 OK
Date: Mon, 15 Dec 2003 07:49:03 GMT
Server: Apache/2.0.48 (Win32)
Last-Modified: Mon, 15 Dec 2003 05:04:01 GMT
ETag: "7c43-12d-cd532731"
Accept-Ranges: bytes
Content-Length: 301
Content-Type: text/html; charset=ISO-8859-1

Buy the new CD for $11.00, Buy two or three!!
<INPUT TYPE="text" SIZE="4" NAME="qty" VALUE="1">
<input type="submit" value="Buy">
</html>Connection closed by foreign host.

I then connected again to invoke your script"
$ telnet 8086
Connected to
Escape character is '^]'.
GET /cgi-bin/ HTTP/1.1

(The server rewarded me with lengthy output.  Since I already tried to 
access your site with a browser, I knew what to expect.  I believe I got 
the same output my browser got, so I won't reproduce it here)

Now you should check you logs to see if the GET and POST entries are in 
there.  You should only see a GET entry.

BTW, I find it odd that the POST entry in your logs comes before the 
GET.  Your static HTML page states the form method to be GET, so that is 
what a browser would use.


Rolling Horse Ranch Technical Services                 Carsten P. Gehrke
          Custom software solutions using open source technology         

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message