Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Header problem with IIS, C::A and CGI::Simple

by hakkr (Chaplain)
on Aug 19, 2005 at 08:25 UTC ( #485043=note: print w/replies, xml ) Need Help??


in reply to Header problem with IIS, C::A and CGI::Simple

When you are attempting the redirect you need to set the nph flag.
print $query->redirect(-uri=>‚http://somewhere.else/in/movie/land‚,-n +ph=>1);
from man CGI

The -nph parameter, if set to a true value, will issue the correct headers to work with a NPH (no-parse-header) script. This is important to use with certain servers, such as Microsoft Internet Explorer, which expect all their scripts to be NPH.

You can pass nph=>1 using the CGI::Application header_props(-uri=>'http://www.somewhere.com' , -nph=>1) Update - if the results page is showing the header, you are most likely printing the header out twice. Note CGI::Application usually prints headers for you

Replies are listed 'Best First'.
Re^2: Header problem with IIS, C::A and CGI::Simple
by meraxes (Friar) on Aug 19, 2005 at 12:46 UTC

    Doesn't the line:

    $self->query()->nph(1);

    Do this for me? The docs say that "You can set NPH mode in any of the following ways:" including the above. If I'm having NPH problems, would I be having this problem with all pages, not just redirects and POSTS?

    Update: I'm not directly printing out any headers. Only using header_props() and header_add(). In the result runmode I'm not even modifying any headers at all. That's why I'm so baffled.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://485043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2023-02-08 07:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?