I have a perl script that tries to do a redirect. It works fine with
IIS 5 and 5.1, but dies with 6, which complains
"The specified CGI application misbehaved by not returning a complete
set of HTTP headers."

The script returned
Status: 302 Moved
location: logon.pl?Retry=true

What else does it need to return? AFAIK, that's all that I can see it
needing to return after a couple hours of googling.

--
Mike Swaim swaim@hal-pc.org at home | Quote: "Boingie"^4 Y,W & D
MD Anderson Dept. of Biostatistics & Applied Mathematics
mpswaim@mdanderson.org or mswaim@odin.mdacc.tmc.edu at work
ICBM: 29.763N 95.363W|Disclaimer: Yeah, like I speak for MD Anderson.

Re: Redirect Error With IIS 6 by David

David
Tue Feb 22 18:15:10 CST 2005

The pragmatic side of me suggests:
- Make sure it sends responses that have lines terminated with \r\n and not
only \r or \n (invalid according to HTTP spec)
- Make sure the response has a double \r\n terminating the response headers
(HTTP validity requirement)
- It also needs to return a Content-Type: header (else browser has no idea
what to do and may guess)
- The Location: value should be absolute-URI (according to HTTP spec)

Browsers and some web servers are extremely lax about HTTP specifications
and allow web page authors to get away with things (which is really bad
because that destroys the value of a specification like HTTP). IIS6 CGI
will complain about the first three. The latter, you should read section
14.30 of RFC2616 for followup details.

The academic inside of me suggests that you need to read CGI and HTTP
specifications on what is necessary on a proper HTTP 302 response (which is
what you are trying to generate here). Google should help here.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Mike Swaim" <mswaim@odin.mdacc.tmc.edu> wrote in message
news:%23uwSa%23RGFHA.3376@TK2MSFTNGP12.phx.gbl...
I have a perl script that tries to do a redirect. It works fine with
IIS 5 and 5.1, but dies with 6, which complains
"The specified CGI application misbehaved by not returning a complete
set of HTTP headers."

The script returned
Status: 302 Moved
location: logon.pl?Retry=true

What else does it need to return? AFAIK, that's all that I can see it
needing to return after a couple hours of googling.

--
Mike Swaim swaim@hal-pc.org at home | Quote: "Boingie"^4 Y,W & D
MD Anderson Dept. of Biostatistics & Applied Mathematics
mpswaim@mdanderson.org or mswaim@odin.mdacc.tmc.edu at work
ICBM: 29.763N 95.363W|Disclaimer: Yeah, like I speak for MD Anderson.



Re: Redirect Error With IIS 6 by v-wzhang

v-wzhang
Wed Feb 23 02:17:14 CST 2005

Hi Mike,

You may minimize code in the script and make the problem still able
to be reproduced. Then please paste it here. I'll be glad to help you
look into it. Just as David mentioned, sometimes this kind of problem
is just a 'missing \r' or an 'extra \r' , which causes the new
http.sys rejects the content.

Thanks.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no
rights.


Re: Redirect Error With IIS 6 by John

John
Wed Feb 23 08:48:00 CST 2005

On Tue, 22 Feb 2005 12:46:35 -0800, "Mike Swaim"
<mswaim@odin.mdacc.tmc.edu> wrote:

> I have a perl script that tries to do a redirect. It works fine with
>IIS 5 and 5.1, but dies with 6, which complains
>"The specified CGI application misbehaved by not returning a complete
>set of HTTP headers."
>
>The script returned
>Status: 302 Moved
>location: logon.pl?Retry=true
>
>What else does it need to return? AFAIK, that's all that I can see it
>needing to return after a couple hours of googling.

Did you configure IIS 6 to run CGI scripts? Do any PERL scripts run on
your server? If it ran on the other server IIS5 it should run on IIS6


John Cesta

The CPU Checker - Monitors your CPU % while you sleep
LogFileManager - IIS LogFile Management Tool
WebPageChecker - Helps Maintain Server UpTime
DomainReportIt PRO - Helps Rebuild IIS
http://www.serverautomationtools.com


Re: Redirect Error With IIS 6 by Mike

Mike
Wed Feb 23 12:13:26 CST 2005

John Cesta wrote:

> Did you configure IIS 6 to run CGI scripts? Do any PERL scripts run on
> your server? If it ran on the other server IIS5 it should run on IIS6

Yes. It turns out that the problem is... Oracle! The code had an
Oracle dependancy, and once I relaxed the permissions on the Oracle
client, IIS and Perl became much happier.

--
Mike Swaim swaim@hal-pc.org at home | Quote: "Boingie"^4 Y,W & D
MD Anderson Dept. of Biostatistics & Applied Mathematics
mpswaim@mdanderson.org or mswaim@odin.mdacc.tmc.edu at work
ICBM: 29.763N 95.363W|Disclaimer: Yeah, like I speak for MD Anderson.