Solved

CGI HTTP Header error

Posted on 1999-01-17
2
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

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 …
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

705 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