Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: net/spdy/spdy_proxy_client_socket.cc

Issue 337093003: QuicServer: Use Chrome's header parsing rather than Balsa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quic_server_3
Patch Set: Fix build on many platforms Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« net/spdy/spdy_http_utils.cc ('K') | « net/spdy/spdy_http_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include <algorithm> // min 7 #include <algorithm> // min
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 &request_headers); 360 &request_headers);
361 361
362 net_log_.AddEvent( 362 net_log_.AddEvent(
363 NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS, 363 NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
364 base::Bind(&HttpRequestHeaders::NetLogCallback, 364 base::Bind(&HttpRequestHeaders::NetLogCallback,
365 base::Unretained(&request_headers), 365 base::Unretained(&request_headers),
366 &request_line)); 366 &request_line));
367 367
368 request_.extra_headers.MergeFrom(request_headers); 368 request_.extra_headers.MergeFrom(request_headers);
369 scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock()); 369 scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock());
370 CreateSpdyHeadersFromHttpRequest(request_, request_headers, headers.get(), 370 CreateSpdyHeadersFromHttpRequest(request_, request_headers,
371 spdy_stream_->GetProtocolVersion(), true); 371 spdy_stream_->GetProtocolVersion(), true,
372 headers.get());
372 // Reset the URL to be the endpoint of the connection 373 // Reset the URL to be the endpoint of the connection
373 if (spdy_stream_->GetProtocolVersion() > 2) { 374 if (spdy_stream_->GetProtocolVersion() > 2) {
374 (*headers)[":path"] = endpoint_.ToString(); 375 (*headers)[":path"] = endpoint_.ToString();
375 headers->erase(":scheme"); 376 headers->erase(":scheme");
376 } else { 377 } else {
377 (*headers)["url"] = endpoint_.ToString(); 378 (*headers)["url"] = endpoint_.ToString();
378 headers->erase("scheme"); 379 headers->erase("scheme");
379 } 380 }
380 381
381 return spdy_stream_->SendRequestHeaders(headers.Pass(), MORE_DATA_TO_SEND); 382 return spdy_stream_->SendRequestHeaders(headers.Pass(), MORE_DATA_TO_SEND);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 } else if (!read_callback_.is_null()) { 527 } else if (!read_callback_.is_null()) {
527 // If we have a read_callback_, the we need to make sure we call it back. 528 // If we have a read_callback_, the we need to make sure we call it back.
528 OnDataReceived(scoped_ptr<SpdyBuffer>()); 529 OnDataReceived(scoped_ptr<SpdyBuffer>());
529 } 530 }
530 // This may have been deleted by read_callback_, so check first. 531 // This may have been deleted by read_callback_, so check first.
531 if (weak_ptr.get() && !write_callback.is_null()) 532 if (weak_ptr.get() && !write_callback.is_null())
532 write_callback.Run(ERR_CONNECTION_CLOSED); 533 write_callback.Run(ERR_CONNECTION_CLOSED);
533 } 534 }
534 535
535 } // namespace net 536 } // namespace net
OLDNEW
« net/spdy/spdy_http_utils.cc ('K') | « net/spdy/spdy_http_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698