GoferTransport-http

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  Client now warns when retring request afer receiving a 503.
  Documented some env vars that influence retry-on-503 behaviour.

=head2 Changes in 1.015 (svn rev 11432), 16th June 2008

  Requires DBI 1.605

  Add retry with delay with exponential backoff on 503 error.
  Now check_response_hook can throw an exception hash/object
    which can control how the httpd responds to the error.
  Check Client_ip and X-Forwarded-For headers to get client ip address.
  Added set of gofer_request & gofer_response pnotes for handlers.

  Moved update_stats() call to PerlCleanupHandler.
  Improved handling of corrupt requests.
  Status now shows distribution of requests per IP address.
  Status now marks and reports duplicate requests.
  Status can now optionally show recent errors.
  Record severe transport errors via update_stats so they can be seen remotely via trace_recent.
  More detailed status reports from track_recent data.

lib/DBI/Gofer/Transport/mod_perl.pm  view on Meta::CPAN

    my $r = shift;
    my $time_received = dbi_time();
    my $headers_in = $r->headers_in;

    my ($frozen_request,  $request,  $request_serializer);
    my ($frozen_response, $response, $response_serializer);
    my $executor;

    my $http_status = SERVER_ERROR;
    my $remote_ip = $headers_in->{Client_ip}    # e.g., cisco load balancer
        || $headers_in->{'X-Forwarded-For'}     # e.g., mod_proxy (XXX may contain more than one ip)
        || $r->connection->remote_ip;

    eval {
        $executor = $self->executor_for_apache_request($r);

        my $request_content_length = $headers_in->{'Content-Length'};
        # XXX get content-type by response_content_type() meth call on serializer?
        # (need to think-through content-type, transfer-encoding, disposition etc etc
        my $response_content_type = 'application/x-perl-gofer-response-binary';
        # XXX should probably contol flow via method: GET vs POST



( run in 0.523 second using v1.01-cache-2.11-cpan-26ccb49234f )