Chromium Code Reviews| Index: google_apis/drive/base_requests.cc |
| diff --git a/google_apis/drive/base_requests.cc b/google_apis/drive/base_requests.cc |
| index d1aa60d92996300b6d203d0dee5ee8fdbe826858..6c4c01f0fec06694b0ddb21bb52c3f5ab46eb8bd 100644 |
| --- a/google_apis/drive/base_requests.cc |
| +++ b/google_apis/drive/base_requests.cc |
| @@ -95,18 +95,14 @@ void ParseJsonOnBlockingPool( |
| // Returns response headers as a string. Returns a warning message if |
| // |url_fetcher| does not contain a valid response. Used only for debugging. |
| std::string GetResponseHeadersAsString(const URLFetcher* url_fetcher) { |
| - // net::HttpResponseHeaders::raw_headers(), as the name implies, stores |
| - // all headers in their raw format, i.e each header is null-terminated. |
| - // So logging raw_headers() only shows the first header, which is probably |
| - // the status line. GetNormalizedHeaders, on the other hand, will show all |
| - // the headers, one per line, which is probably what we want. |
| std::string headers; |
| // Check that response code indicates response headers are valid (i.e. not |
| // malformed) before we retrieve the headers. |
| if (url_fetcher->GetResponseCode() == URLFetcher::RESPONSE_CODE_INVALID) { |
| headers.assign("Response headers are malformed!!"); |
| } else { |
| - url_fetcher->GetResponseHeaders()->GetNormalizedHeaders(&headers); |
| + headers.assign(net::HttpUtil::ConvertHeadersBackToHTTPResponse( |
|
eroman
2017/02/02 03:14:12
Please use assignment here instead:
headers = Co
tfarina
2017/02/13 10:30:26
Done.
|
| + url_fetcher->GetResponseHeaders()->raw_headers())); |
| } |
| return headers; |
| } |