HTML-Mason

 view release on metacpan or  search on metacpan

lib/HTML/Mason/FakeApache.pm  view on Meta::CPAN

    my $self = shift;

    # Create the headers table if necessary. Decided how to build it based on
    # information here:
    # http://cgi-spec.golux.com/draft-coar-cgi-v11-03-clean.html#6.1
    #
    # Try to get as much info as possible from CGI.pm, which has
    # workarounds for things like the IIS PATH_INFO bug.
    #
    $self->{headers_in} ||= HTML::Mason::FakeTable->new
      ( 'Authorization'       => $self->{query}->auth_type, # No credentials though.
        'Content-Length'      => $ENV{CONTENT_LENGTH},
        'Content-Type'        =>
        ( $self->{query}->can('content_type') ?
          $self->{query}->content_type :
          $ENV{CONTENT_TYPE}
        ),
        # Convert HTTP environment variables back into their header names.
        map {
            my $k = ucfirst lc;
            $k =~ s/_(.)/-\u$1/g;

samples/dump-request  view on Meta::CPAN

<a name="auth_name">
$r->auth_name
<blockquote>
Returns a reference to the current value of the per directory
configuration directive AuthName. The AuthName directive creates
protection realm within the server document space. To quote RFC 1945
``These realms allow the protected resources on a server to be
partitioned into a set of protection spaces, each with its own
authentication scheme and/or authorization database.'' The client uses
the root URL of the server to determine which authentication
credentials to send with each HTTP request.  These credentials are
tagged with the name of the authentication realm that created
them. Then during the authentication stage the server uses the current
authentication realm, from $r->auth_name, to determine which set of
credentials to authenticate.
</blockquote>

<a name="document_root">
$r->document_root
<blockquote>
Returns a reference to the current value of the per server
configuration directive DocumentRoot. To quote the Apache server
documentation, ``Unless matched by a directive like Alias, the server
appends the path from the requested URL to the document root to make
the path to the document.'' This same value is passed to CGI scripts



( run in 0.251 second using v1.01-cache-2.11-cpan-4d50c553e7e )