aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Twisted/py3/twisted/web/_http2.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-11-12 07:54:50 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-11-12 08:05:59 +0300
commit55cec9f6b0618fb3570fc8ef66aad151f4932591 (patch)
tree9198c2ca0b0305269062c3674ce79f19c4990e65 /contrib/python/Twisted/py3/twisted/web/_http2.py
parentb77b1fbf262ea4f40e33a60ce32c4db4e5e49015 (diff)
downloadydb-55cec9f6b0618fb3570fc8ef66aad151f4932591.tar.gz
Intermediate changes
commit_hash:c229701a8b4f4d9ee57ce1ed763099d862d53fa6
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/web/_http2.py')
-rw-r--r--contrib/python/Twisted/py3/twisted/web/_http2.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/python/Twisted/py3/twisted/web/_http2.py b/contrib/python/Twisted/py3/twisted/web/_http2.py
index f048c7335e..301e9ea196 100644
--- a/contrib/python/Twisted/py3/twisted/web/_http2.py
+++ b/contrib/python/Twisted/py3/twisted/web/_http2.py
@@ -14,7 +14,6 @@ This API is currently considered private because it's in early draft form. When
it has stabilised, it'll be made public.
"""
-
import io
from collections import deque
from typing import List
@@ -36,6 +35,7 @@ from twisted.internet.interfaces import (
IProtocol,
IPushProducer,
ISSLTransport,
+ ITCPTransport,
ITransport,
)
from twisted.internet.protocol import Protocol
@@ -144,6 +144,8 @@ class H2Connection(Protocol, TimeoutMixin):
by the L{twisted.web.http._GenericHTTPChannelProtocol} during upgrade
to HTTP/2.
"""
+ if ITCPTransport.providedBy(self.transport):
+ self.transport.setTcpNoDelay(True)
self.setTimeout(self.timeOut)
self.conn.initiate_connection()
self.transport.write(self.conn.data_to_send())
@@ -972,7 +974,7 @@ class H2Stream:
self._request.gotLength(None)
self._request.parseCookies()
- expectContinue = self._request.requestHeaders.getRawHeaders(b"expect")
+ expectContinue = self._request.requestHeaders.getRawHeaders(b"Expect")
if expectContinue and expectContinue[0].lower() == b"100-continue":
self._send100Continue()