Received: (qmail 8227 invoked by uid 2012); 27 Oct 1998 15:44:12 -0000 Message-Id: <19981027154412.8226.qmail@hyperreal.org> Date: 27 Oct 1998 15:44:12 -0000 From: greg haygood Reply-To: greg.haygood@thinkinc.com To: apbugs@hyperreal.org Subject: bad CGI headers due to /etc/resolv.conf X-Send-Pr-Version: 3.2 >Number: 3298 >Category: os-solaris >Synopsis: bad CGI headers due to /etc/resolv.conf >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: mistaken >Submitter-Id: apache >Arrival-Date: Tue Oct 27 07:50:00 PST 1998 >Last-Modified: Tue Oct 27 10:28:12 PST 1998 >Originator: greg.haygood@thinkinc.com >Organization: >Release: 1.3.x >Environment: SunOS ns2.iweb.net 5.5.1 Generic_103640-23 sun4u sparc SUNW,Ultra-1 bind 8.1.2 gcc 2.8.0 >Description: setting "options debug" in /etc/resolv.conf causes a bad header to be set, which in turn causes a 500 error at the end of some CGI scripts, after the script has performed its function(s). this is the error that pops up on screen and in the error log: malformed header from script. Bad header=;; res_setoptions(" de: /htdocs/interweb/cgi-bin/email this was checked with both Apache 1.3.1 and 1.3.3 >How-To-Repeat: using any instance of Matt's FormMail (v1.6) CGI produces this output. my version is up at http://beta.iweb.net/apps/form.html and http://beta.iweb.net/cgi-bin/email, but obviously can't be used since this is on our production server. Matt's Script Archive, Inc. >Fix: since i haven't delved into the code, not yet. >Audit-Trail: State-Changed-From-To: open-feedback State-Changed-By: coar State-Changed-When: Tue Oct 27 07:56:43 PST 1998 State-Changed-Why: Why do you think this is an Apache problem? The error message clearly states that the bogus information is being emitted by the script, so it's the script that's being affected by the resolver option, not the server. Try running your script from the command line and see what output it produces. From: Marc Slemko To: Greg Haygood Cc: Apache bugs database Subject: RE: os-solaris/3298: bad CGI headers due to /etc/resolv.conf Date: Tue, 27 Oct 1998 09:24:12 -0800 (PST) On Tue, 27 Oct 1998, Greg Haygood wrote: > > i have, and it works fine. also, i changed the script with > > print "content-type: text/plain\n\n" > $|++; > > at the start of the script, and > > print "bye"; > exit(0); > > at the end of the perl script, and the error message was printed out after > this message. nothing weird showed up with the rest of the output. i also > used telhttp to view the headers coming back from the script, and everything > looked fine. this error just seems to be leaking out, after processing the > script. Just because it appears one way on the command line doesn't mean it appears the same way on the server. It is pretty clear that, for whatever reason, the debug output is getting sent out before the headers are complete. That is not something Apache can or should work around. What is the exact output of running "scriptname | cat" from the commandline? From: "Greg Haygood" To: "'Marc Slemko'" Cc: "'Apache bugs database'" Subject: RE: os-solaris/3298: bad CGI headers due to /etc/resolv.conf Date: Tue, 27 Oct 1998 12:48:00 -0500 ah, it appears to be a sendmail issue. rather obscure, but oh, well. thanks for the help, -g -----Original Message----- From: Marc Slemko [mailto:marcs@znep.com] Sent: Tuesday, October 27, 1998 12:24 PM To: Greg Haygood Cc: Apache bugs database Subject: RE: os-solaris/3298: bad CGI headers due to /etc/resolv.conf On Tue, 27 Oct 1998, Greg Haygood wrote: > > i have, and it works fine. also, i changed the script with > > print "content-type: text/plain\n\n" > $|++; > > at the start of the script, and > > print "bye"; > exit(0); > > at the end of the perl script, and the error message was printed out after > this message. nothing weird showed up with the rest of the output. i also > used telhttp to view the headers coming back from the script, and everything > looked fine. this error just seems to be leaking out, after processing the > script. Just because it appears one way on the command line doesn't mean it appears the same way on the server. It is pretty clear that, for whatever reason, the debug output is getting sent out before the headers are complete. That is not something Apache can or should work around. What is the exact output of running "scriptname | cat" from the commandline? State-Changed-From-To: feedback-closed State-Changed-By: coar State-Changed-When: Tue Oct 27 10:28:11 PST 1998 State-Changed-Why: Turned out to be a sendmail problem. Thanks for using Apache! Class-Changed-From-To: sw-bug-mistaken Class-Changed-By: coar Class-Changed-When: Tue Oct 27 10:28:11 PST 1998 >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]