?
Solved

CGI HTTP Header error

Posted on 1999-01-17
2
Medium Priority
?
255 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 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

840 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