summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_alternate_protocols.cc2
-rw-r--r--net/http/http_auth.cc4
-rw-r--r--net/http/http_auth_controller.cc6
-rw-r--r--net/http/http_auth_gssapi_posix.cc24
-rw-r--r--net/http/http_auth_handler_digest.cc6
-rw-r--r--net/http/http_auth_handler_negotiate.cc6
-rw-r--r--net/http/http_auth_sspi_win.cc8
-rw-r--r--net/http/http_cache_transaction.cc8
-rw-r--r--net/http/http_chunked_decoder.cc17
-rw-r--r--net/http/http_chunked_decoder.h10
-rw-r--r--net/http/http_response_headers.cc18
11 files changed, 54 insertions, 55 deletions
diff --git a/net/http/http_alternate_protocols.cc b/net/http/http_alternate_protocols.cc
index e37af69..3e6b488 100644
--- a/net/http/http_alternate_protocols.cc
+++ b/net/http/http_alternate_protocols.cc
@@ -73,7 +73,7 @@ void HttpAlternateProtocols::SetAlternateProtocolFor(
GetAlternateProtocolFor(http_host_port_pair);
if (existing_alternate.protocol == BROKEN) {
- DLOG(INFO) << "Ignore alternate protocol since it's known to be broken.";
+ DVLOG(1) << "Ignore alternate protocol since it's known to be broken.";
return;
}
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index a415185..ddd099c 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -42,8 +42,8 @@ void HttpAuth::ChooseBestChallenge(
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
cur_challenge, target, origin, net_log, &cur);
if (rv != OK) {
- LOG(INFO) << "Unable to create AuthHandler. Status: "
- << ErrorToString(rv) << " Challenge: " << cur_challenge;
+ VLOG(1) << "Unable to create AuthHandler. Status: "
+ << ErrorToString(rv) << " Challenge: " << cur_challenge;
continue;
}
if (cur.get() && (!best.get() || best->score() < cur->score()) &&
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index 545ae2a..e4e2dd4 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -196,9 +196,9 @@ int HttpAuthController::HandleAuthChallenge(
DCHECK(CalledOnValidThread());
DCHECK(headers);
DCHECK(auth_origin_.is_valid());
- LOG(INFO) << "The " << HttpAuth::GetAuthTargetString(target_) << " "
- << auth_origin_ << " requested auth"
- << AuthChallengeLogMessage(headers.get());
+ VLOG(1) << "The " << HttpAuth::GetAuthTargetString(target_) << " "
+ << auth_origin_ << " requested auth "
+ << AuthChallengeLogMessage(headers.get());
// Give the existing auth handler first try at the authentication headers.
// This will also evict the entry in the HttpAuthCache if the previous
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc
index 674549a..b20ef50 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -736,7 +736,7 @@ namespace {
// This means a simple switch on the return codes is not sufficient.
int MapImportNameStatusToError(OM_uint32 major_status) {
- LOG(INFO) << "import_name returned 0x" << std::hex << major_status;
+ VLOG(1) << "import_name returned 0x" << std::hex << major_status;
if (major_status == GSS_S_COMPLETE)
return OK;
if (GSS_CALLING_ERROR(major_status) != 0)
@@ -763,7 +763,7 @@ int MapImportNameStatusToError(OM_uint32 major_status) {
}
int MapInitSecContextStatusToError(OM_uint32 major_status) {
- LOG(INFO) << "init_sec_context returned 0x" << std::hex << major_status;
+ VLOG(1) << "init_sec_context returned 0x" << std::hex << major_status;
// Although GSS_S_CONTINUE_NEEDED is an additional bit, it seems like
// other code just checks if major_status is equivalent to it to indicate
// that there are no other errors included.
@@ -840,11 +840,8 @@ int HttpAuthGSSAPI::GetNextSecurityToken(const std::wstring& spn,
int rv = MapImportNameStatusToError(major_status);
if (rv != OK) {
LOG(ERROR) << "Problem importing name from "
- << "spn \"" << spn_principal << "\""
- << std::endl
- << DisplayExtendedStatus(library_,
- major_status,
- minor_status);
+ << "spn \"" << spn_principal << "\"\n"
+ << DisplayExtendedStatus(library_, major_status, minor_status);
return rv;
}
ScopedName scoped_name(principal_name, library_);
@@ -869,17 +866,12 @@ int HttpAuthGSSAPI::GetNextSecurityToken(const std::wstring& spn,
NULL);
rv = MapInitSecContextStatusToError(major_status);
if (rv != OK) {
- LOG(ERROR) << "Problem initializing context. "
- << std::endl
- << DisplayExtendedStatus(library_,
- major_status,
- minor_status)
- << std::endl
+ LOG(ERROR) << "Problem initializing context. \n"
+ << DisplayExtendedStatus(library_, major_status, minor_status)
+ << '\n'
<< DescribeContext(library_, scoped_sec_context_.get());
- return rv;
}
-
- return OK;
+ return rv;
}
} // namespace net
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc
index a802213..f7f178c 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -267,7 +267,7 @@ bool HttpAuthHandlerDigest::ParseChallenge(
// Loop through all the properties.
while (parameters.GetNext()) {
if (parameters.value().empty()) {
- DLOG(INFO) << "Invalid digest property";
+ DVLOG(1) << "Invalid digest property";
return false;
}
@@ -308,7 +308,7 @@ bool HttpAuthHandlerDigest::ParseChallengeProperty(const std::string& name,
} else if (LowerCaseEqualsASCII(value, "md5-sess")) {
algorithm_ = ALGORITHM_MD5_SESS;
} else {
- DLOG(INFO) << "Unknown value of algorithm";
+ DVLOG(1) << "Unknown value of algorithm";
return false; // FAIL -- unsupported value of algorithm.
}
} else if (LowerCaseEqualsASCII(name, "qop")) {
@@ -322,7 +322,7 @@ bool HttpAuthHandlerDigest::ParseChallengeProperty(const std::string& name,
}
}
} else {
- DLOG(INFO) << "Skipping unrecognized digest property";
+ DVLOG(1) << "Skipping unrecognized digest property";
// TODO(eroman): perhaps we should fail instead of silently skipping?
}
return true;
diff --git a/net/http/http_auth_handler_negotiate.cc b/net/http/http_auth_handler_negotiate.cc
index 6bbad88..99abdf6 100644
--- a/net/http/http_auth_handler_negotiate.cc
+++ b/net/http/http_auth_handler_negotiate.cc
@@ -81,7 +81,7 @@ int HttpAuthHandlerNegotiate::GenerateAuthTokenImpl(
bool HttpAuthHandlerNegotiate::Init(HttpAuth::ChallengeTokenizer* challenge) {
#if defined(OS_POSIX)
if (!auth_system_.Init()) {
- LOG(INFO) << "can't initialize GSSAPI library";
+ VLOG(1) << "can't initialize GSSAPI library";
return false;
}
// GSSAPI does not provide a way to enter username/password to
@@ -228,8 +228,8 @@ int HttpAuthHandlerNegotiate::DoResolveCanonicalNameComplete(int rv) {
if (rv != OK) {
// Even in the error case, try to use origin_.host instead of
// passing the failure on to the caller.
- LOG(INFO) << "Problem finding canonical name for SPN for host "
- << origin_.host() << ": " << ErrorToString(rv);
+ VLOG(1) << "Problem finding canonical name for SPN for host "
+ << origin_.host() << ": " << ErrorToString(rv);
rv = OK;
}
diff --git a/net/http/http_auth_sspi_win.cc b/net/http/http_auth_sspi_win.cc
index 65281e0..d6fedf9 100644
--- a/net/http/http_auth_sspi_win.cc
+++ b/net/http/http_auth_sspi_win.cc
@@ -21,7 +21,7 @@ namespace {
int MapAcquireCredentialsStatusToError(SECURITY_STATUS status,
const SEC_WCHAR* package) {
- LOG(INFO) << "AcquireCredentialsHandle returned 0x" << std::hex << status;
+ VLOG(1) << "AcquireCredentialsHandle returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
return OK;
@@ -102,7 +102,7 @@ int AcquireDefaultCredentials(SSPILibrary* library, const SEC_WCHAR* package,
}
int MapInitializeSecurityContextStatusToError(SECURITY_STATUS status) {
- LOG(INFO) << "InitializeSecurityContext returned 0x" << std::hex << status;
+ VLOG(1) << "InitializeSecurityContext returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
case SEC_I_CONTINUE_NEEDED:
@@ -146,7 +146,7 @@ int MapInitializeSecurityContextStatusToError(SECURITY_STATUS status) {
}
int MapQuerySecurityPackageInfoStatusToError(SECURITY_STATUS status) {
- LOG(INFO) << "QuerySecurityPackageInfo returned 0x" << std::hex << status;
+ VLOG(1) << "QuerySecurityPackageInfo returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
return OK;
@@ -163,7 +163,7 @@ int MapQuerySecurityPackageInfoStatusToError(SECURITY_STATUS status) {
}
int MapFreeContextBufferStatusToError(SECURITY_STATUS status) {
- LOG(INFO) << "FreeContextBuffer returned 0x" << std::hex << status;
+ VLOG(1) << "FreeContextBuffer returned 0x" << std::hex << status;
switch (status) {
case SEC_E_OK:
return OK;
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 5d05616..6550703 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -780,7 +780,7 @@ int HttpCache::Transaction::DoOpenEntryComplete(int result) {
return OK;
}
if (cache_->mode() == PLAYBACK)
- DLOG(INFO) << "Playback Cache Miss: " << request_->url;
+ DVLOG(1) << "Playback Cache Miss: " << request_->url;
// The entry does not exist, and we are not permitted to create a new entry,
// so we must fail.
@@ -1348,7 +1348,7 @@ void HttpCache::Transaction::SetRequest(const BoundNetLog& net_log,
partial_->SetHeaders(custom_request_->extra_headers);
} else {
// The range is invalid or we cannot handle it properly.
- LOG(INFO) << "Invalid byte range found.";
+ VLOG(1) << "Invalid byte range found.";
effective_load_flags_ |= LOAD_DISABLE_CACHE;
partial_.reset(NULL);
}
@@ -1838,8 +1838,8 @@ void HttpCache::Transaction::DoneWritingToEntry(bool success) {
return;
if (cache_->mode() == RECORD)
- DLOG(INFO) << "Recorded: " << request_->method << request_->url
- << " status: " << response_.headers->response_code();
+ DVLOG(1) << "Recorded: " << request_->method << request_->url
+ << " status: " << response_.headers->response_code();
cache_->DoneWritingToEntry(entry_, success);
entry_ = NULL;
diff --git a/net/http/http_chunked_decoder.cc b/net/http/http_chunked_decoder.cc
index 1ac7a60..455c9ed 100644
--- a/net/http/http_chunked_decoder.cc
+++ b/net/http/http_chunked_decoder.cc
@@ -1,3 +1,10 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Derived from:
+// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.cpp
+// The license block is:
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -35,9 +42,6 @@
*
* ***** END LICENSE BLOCK ***** */
-// Derived from:
-// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.cpp
-
#include "net/http/http_chunked_decoder.h"
#include "base/logging.h"
@@ -111,11 +115,10 @@ int HttpChunkedDecoder::ScanForChunkRemaining(const char* buf, int buf_len) {
}
if (reached_last_chunk_) {
- if (buf_len) {
- DLOG(INFO) << "ignoring http trailer";
- } else {
+ if (buf_len)
+ DVLOG(1) << "ignoring http trailer";
+ else
reached_eof_ = true;
- }
} else if (chunk_terminator_remaining_) {
if (buf_len) {
DLOG(ERROR) << "chunk data not terminated properly";
diff --git a/net/http/http_chunked_decoder.h b/net/http/http_chunked_decoder.h
index cf6e6b9..837499c 100644
--- a/net/http/http_chunked_decoder.h
+++ b/net/http/http_chunked_decoder.h
@@ -1,3 +1,10 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Derived from:
+// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.h
+// The license block is:
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -35,9 +42,6 @@
*
* ***** END LICENSE BLOCK ***** */
-// Derived from:
-// mozilla/netwerk/protocol/http/src/nsHttpChunkedDecoder.h
-
#ifndef NET_HTTP_HTTP_CHUNKED_DECODER_H_
#define NET_HTTP_HTTP_CHUNKED_DECODER_H_
#pragma once
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 631b3a1..99c5404 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -513,20 +513,20 @@ HttpVersion HttpResponseHeaders::ParseVersion(
// TODO: handle leading zeros, which is allowed by the rfc1616 sec 3.1.
if ((line_end - p < 4) || !LowerCaseEqualsASCII(p, p + 4, "http")) {
- DLOG(INFO) << "missing status line";
+ DVLOG(1) << "missing status line";
return HttpVersion();
}
p += 4;
if (p >= line_end || *p != '/') {
- DLOG(INFO) << "missing version";
+ DVLOG(1) << "missing version";
return HttpVersion();
}
std::string::const_iterator dot = find(p, line_end, '.');
if (dot == line_end) {
- DLOG(INFO) << "malformed version";
+ DVLOG(1) << "malformed version";
return HttpVersion();
}
@@ -534,7 +534,7 @@ HttpVersion HttpResponseHeaders::ParseVersion(
++dot; // from . to second digit.
if (!(*p >= '0' && *p <= '9' && *dot >= '0' && *dot <= '9')) {
- DLOG(INFO) << "malformed version number";
+ DVLOG(1) << "malformed version number";
return HttpVersion();
}
@@ -566,15 +566,15 @@ void HttpResponseHeaders::ParseStatusLine(
raw_headers_ = "HTTP/1.0";
}
if (parsed_http_version_ != http_version_) {
- DLOG(INFO) << "assuming HTTP/" << http_version_.major_value() << "."
- << http_version_.minor_value();
+ DVLOG(1) << "assuming HTTP/" << http_version_.major_value() << "."
+ << http_version_.minor_value();
}
// TODO(eroman): this doesn't make sense if ParseVersion failed.
std::string::const_iterator p = find(line_begin, line_end, ' ');
if (p == line_end) {
- DLOG(INFO) << "missing response status; assuming 200 OK";
+ DVLOG(1) << "missing response status; assuming 200 OK";
raw_headers_.append(" 200 OK");
raw_headers_.push_back('\0');
response_code_ = 200;
@@ -590,7 +590,7 @@ void HttpResponseHeaders::ParseStatusLine(
++p;
if (p == code) {
- DLOG(INFO) << "missing response status number; assuming 200";
+ DVLOG(1) << "missing response status number; assuming 200";
raw_headers_.append(" 200 OK");
response_code_ = 200;
return;
@@ -609,7 +609,7 @@ void HttpResponseHeaders::ParseStatusLine(
--line_end;
if (p == line_end) {
- DLOG(INFO) << "missing response status text; assuming OK";
+ DVLOG(1) << "missing response status text; assuming OK";
// Not super critical what we put here. Just use "OK"
// even if it isn't descriptive of response_code_.
raw_headers_.append("OK");