diff options
author | franck cuny <franck@lumberjaph.net> | 2011-07-22 13:52:07 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2011-07-26 13:21:02 +0200 |
commit | 54a6366ad2a534346224ff970d4c62d2f2899868 (patch) | |
tree | fd9f30bffdf0223b13e90f16a690e78679c13f0a | |
parent | add query_string to debug (diff) | |
download | net-http-spore-54a6366ad2a534346224ff970d4c62d2f2899868.tar.gz |
debug string if defined
Signed-off-by: franck cuny <franck@lumberjaph.net>
-rw-r--r-- | lib/Net/HTTP/Spore/Role/Request.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Net/HTTP/Spore/Role/Request.pm b/lib/Net/HTTP/Spore/Role/Request.pm index 0a958b9..9e24e30 100644 --- a/lib/Net/HTTP/Spore/Role/Request.pm +++ b/lib/Net/HTTP/Spore/Role/Request.pm @@ -88,9 +88,13 @@ sub _debug_request { my ( $self, $request, $finalized_request ) = @_; return unless $self->trace; - $self->_trace_msg( '> %s %s', $request->method, $request->path ); + $self->_trace_msg( '> %s %s%s', $request->method, $request->script_name, $request->path ); $self->_trace_msg( '> Host: %s', $request->host ); - $self->_trace_msg( '> Query String: %s', $request->env->{QUERY_STRING}); + $self->_trace_msg( '> Query String: %s', $request->env->{QUERY_STRING} ) + if defined $request->env->{QUERY_STRING}; + $self->_trace_msg( '> Content: %s', $request->content ) + if defined $request->content; + foreach my $key ( $request->headers->header_field_names ) { $self->_trace_msg( '> %s: %s', $key, $request->header($key) ); } |