From nobody@hyperreal.com Sun May 11 04:30:23 1997 Received: (from nobody@localhost) by hyperreal.com (8.8.5/8.8.5) id EAA22249; Sun, 11 May 1997 04:30:23 -0700 (PDT) Message-Id: <199705111130.EAA22249@hyperreal.com> Date: Sun, 11 May 1997 04:30:23 -0700 (PDT) From: Thomas Wang Reply-To: tom@wwwmktg.com To: apbugs@hyperreal.com Subject: HTTP/1.0 302 FOUND is not correctly handled X-Send-Pr-Version: 3.2 >Number: 569 >Category: protocol >Synopsis: HTTP/1.0 302 FOUND is not correctly handled >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Sun May 11 04:40:01 1997 >Last-Modified: Sun May 11 09:26:32 PDT 1997 >Originator: tom@wwwmktg.com >Organization: >Release: 1.0.5 >Environment: Server version Apache/1.0.5 BSDI BSD/OS 2.1 Kernel #0 Pentium PC (make and model uncertain) also tested on another (undetermined) version of Apache on SunOS 4.1.2 on a Sparc 4. >Description: When a cgi returns this result, I believe the webserver should redirect to the following defined URI. Although this is probably a little used trick, moving my scripts from the Netscape Webserver to the Apache webserver has seriously crippled them. Here is an example of the full result. HTTP/1.0 302 FOUND Location: "http://www.wwwmktg.com" URI: "http://www.wwwmktg.com" >How-To-Repeat: write yourself a cgi which returns the above. if you run it on a netscape server, the server will redirect to the location or uri specified (location is specified for compatibility with earlier http specs). if you run it on an apache server, an error message is displayed (internal misconfiguration)... "The server encountered an internal error or misconfiguration and was unable to complete your request." >Fix: add the handling of this particular result code to apache - i am not sure if other result codes are handled since i don't normally check the others. alternatively - please let it be true that this bug is already fixed and you tell me it is in the latest version. >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Sun May 11 09:26:32 PDT 1997 State-Changed-Why: Under Apache, normal CGIs do not output the HTTP result code. If you want to output _all_ the headers, use a script with a name starting with nph- and your script will be expected to output all the headers. To just send a redirect, just put a Location: http://www.site.com/other/place/ in the headers and Apache will set the right HTTP code by itself. This isn't a bug, just a different way of doing things. >Unformatted: