[TlsInterception] Breaks ModifyChunkResponsePlugin
in v2.3.1
#1042
-
Try to use the ModifyChunkResponsePlugin together with TLS Intercept: while the parts work separately, they don't work together. To Reproduce
Expected behavior Version information
Additional context I found a fix for this problem, although whether this is fixing the root cause or merely a symptom I couldn't say. I changed TCPConnection.flush to not do a send on a zero length buffers, instead it just pops them. For whatever reason doing the send of a zero length buffer raises an OSError somewhere in the SSL code. I've attached the logfiles for the repro starting at step 10 ( |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Here's a patch that appears to fix the issue. I made |
Beta Was this translation helpful? Give feedback.
-
Thank you reporting it. I remember encountering similar issue when adding integration tests for web server plugin, likely you already discovered #1028 . Looks like this bug can also effects proxy plugins. I have updated the bug to highlight the same. Btw if you are using $ curl -v https://httpbin.org/drip\?duration\=2\&numbytes\=29\&code\=200\&delay\=2 ─╯
* Trying 34.234.159.18:443...
* Connected to httpbin.org (34.234.159.18) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
* CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=httpbin.org
* start date: Nov 21 00:00:00 2021 GMT
* expire date: Dec 19 23:59:59 2022 GMT
* subjectAltName: host "httpbin.org" matched cert's "httpbin.org"
* issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fc54c80d400)
> GET /drip?duration=2&numbytes=29&code=200&delay=2 HTTP/2
> Host: httpbin.org
> user-agent: curl/7.77.0
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< date: Sat, 22 Jan 2022 19:51:59 GMT
< content-type: application/octet-stream
< content-length: 29
< server: gunicorn/19.9.0
< access-control-allow-origin: *
< access-control-allow-credentials: true
<
* Connection #0 to host httpbin.org left intact
*****************************% |
Beta Was this translation helpful? Give feedback.
-
Answer I posted here actually uses TLS interception. We also have integration tests under TLS interception mode. Ref #1039 (comment) |
Beta Was this translation helpful? Give feedback.
Thank you reporting it. I remember encountering similar issue when adding integration tests for web server plugin, likely you already discovered #1028 . Looks like this bug can also effects proxy plugins. I have updated the bug to highlight the same.
Btw if you are using
https://httpbin.org/drip?duration=2&numbytes=29&code=200&delay=2
for chunked response plugin, it ain't gonna work. Response is not chunked. E.g. see below: