Created
April 27, 2010 22:25
-
-
Save jnareb/381428 to your computer and use it in GitHub Desktop.
bug in plackup running gitweb via WrapCGI, fixed in CGI::Emulate::PSGI 0.07
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP::Message content must be bytes at /home/jnareb/perl5/lib/perl5/CGI/Parse/PSGI.pm line 55 | |
1. in Plack::Middleware::StackTrace::__ANON__ at /usr/lib/perl5/5.8.6/Carp.pm line 269 | |
266: # or simply report the caller's package (croak() and carp()), respectively. | |
267: # confess() and croak() die, carp() and cluck() warn. | |
268: | |
269: sub croak { die shortmess @_ } | |
270: sub confess { die longmess @_ } | |
271: sub carp { warn shortmess @_ } | |
272: sub cluck { warn longmess @_ } | |
Show function arguments | |
$_[0] 'HTTP::Message content must be bytes at /home/jnareb/perl5/lib/perl5/CGI/Parse/PSGI.pm line 55 ' | |
2. in Carp::croak at /home/jnareb/perl5/lib/perl5/HTTP/Message.pm line 16 | |
13: | |
14: *_utf8_downgrade = defined(&utf8::downgrade) ? | |
15: sub { | |
16: utf8::downgrade($_[0], 1) or | |
17: Carp::croak("HTTP::Message content must be bytes") | |
18: } | |
19: : | |
Show function arguments | |
$_[0] 'HTTP::Message content must be bytes' | |
3. in HTTP::Message::__ANON__ at /home/jnareb/perl5/lib/perl5/HTTP/Message.pm line 156 | |
153: my $chunkref = \$_[0]; | |
154: $chunkref = $$chunkref if ref($$chunkref); # legacy | |
155: | |
156: _utf8_downgrade($$chunkref); | |
157: | |
158: my $ref = ref($self->{_content}); | |
159: if (!$ref) { | |
Show function arguments | |
$_[0] "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\">\n<!-- git web interface version 1.7.1.2.g994f3, (C) 2005-2006, Kay Sievers <kay.sievers\@vrfy.org>, Christian Gierke -->\n<!-- git core binaries version 1.7.1.rc2.16.gee7d4 -->\n<head>\n<meta http-equiv=\"content-type\" content=\"application/xhtml+xml; charset=utf-8\"/>\n<meta name=\"generator\" content=\"gitweb/1.7.1.2.g994f3 git/1.7.1.rc2.16.gee7d4\"/>\n<meta name=\"robots\" content=\"index, nofollow\"/>\n<title>Untitled Git</title>\n<base href=\"http://127.0.0.1:1234\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/gitweb/gitweb.css\"/>\n<link rel=\"alternate\" title=\"Untitled Git projects list\" href=\"?a=project_index\" type=\"text/plain; charset=utf-8\" />\n<link rel=\"alternate\" title=\"Untitled Git projects feeds\" href=\"?a=opml\" type=\"text/x-opml\" />\n<link rel=\"shortcut icon\" href=\"/gitweb/git-favicon.png\" type=\"image/png\" />\n</head>\n<body>\n<div class=\"page_header\">\n<a title=\"git homepage\" href=\"http://git-scm.com/\"><img src=\"/gitweb/git-logo.png\" width=\"72\" height=\"27\" alt=\"git\" class=\"logo\"/></a><a href=\"/\">projects</a> / </div>\n<div class=\"index_include\">\n<p>\nFor more information about <a href=\"http://www.kernel.org/pub/software/scm/git/\">git</a>, see an \n<a href=\"http://git.or.cz/\">overview</a> (homepage), the \n\n<a href=\"http://www.kernel.org/pub/software/scm/git/docs/user-manual.html\">Git User's Manual</a>\n or the \n<a href=\"http://www.kernel.org/pub/software/scm/git/docs\">man pages</a>.\n</p>\n</div>\n<form method=\"get\" action=\"/\" enctype=\"application/x-www-form-urlencoded\">\n<p class=\"projsearch\">Search:\n<input type=\"text\" name=\"s\" tabindex=\"1\" />\n</p><div></div>\n</form>\n<table class=\"project_list\">\n<tr>\n<th>Project</th>\n<th><a class=\"header\" href=\"?o=descr\">Description</a></th>\n<th><a class=\"header\" href=\"?o=owner\">Owner</a></th>\n<th><a class=\"header\" href=\"?o=age\">Last Change</a></th>\n<th></th>\n</tr>\n<tr class=\"dark\">\n<td><a class=\"list\" href=\"?p=.git;a=summary\">.git</a></td>\n<td><a class=\"list\" title=\"git with Jakub Nar\x{119}bski modifications, local copy.\" href=\"?p=.git;a=summary\">git with Jakub Nar\x{119}bski modifi... </a></td>\n<td><i>Jakub Narebski</i></td>\n<td class=\"age0\">20 min ago</td>\n<td class=\"link\"><a href=\"?p=.git;a=summary\">summary</a> | <a href=\"?p=.git;a=shortlog\">shortlog</a> | <a href=\"?p=.git;a=log\">log</a> | <a href=\"?p=.git;a=tree\">tree</a></td>\n</tr>\n<tr class=\"light\">\n<td><a class=\"list\" href=\"?p=gitweb/.git;a=summary\">gitweb/.git</a></td>\n<td><a class=\"list\" title=\"Unnamed repository; edit this file to name it for gitweb.\" href=\"?p=gitweb/.git;a=summary\">Unnamed repository; edit this... </a></td>\n<td><i>Jakub Narebski</i></td>\n<td class=\"age2\">3 months ago</td>\n<td class=\"link\"><a href=\"?p=gitweb/.git;a=summary\">summary</a> | <a href=\"?p=gitweb/.git;a=shortlog\">shortlog</a> | <a href=\"?p=gitweb/.git;a=log\">log</a> | <a href=\"?p=gitweb/.git;a=tree\">tree</a></td>\n</tr>\n</table>\n<div class=\"page_footer\">\n<a class=\"rss_logo\" href=\"?a=opml\">OPML</a> <a class=\"rss_logo\" href=\"?a=project_index\">TXT</a>\n</div>\n<script type=\"text/javascript\" src=\"/gitweb/gitweb.js\"></script>\n</body>\n</html>" | |
4. in HTTP::Message::add_content at /home/jnareb/perl5/lib/perl5/CGI/Parse/PSGI.pm line 55 | |
52: my $length = 0; | |
53: while ( $output->read( my $buffer, 4096 ) ) { | |
54: $length += length($buffer); | |
55: $response->add_content($buffer); | |
56: } | |
57: | |
58: if ( $length && !$response->content_length ) { | |
Show function arguments | |
$_[0] bless( { '_protocol' => 'HTTP/1.1', '_content' => '', '_rc' => 200, '_headers' => bless( { 'content-type' => 'application/xhtml+xml', 'date' => 'Tue, 27 Apr 2010 22:22:39 GMT', 'status' => '200 OK' }, 'HTTP::Headers' ), '_msg' => 'OK ' }, 'HTTP::Response' ) | |
$_[1] "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\">\n<!-- git web interface version 1.7.1.2.g994f3, (C) 2005-2006, Kay Sievers <kay.sievers\@vrfy.org>, Christian Gierke -->\n<!-- git core binaries version 1.7.1.rc2.16.gee7d4 -->\n<head>\n<meta http-equiv=\"content-type\" content=\"application/xhtml+xml; charset=utf-8\"/>\n<meta name=\"generator\" content=\"gitweb/1.7.1.2.g994f3 git/1.7.1.rc2.16.gee7d4\"/>\n<meta name=\"robots\" content=\"index, nofollow\"/>\n<title>Untitled Git</title>\n<base href=\"http://127.0.0.1:1234\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/gitweb/gitweb.css\"/>\n<link rel=\"alternate\" title=\"Untitled Git projects list\" href=\"?a=project_index\" type=\"text/plain; charset=utf-8\" />\n<link rel=\"alternate\" title=\"Untitled Git projects feeds\" href=\"?a=opml\" type=\"text/x-opml\" />\n<link rel=\"shortcut icon\" href=\"/gitweb/git-favicon.png\" type=\"image/png\" />\n</head>\n<body>\n<div class=\"page_header\">\n<a title=\"git homepage\" href=\"http://git-scm.com/\"><img src=\"/gitweb/git-logo.png\" width=\"72\" height=\"27\" alt=\"git\" class=\"logo\"/></a><a href=\"/\">projects</a> / </div>\n<div class=\"index_include\">\n<p>\nFor more information about <a href=\"http://www.kernel.org/pub/software/scm/git/\">git</a>, see an \n<a href=\"http://git.or.cz/\">overview</a> (homepage), the \n\n<a href=\"http://www.kernel.org/pub/software/scm/git/docs/user-manual.html\">Git User's Manual</a>\n or the \n<a href=\"http://www.kernel.org/pub/software/scm/git/docs\">man pages</a>.\n</p>\n</div>\n<form method=\"get\" action=\"/\" enctype=\"application/x-www-form-urlencoded\">\n<p class=\"projsearch\">Search:\n<input type=\"text\" name=\"s\" tabindex=\"1\" />\n</p><div></div>\n</form>\n<table class=\"project_list\">\n<tr>\n<th>Project</th>\n<th><a class=\"header\" href=\"?o=descr\">Description</a></th>\n<th><a class=\"header\" href=\"?o=owner\">Owner</a></th>\n<th><a class=\"header\" href=\"?o=age\">Last Change</a></th>\n<th></th>\n</tr>\n<tr class=\"dark\">\n<td><a class=\"list\" href=\"?p=.git;a=summary\">.git</a></td>\n<td><a class=\"list\" title=\"git with Jakub Nar\x{119}bski modifications, local copy.\" href=\"?p=.git;a=summary\">git with Jakub Nar\x{119}bski modifi... </a></td>\n<td><i>Jakub Narebski</i></td>\n<td class=\"age0\">20 min ago</td>\n<td class=\"link\"><a href=\"?p=.git;a=summary\">summary</a> | <a href=\"?p=.git;a=shortlog\">shortlog</a> | <a href=\"?p=.git;a=log\">log</a> | <a href=\"?p=.git;a=tree\">tree</a></td>\n</tr>\n<tr class=\"light\">\n<td><a class=\"list\" href=\"?p=gitweb/.git;a=summary\">gitweb/.git</a></td>\n<td><a class=\"list\" title=\"Unnamed repository; edit this file to name it for gitweb.\" href=\"?p=gitweb/.git;a=summary\">Unnamed repository; edit this... </a></td>\n<td><i>Jakub Narebski</i></td>\n<td class=\"age2\">3 months ago</td>\n<td class=\"link\"><a href=\"?p=gitweb/.git;a=summary\">summary</a> | <a href=\"?p=gitweb/.git;a=shortlog\">shortlog</a> | <a href=\"?p=gitweb/.git;a=log\">log</a> | <a href=\"?p=gitweb/.git;a=tree\">tree</a></td>\n</tr>\n</table>\n<div class=\"page_footer\">\n<a class=\"rss_logo\" href=\"?a=opml\">OPML</a> <a class=\"rss_logo\" href=\"?a=project_index\">TXT</a>\n</div>\n<script type=\"text/javascript\" src=\"/gitweb/gitweb.js\"></script>\n</body>\n</html>" | |
5. in CGI::Parse::PSGI::parse_cgi_output at /home/jnareb/perl5/lib/perl5/CGI/Emulate/PSGI.pm line 34 | |
31: seek( $stdout, 0, SEEK_SET ) | |
32: or croak("Can't seek stdout handle: $!"); | |
33: | |
34: return CGI::Parse::PSGI::parse_cgi_output($stdout); | |
35: }; | |
36: } | |
37: | |
Show function arguments | |
$_[0] bless( \*IO::File::_GEN_0, 'IO::File' ) | |
6. in CGI::Emulate::PSGI::__ANON__ at /home/jnareb/perl5/lib/perl5/Plack/App/WrapCGI.pm line 23 | |
20: | |
21: sub call { | |
22: my($self, $env) = @_; | |
23: $self->_app->($env); | |
24: } | |
25: | |
26: 1; | |
Show function arguments | |
$_[0] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
7. in Plack::App::WrapCGI::call at /home/jnareb/perl5/lib/perl5/Plack/Component.pm line 39 | |
36: sub to_app { | |
37: my $self = shift; | |
38: $self->prepare_app; | |
39: return sub { $self->call(@_) }; | |
40: } | |
41: | |
42: | |
Show function arguments | |
$_[0] bless( { 'script' => '/home/jnareb/git/.git/gitweb/gitweb.cgi', '_app' => sub { package CGI::Emulate::PSGI; use warnings; use strict 'refs'; my $env = shift @_; my $stdout = 'IO::File'->new_tmpfile; { local(%ENV) = (%ENV, $class->emulate_environment($env)); local *STDIN = $$env{'psgi.input'}; local *STDOUT = $stdout; local *STDERR = $$env{'psgi.errors'}; my $saver = 'SelectSaver'->new('::STDOUT'); &$code(); } croak("Can't seek stdout handle: $!") unless seek $stdout, 0, SEEK_SET(); return CGI::Parse::PSGI::parse_cgi_output($stdout); } }, 'Plack::App::WrapCGI' ) | |
$_[1] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
8. in Plack::Component::__ANON__ at /home/jnareb/perl5/lib/perl5/Plack/Middleware/StackTrace.pm line 27 | |
24: }; | |
25: | |
26: my $caught; | |
27: my $res = try { $self->app->($env) } catch { $caught = $_ }; | |
28: | |
29: if ($trace && ($caught || $self->{force} && ref $res eq 'ARRAY' && $res->[0] == 500) ) { | |
30: if (($env->{HTTP_ACCEPT} || '*/*') =~ /html/) { | |
Show function arguments | |
$_[0] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
9. in Plack::Middleware::StackTrace::__ANON__ at /home/jnareb/perl5/lib/perl5/Try/Tiny.pm line 71 | |
68: $@ = $prev_error; | |
69: | |
70: # evaluate the try block in the correct context | |
71: if ( $wantarray ) { | |
72: @ret = $try->(); | |
73: } elsif ( defined $wantarray ) { | |
74: $ret[0] = $try->(); | |
10. in (eval) at /home/jnareb/perl5/lib/perl5/Try/Tiny.pm line 67 | |
64: | |
65: # failed will be true if the eval dies, because 1 will not be returned | |
66: # from the eval body | |
67: $failed = not eval { | |
68: $@ = $prev_error; | |
69: | |
70: # evaluate the try block in the correct context | |
11. in Try::Tiny::try at /home/jnareb/perl5/lib/perl5/Plack/Middleware/StackTrace.pm line 27 | |
24: }; | |
25: | |
26: my $caught; | |
27: my $res = try { $self->app->($env) } catch { $caught = $_ }; | |
28: | |
29: if ($trace && ($caught || $self->{force} && ref $res eq 'ARRAY' && $res->[0] == 500) ) { | |
30: if (($env->{HTTP_ACCEPT} || '*/*') =~ /html/) { | |
Show function arguments | |
$_[0] sub { package Plack::Middleware::StackTrace; use warnings; use strict 'refs'; $self->app->($env); } | |
$_[1] bless( do{\(my $o = sub { package Plack::Middleware::StackTrace; use warnings; use strict 'refs'; $caught = $_; })}, 'Try::Tiny::Catch' ) | |
12. in Plack::Middleware::StackTrace::call at /home/jnareb/perl5/lib/perl5/Plack/Component.pm line 39 | |
36: sub to_app { | |
37: my $self = shift; | |
38: $self->prepare_app; | |
39: return sub { $self->call(@_) }; | |
40: } | |
41: | |
42: | |
Show function arguments | |
$_[0] bless( { 'app' => sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } }, 'Plack::Middleware::StackTrace' ) | |
$_[1] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
13. in Plack::Component::__ANON__ at /home/jnareb/perl5/lib/perl5/Plack/Middleware/AccessLog.pm line 21 | |
18: my $self = shift; | |
19: my($env) = @_; | |
20: | |
21: my $res = $self->app->($env); | |
22: | |
23: return $self->response_cb($res, sub { | |
24: my $res = shift; | |
Show function arguments | |
$_[0] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
14. in Plack::Middleware::AccessLog::call at /home/jnareb/perl5/lib/perl5/Plack/Component.pm line 39 | |
36: sub to_app { | |
37: my $self = shift; | |
38: $self->prepare_app; | |
39: return sub { $self->call(@_) }; | |
40: } | |
41: | |
42: | |
Show function arguments | |
$_[0] bless( { 'app' => sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); }, 'logger' => sub { package Plack::Runner; use warnings; use strict 'refs'; print STDERR @_; } }, 'Plack::Middleware::AccessLog' ) | |
$_[1] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
15. in Plack::Component::__ANON__ at /home/jnareb/perl5/lib/perl5/Plack/Middleware/ContentLength.pm line 10 | |
7: | |
8: sub call { | |
9: my $self = shift; | |
10: my $res = $self->app->(@_); | |
11: | |
12: return $self->response_cb($res, sub { | |
13: my $res = shift; | |
Show function arguments | |
$_[0] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
16. in Plack::Middleware::ContentLength::call at /home/jnareb/perl5/lib/perl5/Plack/Component.pm line 39 | |
36: sub to_app { | |
37: my $self = shift; | |
38: $self->prepare_app; | |
39: return sub { $self->call(@_) }; | |
40: } | |
41: | |
42: | |
Show function arguments | |
$_[0] bless( { 'app' => sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } }, 'Plack::Middleware::ContentLength' ) | |
$_[1] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
17. in Plack::Component::__ANON__ at /home/jnareb/perl5/lib/perl5/Plack/Util.pm line 131 | |
128: sub run_app($$) { | |
129: my($app, $env) = @_; | |
130: | |
131: return eval { $app->($env) } || do { | |
132: my $body = "Internal Server Error"; | |
133: $env->{'psgi.errors'}->print($@); | |
134: [ 500, [ 'Content-Type' => 'text/plain', 'Content-Length' => length($body) ], [ $body ] ]; | |
Show function arguments | |
$_[0] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
18. in (eval) at /home/jnareb/perl5/lib/perl5/Plack/Util.pm line 131 | |
128: sub run_app($$) { | |
129: my($app, $env) = @_; | |
130: | |
131: return eval { $app->($env) } || do { | |
132: my $body = "Internal Server Error"; | |
133: $env->{'psgi.errors'}->print($@); | |
134: [ 500, [ 'Content-Type' => 'text/plain', 'Content-Length' => length($body) ], [ $body ] ]; | |
19. in Plack::Util::run_app at /home/jnareb/perl5/lib/perl5/HTTP/Server/PSGI.pm line 144 | |
141: $env->{'psgi.input'} = $input; | |
142: } | |
143: | |
144: $res = Plack::Util::run_app $app, $env; | |
145: last; | |
146: } | |
147: if ($reqlen == -2) { | |
Show function arguments | |
$_[0] sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } | |
$_[1] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
20. in HTTP::Server::PSGI::handle_connection at /home/jnareb/perl5/lib/perl5/HTTP/Server/PSGI.pm line 105 | |
102: 'psgix.io' => $conn, | |
103: }; | |
104: | |
105: $self->handle_connection($env, $conn, $app); | |
106: $conn->close; | |
107: } | |
108: } | |
Show function arguments | |
$_[0] bless( { 'max_reqs_per_child' => 100, 'server_software' => 'HTTP::Server::PSGI', 'server_ready' => sub { package Plack::Runner; use warnings; use strict 'refs'; my($args) = @_; my $name = $$args{'server_software'} || ref $args; my $host = $$args{'host'} || 0; print STDERR "${name}: Accepting connections at http://${host}:$$args{'port'}/\n"; }, 'timeout' => 300, 'listen_sock' => bless( \*Symbol::GEN0, 'IO::Socket::INET' ), 'port' => 1234, 'host' => 0 }, 'HTTP::Server::PSGI' ) | |
$_[1] { 'psgi.multiprocess' => '', 'SCRIPT_NAME' => '', 'SERVER_NAME' => 0, 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'HTTP_CONNECTION' => 'keep-alive', 'PATH_INFO' => '/', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'REQUEST_METHOD' => 'GET', 'psgi.multithread' => '', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 MultiZilla/1.7.9.0a', 'QUERY_STRING' => '', 'SERVER_PORT' => 1234, 'psgix.input.buffered' => 1, 'HTTP_ACCEPT_LANGUAGE' => 'pl,en;q=0.7,en-us;q=0.3', 'REMOTE_ADDR' => '127.0.0.1', 'HTTP_KEEP_ALIVE' => 300, 'SERVER_PROTOCOL' => 'HTTP/1.1', 'psgi.streaming' => 1, 'psgi.errors' => *::STDERR, 'REQUEST_URI' => '/', 'psgi.version' => [ 1, 1 ], 'psgi.nonblocking' => '', 'psgix.io' => bless( \*Symbol::GEN1, 'IO::Socket::INET' ), 'psgi.url_scheme' => 'http', 'psgi.run_once' => '', 'HTTP_HOST' => '127.0.0.1:1234', 'psgi.input' => \*{'HTTP::Server::PSGI::$input'} } | |
$_[2] bless( \*Symbol::GEN1, 'IO::Socket::INET' ) | |
$_[3] sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } | |
21. in HTTP::Server::PSGI::accept_loop at /home/jnareb/perl5/lib/perl5/HTTP/Server/PSGI.pm line 59 | |
56: sub run { | |
57: my($self, $app) = @_; | |
58: $self->setup_listener(); | |
59: $self->accept_loop($app); | |
60: } | |
61: | |
62: sub setup_listener { | |
Show function arguments | |
$_[0] bless( { 'max_reqs_per_child' => 100, 'server_software' => 'HTTP::Server::PSGI', 'server_ready' => sub { package Plack::Runner; use warnings; use strict 'refs'; my($args) = @_; my $name = $$args{'server_software'} || ref $args; my $host = $$args{'host'} || 0; print STDERR "${name}: Accepting connections at http://${host}:$$args{'port'}/\n"; }, 'timeout' => 300, 'listen_sock' => bless( \*Symbol::GEN0, 'IO::Socket::INET' ), 'port' => 1234, 'host' => 0 }, 'HTTP::Server::PSGI' ) | |
$_[1] sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } | |
22. in HTTP::Server::PSGI::run at /home/jnareb/perl5/lib/perl5/Plack/Handler/HTTP/Server/PSGI.pm line 14 | |
11: | |
12: sub run { | |
13: my($self, $app) = @_; | |
14: $self->_server->run($app); | |
15: } | |
16: | |
17: sub _server { | |
Show function arguments | |
$_[0] bless( { 'max_reqs_per_child' => 100, 'server_software' => 'HTTP::Server::PSGI', 'server_ready' => sub { package Plack::Runner; use warnings; use strict 'refs'; my($args) = @_; my $name = $$args{'server_software'} || ref $args; my $host = $$args{'host'} || 0; print STDERR "${name}: Accepting connections at http://${host}:$$args{'port'}/\n"; }, 'timeout' => 300, 'listen_sock' => bless( \*Symbol::GEN0, 'IO::Socket::INET' ), 'port' => 1234, 'host' => 0 }, 'HTTP::Server::PSGI' ) | |
$_[1] sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } | |
23. in Plack::Handler::HTTP::Server::PSGI::run at /home/jnareb/perl5/lib/perl5/Plack/Loader.pm line 83 | |
80: | |
81: sub run { | |
82: my($self, $server, $builder) = @_; | |
83: $server->run($self->{app}); | |
84: } | |
85: | |
86: 1; | |
Show function arguments | |
$_[0] bless( { 'listen' => [ ':1234' ], 'server_ready' => sub { package Plack::Runner; use warnings; use strict 'refs'; my($args) = @_; my $name = $$args{'server_software'} || ref $args; my $host = $$args{'host'} || 0; print STDERR "${name}: Accepting connections at http://${host}:$$args{'port'}/\n"; }, 'port' => 1234, 'host' => undef, 'socket' => undef }, 'Plack::Handler::Standalone' ) | |
$_[1] sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } | |
24. in Plack::Loader::run at /home/jnareb/perl5/lib/perl5/Plack/Runner.pm line 238 | |
235: $loader->preload_app($app); | |
236: | |
237: my $server = $self->load_server($loader); | |
238: $loader->run($server); | |
239: } | |
240: | |
241: 1; | |
Show function arguments | |
$_[0] bless( { 'app' => sub { package Plack::Component; use warnings; use strict 'refs'; $self->call(@_); } }, 'Plack::Loader' ) | |
$_[1] bless( { 'listen' => [ ':1234' ], 'server_ready' => sub { package Plack::Runner; use warnings; use strict 'refs'; my($args) = @_; my $name = $$args{'server_software'} || ref $args; my $host = $$args{'host'} || 0; print STDERR "${name}: Accepting connections at http://${host}:$$args{'port'}/\n"; }, 'port' => 1234, 'host' => undef, 'socket' => undef }, 'Plack::Handler::Standalone' ) | |
25. in Plack::Runner::run at /home/jnareb/perl5/bin/plackup line 11 | |
8: | |
9: my $runner = Plack::Runner->new; | |
10: $runner->parse_options(@ARGV); | |
11: $runner->run; | |
12: | |
13: __END__ | |
14: | |
Show function arguments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment