www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject os-freebsd/1122
Date Thu, 11 Sep 1997 23:40:32 GMT
The following reply was made to PR os-freebsd/1122; it has been noted by GNATS.

From: Marc Slemko <marcs@znep.com>
To: nsayer@quack.kfu.com
Subject: os-freebsd/1122
Date: Thu, 11 Sep 1997 17:36:27 -0600 (MDT)

 
 On Thu, 11 Sep 1997 nsayer@quack.kfu.com wrote:
 
 > Marc Slemko writes:
 > 
 > > Good grief.  We really don't have the time to be manually 
 > > jumping through hoops just to respond to you.
 > 
 > Sorry. You won't have to anymore, though, having done it once.
 > My mailbox signal:noise ratio would be about 1:20 if I didn't
 > do it.
 
 Oh yea?  Every time the status on the PR changes whoever changes it will
 manually have to forward the change to you since it comes from a different
 address.  And I have to fix the subject line again for our bug tracking
 system, etc.  Quite annoying. 
 
 > > > > Please send the complete source for a _minimal_ program
 > > > > that replicates the behavior. 
 > 
 > Ok.
 > 
 > #include <stdio.h>
 > #include <strings.h>
 > #include <sys/types.h>
 > #include <stddef.h>
 > 
 > extern char *strdup();
 > 
 > main(argc,argv)
 > int argc;
 > char **argv;
 > {
 >   struct post_env_list *list;
 >   int pid;
 > 
 >   printf("Content-Type: text/html\n\n");
 
 Add a fflush(stdout) here.  stdout is buffered, so both child and parent
 end up writing it.
 
 As an alternative, you could use the appropriate setvbuf() call to disable
 buffering out stdout but that is less desirable because it adds more
 overhead.
 
 > 
 >   if ((pid=vfork())==0)
 >   {
 >     freopen("/dev/null","w",stdin);
 >     freopen("/dev/null","w",stdout);
 >     freopen("/dev/null","w",stderr);
 >     exit(0);
 >   }
 >   else
 >     waitpid(pid,NULL,0);
 > 
 >   printf("<head><title>Page sent</title>\n");
 >   printf("</head><body><H1>Page sent.</H1></body>\n");
 > }
 > 
 > 
 > > It is likely a problem
 > > > > with your CGI.  If you simply have it consist of nothing
 > > > > but the one line printf("Content-type: text/html\n\n") does
 > > > > it still give the same error?
 > > > > 
 > > > > What if you try a GET instead of a POST?
 > 
 > Same thing:
 > 
 > GET /cgi-bin/foo HTTP/1.0
 > 
 > HTTP/1.1 200 OK
 > Date: Thu, 11 Sep 1997 22:18:46 GMT
 > Server: Apache/1.3a1
 > Connection: close
 > Content-Type: text/html
 > 
 > Content-Type: text/html
 > 
 > <head><title>Page sent</title>
 > </head><body><H1>Page sent.</H1></body>
 > 
 > -- 
 > Nick Sayer  http://www.kfu.com/~nsayer/ | 
 > nsayer [at] quack [dot] kfu [dot] com   | Tha average California Lottery
 > UNSOLICITED BULK EMAIL IS UNACCEPTABLE  | ticket costs $1 and returns 50.
 > AND WILL BE CONSIDERED HARASSMENT       | 
 > 
 
 
 

Mime
View raw message