Welcome to HostingForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Redirect Error With IIS 6

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Author Message
Mike Swaim

External


Since: Feb 22, 2005
Posts: 9



(Msg. 1) Posted: Tue Feb 22, 2005 12:46 pm
Post subject: Redirect Error With IIS 6
Archived from groups: microsoft>public>inetserver>iis (more info?)

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

 >> Stay informed about: Redirect Error With IIS 6 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 2) Posted: Tue Feb 22, 2005 4:15 pm
Post subject: Re: Redirect Error With IIS 6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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

 >> Stay informed about: Redirect Error With IIS 6 
Back to top
Login to vote
user1375

External


Since: Feb 03, 2004
Posts: 423



(Msg. 3) Posted: Wed Feb 23, 2005 4:35 am
Post subject: Re: Redirect Error With IIS 6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
 >> Stay informed about: Redirect Error With IIS 6 
Back to top
Login to vote
lists

External


Since: Apr 22, 2004
Posts: 390



(Msg. 4) Posted: Wed Feb 23, 2005 10:35 am
Post subject: Re: Redirect Error With IIS 6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 22 Feb 2005 12:46:35 -0800, "Mike Swaim"
<mswaim.TakeThisOut@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
<a style='text-decoration: underline;' href="http://www.serverautomationtools.com" target="_blank">http://www.serverautomationtools.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirect Error With IIS 6 
Back to top
Login to vote
Mike Swaim

External


Since: Feb 22, 2005
Posts: 9



(Msg. 5) Posted: Wed Feb 23, 2005 10:35 am
Post subject: Re: Redirect Error With IIS 6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 RemoveThis @hal-pc.org at home | Quote: "Boingie"^4 Y,W & D
MD Anderson Dept. of Biostatistics & Applied Mathematics
mpswaim RemoveThis @mdanderson.org or mswaim RemoveThis @odin.mdacc.tmc.edu at work
ICBM: 29.763N 95.363W|Disclaimer: Yeah, like I speak for MD Anderson.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Redirect Error With IIS 6 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]