Index: net/http/http_stream_parser.cc |
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc |
index eb1ed35225acc7ca55385fefa18c1ebe7f95c9ae..777a591ff20d267d0037fa02eeb683ae7ab6fba9 100644 |
--- a/net/http/http_stream_parser.cc |
+++ b/net/http/http_stream_parser.cc |
@@ -69,6 +69,9 @@ int HttpStreamParser::SendRequest(const std::string& request_line, |
make_scoped_refptr(new NetLogHttpRequestParameter( |
request_line, headers))); |
} |
+ VLOG(20) << __FUNCTION__ << "()" |
+ << " request_line = \"" << request_line << "\"" |
+ << " headers = \"" << headers.ToString() << "\""; |
Randy Smith (Not in Mondays)
2011/05/03 21:30:41
I'd be inclined to separate out pure logging chang
ahendrickson
2011/05/04 15:08:25
I find myself putting these things in every time I
|
response_ = response; |
// Put the peer's IP address and port into the response. |
@@ -556,6 +559,19 @@ int HttpStreamParser::DoReadBodyComplete(int result) { |
return result; |
} |
+static std::string GetResponseHeaderLines(const HttpResponseHeaders& headers) { |
+ std::string raw_headers = headers.raw_headers(); |
+ const char* null_separated_headers = raw_headers.c_str(); |
+ const char* header_line = null_separated_headers; |
+ std::string cr_separated_headers; |
+ while (header_line[0] != 0) { |
+ cr_separated_headers += header_line; |
+ cr_separated_headers += "\n"; |
+ header_line += strlen(header_line) + 1; |
+ } |
+ return cr_separated_headers; |
+} |
+ |
int HttpStreamParser::ParseResponseHeaders() { |
int end_offset = -1; |
@@ -619,6 +635,11 @@ int HttpStreamParser::DoParseResponseHeaders(int end_offset) { |
response_->headers = headers; |
response_->vary_data.Init(*request_, *response_->headers); |
+ VLOG(20) << __FUNCTION__ << "()" |
+ << " content_length = \"" |
+ << response_->headers->GetContentLength() << "\n\"" |
+ << " headers = \"" << GetResponseHeaderLines(*response_->headers) |
+ << "\""; |
return OK; |
} |