Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Greetings all,

tye had a really interesting idea he told me via Chatterbox. He said I should try making the script a non-parsed headers script and feed in my own HTTP headers manually. I did so, and now all my HTTP headers appear to be "correct" (i.e. incorrect intentionally).

Problem is, it doesn't appear to work when I try this using CGI.pm, but only as a flat series of lines.

#!/usr/bin/perl use strict; use warnings; =pod use CGI; my $cgi = new CGI; print $cgi->header( -nph => 1, -type => 'text/html; charset=ISO-8859-1', -cache_control => 'private', -connection => 'close', -server => 'Microsoft-IIS/6.0' ); =cut print <<ENDOFHTML; HTTP/1.1 200 OK Cache-Control: private Date: Mon, 14 Oct 2002 21:41:25 GMT Server: Microsoft-IIS/6.0 Content-Length: 31000 Content-Type: text/html Expires: Mon, 25 Oct 2010 21:21:21 GMT P3P: CP='ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo +OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI' <HTML><HEAD><!-- the rest of the html document -->

The problem is that NetCraft is still reporting me running Apache. However, after some reading on their site, I get the feeling (backed by no real evidence) that they query for new site data on a daily basis. So perhaps by tomorrow, my problems will be solved.

gryphon
code('Perl') || die;


In reply to Re: Altering "Server" HTTP Header Param by gryphon
in thread Altering "Server" HTTP Header Param by gryphon

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (2)
    As of 2020-04-10 06:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The most amusing oxymoron is:
















      Results (49 votes). Check out past polls.

      Notices?