Q:CGI/1.1:400 Status to Client from CGI/HTTPD

Q:CGI/1.1:400 Status to Client from CGI/HTTPD

Post by Michael Ry » Wed, 14 Jun 1995 04:00:00



CASE: server is HTTP/1.0 with CGI/1.1 capability.  i am writing CGI
that returns a Status of 400 or 500 if there's an error (C lib...).

reading the CGI spec on hoohoo.ncda.uiuc.edu i have decided to
return a simple one line Header with the following:
        HTTP/1.0 400 Failure\n
this seems sufficient from the spec.

this Header does not return a 400 code to my browser but instead fails at the
server:
        [Tue Jun 13 10:41:14 1995] httpd: malformed header from script

if i include text/plain, like an error message:
        HTTP/1.0 400 Failure\n

        this is a dummy error message
then i get the dummy error message in my browser and NOT an 400 error code

PROBLEM:  how can i code a CGI header with a non-200 code that will be accepted?
moreover, how can i code CGI to return an error code that causes HTTPD to
return a non-200 error code?

have i missed the BIG IDEA?

thanks
//michael
--

:: ob disclaimer: opinions expressed are not those of xerox, corp.

 
 
 

1. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

I've been seeing a number of attacks of this sort recently
from various sites in the http logs.  The time correlation
between the logs on various hosts suggests that the attacker
was scanning sequentially upward in IP addresses.  Since all
tcp and udp packets to ports below 1024 except for http,
smtp, and ident are filtered out for most, including the
attacking, sites, I'm not seeing anything else in the logs.

209.61.73.47 - - [04/Jul/1998:07:19:27 -0500] "GET /cgi-bin/phf" 404 -
209.61.73.47 - - [04/Jul/1998:07:19:28 -0500] "GET /cgi-bin/test-cgi" 404 -
209.61.73.47 - - [04/Jul/1998:07:19:28 -0500] "GET /cgi-bin/handler" 404 -

Is this a signature of some known attackware?  If so, what
other attacks accompany these http probes?

--

2. HOW DO I SETUP A ROUTER

3. HTTPd Exec CGI Error "invalid CGI ref getwd"

4. Soundblaster Live (Value) / S/PDIF

5. ePerl+NPH-CGI/1.1 complaint+Apache 2.0.39+SunOS 5.9

6. file access question

7. How to put HTTP/1.1 401 Access Denied to responce in CGI script

8. problem with bash and ELF

9. Need help getting Java Cgi program to work on Apache 1.1 & HPUX 9.07

10. Please can you help me with CGI in Apache 1.1 (same question with email address)

11. Netscape/1.1 SSI-commands from CGI not prosessed, hot to fix ?

12. Apache 1.1 CGI set up question - second cgibin directory for testing

13. Apache/CGI: How to toggle an ErrorDocument from a CGI ?