Here's a very reduced test case of my problem code code:
#!C:\perl\bin\perl.exe use CGI; my $cgi = CGI->new; my @cookieOut; push @cookieOut, ($cgi->cookie( -name => 'id', -value => "something", -expires => '+7d', -path => '/')); print $cgi->redirect( -cookie => \@cookieOut, -location => 'productCategory.cgi' );
Apache seems to handle this just fine. Unfortunately, here's what I'm getting from IIS 4.0:
HTTP/0.9 200 OK Client-Date: Fri, 22 Dec 2000 21:02:08 GMT Client-Peer: 192.168.1.65:80 Status: 302 Moved Set-Cookie: id=something; path=/; expires=Fri, 29-Dec-2000 21:59:38 GM +T Date: Fri, 22 Dec 2000 21:59:38 GMT Location: productCategory.cgi
Notice that the Client-Peer line has an extra newline, effectively ending the headers and killing any chance of a redirect. Also, I notice that it says HTTP/0.9. If I add print $cgi->header; before the redirect (I was just testing, I know it breaks it), all of a sudden, IIS reports HTTP/1.0 -- still not to HTTP/1.1, but I have no frickin' idea what's up with that.

I need to know what's up with the extra newline in that header. Again, it works fine for Apache. Is there something in my code I can change to get this to work with IIS, or is this just a server issue?

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to IIS and Apache by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.