Solved

CGI HTTP Header error

Posted on 1999-01-17
2
243 Views
Last Modified: 2013-12-25
This must be a right of passage.
Formail, Blat,Nt4.0, IIS 4
1)script creates the file to be sent
2)I can manually blat the file from the command prompt
3)The script calls a bat file with the line
        exec("c:/blatit");
4)Tring to run the script from the web produces the following error:
         CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:


C:\Inetpub\Domains\erpjobcenter>blat c:/message/temp/mailfile.txt -t dfarrell@dotnet-usa.com

This is mission criticle that this is resolved. I have spent days trying to configure this PLEASE HELP ME RESOLVE!!
Doug Farrell
dfarrell@dotnet-usa.com


0
Comment
Question by:dotnet
2 Comments
 
LVL 8

Accepted Solution

by:
jhurst earned 100 total points
ID: 1832307
I do not see you outputting any http-headers at all:

If you are sending html then you need just
print("Content-type: text/html\n\n");

If not html then something slightly different.  Basically you need a header to send and then a blank line to end the header.
0
 

Author Comment

by:dotnet
ID: 1832308
I simplified the script to read:

#!/perl/bin
#send a file using blat
exec("c:/winnt/system32/blat c:/message/temp/mailfile.txt -t dfarrell\@dotnet-usa.com \n\n");

It returns this error:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Sending c:/message/temp/mailfile.txt to dfarrell@dotnet-usa.com
Login name is DOTNET

The Html:
<HTML>
<HEAD>
      <TITLE>Untitled</TITLE>
</HEAD>

<BODY>
<FORM METHOD="get" ACTION="/cgi/simple.cgi">

<INPUT TYPE="TEXT" NAME="test">
<INPUT VALUE="Send" TYPE="submit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT VALUE="Clear All" TYPE="reset"></FONT></CENTER></PRE></FORM>
</form>

</BODY>
</HTML>

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
change home folder path 4 53
inactive users 13 77
Automating a script for user accounts LINUX 14 73
Register AutoHotkey 12 72
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
This article will show, step by step, how to integrate R code into a R Sweave document
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question