<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>Headers HTTP</TITLE>
</HEAD><BODY>
<H1>Headers HTTP</H1>
<H2>X-Host, X-Forwarded-For</H2>
<a href="http://www.cwinters.com/news/display/?news_id=1035">mod_proxy_add_forward no longer necessary</a><p>
"As you may know then the proxy module in httpd 2.0 incorporates the X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server functionality of mod_proxy_add_forward.c. I just noticed that Thomas Eibner got the proxy people to put it into apache 1.3 too since 1.3.25."<p>
$r->header_in('X-Forwarded-For') = <% $r->header_in('X-Forwarded-For') %><P>
$r->header_in('X-Forwarded-Host') = <% $r->header_in('X-Forwarded-Host') %><P>
Same, port-less = <% $domain %><P>
$r->header_in('X-Forwarded-Server') = <% $r->header_in('X-Forwarded-Server') %><P>
$r->header_in('X-Host') = <% $r->header_in('X-Host') %><P>

<H2>Divers</H2>
$r->uri = <% $r->uri |h %><P>
$r->the_request = <% $r->the_request |h %><P>
$r->args = <% scalar($r->args) |h %><P>
_session_id = <% $session{_session_id} %><P>

<H2>Tous les headers</H2>

<pre>
<% Data::Dumper->Dump([\%{$r->headers_in()}], ['$r->headers_in()']) |h %>
</pre>
</BODY></HTML>

<H2>Environnement</H2>

<pre>
<% Data::Dumper->Dump([\%ENV], ['ENV']) |h %>
</pre>
</BODY></HTML>

<%once>
    my $domain = $r->header_in('X-Forwarded-Host');
    $domain =~ s/:\d+$//;
</%once>
