http://qs321.pair.com?node_id=485043


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.