in reply to Get the order of HTTP request headers
If you're using mod_perl registy scripts, something like the following might give you what you want:
#!/usr/bin/perl # use strict; use warnings; use Apache2::RequestUtil; use Apache2::RequestRec; $| = 1; print "Content-type: text/plain\n\n"; my $r = Apache2::RequestUtil->request; print $r->as_string();
On my system, this produces:
GET /test.pl HTTP/1.1 Host: directory.localhost User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/ +20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0. +8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cache-Control: max-age=0 HTTP/1.1 (null)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Get the order of HTTP request headers
by arc_of_descent (Hermit) on May 05, 2010 at 11:28 UTC | |
by Anonymous Monk on May 05, 2010 at 11:38 UTC | |
by ig (Vicar) on May 06, 2010 at 08:08 UTC |
In Section
Seekers of Perl Wisdom