Solved

CGI HTTP Header error

Posted on 1999-01-17
2
241 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now