Index: net/tools/flip_server/spdy_interface.cc |
diff --git a/net/tools/flip_server/spdy_interface.cc b/net/tools/flip_server/spdy_interface.cc |
index 73025dd54070eac3281b98e55e4d3b9f3ce86ceb..f55195815d32742e6fd73c824ebb55faf32fb9b8 100644 |
--- a/net/tools/flip_server/spdy_interface.cc |
+++ b/net/tools/flip_server/spdy_interface.cc |
@@ -51,7 +51,8 @@ SpdySM::SpdySM(SMConnection* connection, |
buffered_spdy_framer_->set_visitor(this); |
} |
-SpdySM::~SpdySM() { } |
+SpdySM::~SpdySM() { |
+} |
void SpdySM::InitSMConnection(SMConnectionPoolInterface* connection_pool, |
SMInterface* sm_interface, |
@@ -73,12 +74,8 @@ void SpdySM::InitSMConnection(SMConnectionPoolInterface* connection_pool, |
} |
SMInterface* SpdySM::NewConnectionInterface() { |
- SMConnection* server_connection = |
- SMConnection::NewSMConnection(epoll_server_, |
- NULL, |
- memory_cache_, |
- acceptor_, |
- "http_conn: "); |
+ SMConnection* server_connection = SMConnection::NewSMConnection( |
+ epoll_server_, NULL, memory_cache_, acceptor_, "http_conn: "); |
if (server_connection == NULL) { |
LOG(ERROR) << "SpdySM: Could not create server connection"; |
return NULL; |
@@ -178,30 +175,24 @@ int SpdySM::SpdyHandleNewStream(SpdyStreamId stream_id, |
} |
if (acceptor_->flip_handler_type_ == FLIP_HANDLER_SPDY_SERVER) { |
- VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Request: " << method->second |
- << " " << path_string; |
- std::string filename = EncodeURL(path_string, |
- host_string, |
- method->second); |
+ VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Request: " << method->second << " " |
+ << path_string; |
+ std::string filename = EncodeURL(path_string, host_string, method->second); |
NewStream(stream_id, priority, filename); |
} else { |
http_data += |
method->second + " " + path_string + " " + version_string + "\r\n"; |
VLOG(1) << ACCEPTOR_CLIENT_IDENT << "Request: " << method->second << " " |
<< path_string << " " << version_string; |
- http_data += "Host: " + (*is_https_scheme ? |
- acceptor_->https_server_ip_ : |
- acceptor_->http_server_ip_) + "\r\n"; |
+ http_data += "Host: " + (*is_https_scheme ? acceptor_->https_server_ip_ |
+ : acceptor_->http_server_ip_) + |
+ "\r\n"; |
for (SpdyHeaderBlock::const_iterator i = headers.begin(); |
- i != headers.end(); ++i) { |
- if ((i->first.size() > 0 && i->first[0] == ':') || |
- i->first == "host" || |
- i == method || |
- i == host || |
- i == path || |
- i == scheme || |
- i == version || |
- i == url) { |
+ i != headers.end(); |
+ ++i) { |
+ if ((i->first.size() > 0 && i->first[0] == ':') || i->first == "host" || |
+ i == method || i == host || i == path || i == scheme || |
+ i == version || i == url) { |
// Ignore the entry. |
} else { |
http_data += i->first + ": " + i->second + "\r\n"; |
@@ -211,8 +202,8 @@ int SpdySM::SpdyHandleNewStream(SpdyStreamId stream_id, |
} |
if (forward_ip_header_.length()) { |
// X-Client-Cluster-IP header |
- http_data += forward_ip_header_ + ": " + |
- connection_->client_ip() + "\r\n"; |
+ http_data += |
+ forward_ip_header_ + ": " + connection_->client_ip() + "\r\n"; |
} |
http_data += "\r\n"; |
} |
@@ -301,7 +292,9 @@ size_t SpdySM::ProcessReadInput(const char* data, size_t len) { |
return buffered_spdy_framer_->ProcessInput(data, len); |
} |
-size_t SpdySM::ProcessWriteInput(const char* data, size_t len) { return 0; } |
+size_t SpdySM::ProcessWriteInput(const char* data, size_t len) { |
+ return 0; |
+} |
bool SpdySM::MessageFullyRead() const { |
DCHECK(buffered_spdy_framer_); |
@@ -373,7 +366,9 @@ void SpdySM::AddToOutputOrder(const MemCacheIter& mci) { |
client_output_ordering_.AddToOutputOrder(mci); |
} |
-void SpdySM::SendEOF(uint32 stream_id) { SendEOFImpl(stream_id); } |
+void SpdySM::SendEOF(uint32 stream_id) { |
+ SendEOFImpl(stream_id); |
+} |
void SpdySM::SendErrorNotFound(uint32 stream_id) { |
SendErrorNotFoundImpl(stream_id); |
@@ -490,11 +485,11 @@ size_t SpdySM::SendSynReplyImpl(uint32 stream_id, const BalsaHeaders& headers) { |
CopyHeaders(block, headers); |
if (spdy_version() == SPDY2) { |
block["status"] = headers.response_code().as_string() + " " + |
- headers.response_reason_phrase().as_string(); |
+ headers.response_reason_phrase().as_string(); |
block["version"] = headers.response_version().as_string(); |
} else { |
block[":status"] = headers.response_code().as_string() + " " + |
- headers.response_reason_phrase().as_string(); |
+ headers.response_reason_phrase().as_string(); |
block[":version"] = headers.response_version().as_string(); |
} |