X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Engine-SCGI.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FSCGI.pm;fp=lib%2FCatalyst%2FEngine%2FSCGI.pm;h=3b6fb8b039b40f977bcc79e2d2c33a9a44def512;hp=808dfddd111087a5fb3e11e6c74e72f4fbe0884c;hb=e069caf51a25bc0e2a82b874c7aa4655c1bba0d0;hpb=a07bd93d5e256cda6c11a049e6b450ccaaff747b diff --git a/lib/Catalyst/Engine/SCGI.pm b/lib/Catalyst/Engine/SCGI.pm index 808dfdd..3b6fb8b 100644 --- a/lib/Catalyst/Engine/SCGI.pm +++ b/lib/Catalyst/Engine/SCGI.pm @@ -86,51 +86,6 @@ sub write { $self->{_request}->connection->print($buffer); } -=head2 $self->prepare_path($c) - -=cut -sub prepare_path { - my ( $self, $c ) = @_; - local (*ENV) = $self->env || \%ENV; - - my $scheme = $c->request->secure ? 'https' : 'http'; - my $host = $ENV{HTTP_HOST} || $ENV{SERVER_NAME}; - my $port = $ENV{SERVER_PORT} || 80; - my $base_path; - if ( exists $ENV{REDIRECT_URL} ) { - $base_path = $ENV{REDIRECT_URL}; - $base_path =~ s/$ENV{PATH_INFO}$//; - } - else { - $base_path = $ENV{SCRIPT_NAME} || '/'; - } - - my $path = $base_path . ( $ENV{PATH_INFO} || '' ); - $path =~ s{^/+}{}; - - my $uri = $uri_proto->clone; - $uri->scheme($scheme); - $uri->host($host); - $uri->port($port); - $uri->path($path); - $uri->query( $ENV{QUERY_STRING} ) if $ENV{QUERY_STRING}; - - # sanitize the URI - $uri = $uri->canonical; - $c->request->uri($uri); - - # set the base URI - # base must end in a slash - $base_path .= '/' unless ( $base_path =~ /\/$/ ); - my $base = $uri->clone; - - my ($base_uri) = $base_path=~ /(.*?)\//; - $base_uri .= '/' unless ($base_uri =~/\/$/ ); - - $base->path_query($base_uri); - $c->request->base($base); -} - =head2 $self->read_chunk ( $c, $buffer, $readlen ) Read Body content to $_[3]'s set length and direct output to $_[2].