File tree Expand file tree Collapse file tree 5 files changed +0
-35
lines changed
third-party/proxygen/src/proxygen/lib/http/sink Expand file tree Collapse file tree 5 files changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,6 @@ class HTTPConnectSink
159159 void setIdleTimeout (std::chrono::milliseconds timeout) override ;
160160
161161 // Capabilities
162- bool safeToUpgrade (HTTPMessage*) const override {
163- return false ;
164- }
165-
166162 [[nodiscard]] bool supportsPush () const override {
167163 return false ;
168164 }
Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ class HTTPSink {
9191 virtual void timeoutExpired () = 0;
9292 virtual void setIdleTimeout (std::chrono::milliseconds timeout) = 0;
9393 // Capabilities
94- virtual bool safeToUpgrade (HTTPMessage* req) const = 0;
9594 [[nodiscard]] virtual bool supportsPush () const = 0;
9695 // Logging
9796 virtual void describe (std::ostream& os) = 0;
Original file line number Diff line number Diff line change @@ -47,29 +47,4 @@ quic::QuicSocket* HTTPTransactionSink::getQUICTransport() const {
4747 return nullptr ;
4848}
4949
50- bool HTTPTransactionSink::safeToUpgrade (HTTPMessage* req) const {
51- // There's a race condition if we haven't seen the end of a POST
52- // terminated by content-length. If that's the case, don't request an upgrade
53- // on this connection. We can live with a little HTTP/1.1 for now.
54-
55- // Because HTTP/2 and HTTP/3 reported "chunked" messages for requests that
56- // will see DATA frames, the only unsafe type of request is HTTP/1.1 with
57- // Content-Length terminated body. We could force this to use chunked
58- // encoding to make it safe, but for now we won't.
59-
60- // One subtle case here is a pure HTTP/1.1 GET request with no body. It is
61- // safeToUpgrade per this function, but it relies on the fact that the
62- // resumeIngress call after sendingHeaders will trigger onClientEOM
63- // immediately, causing the sendEOM to happen before the 101 response arrives
64-
65- // And because we force chunk this request, it can't be a MUST not have body
66- if (req && RFC2616::isRequestBodyAllowed (req->getMethod ()) ==
67- RFC2616::BodyAllowed::NOT_ALLOWED) {
68- return false ;
69- }
70- return (httpTransaction_ && httpTransaction_->isIngressEOMSeen ()) ||
71- (req && (!req->getHeaders ().exists (HTTP_HEADER_CONTENT_LENGTH) ||
72- req->getIsChunked ()));
73- }
74-
7550} // namespace proxygen
Original file line number Diff line number Diff line change @@ -156,7 +156,6 @@ class HTTPTransactionSink : public HTTPSink {
156156 httpTransaction_->setIdleTimeout (timeout);
157157 }
158158 // Capabilities
159- bool safeToUpgrade (HTTPMessage* req) const override ;
160159 [[nodiscard]] bool supportsPush () const override {
161160 return true ;
162161 }
Original file line number Diff line number Diff line change @@ -159,10 +159,6 @@ class HTTPTunnelSink
159159 void setIdleTimeout (std::chrono::milliseconds timeout) override ;
160160
161161 // Capabilities
162- bool safeToUpgrade (HTTPMessage*) const override {
163- return false ;
164- }
165-
166162 [[nodiscard]] bool supportsPush () const override {
167163 return false ;
168164 }
You can’t perform that action at this time.
0 commit comments