You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "maskit (via GitHub)" <gi...@apache.org> on 2025/08/27 15:56:38 UTC
[I] Background fill does not work on HTTPS connections [trafficserver]
maskit opened a new issue, #12473:
URL: https://github.com/apache/trafficserver/issues/12473
There is ATS built-in background fill feature that is to continue fetching documents from origins even after client connections are aborted. The name is confusing but this is different from background_fetch plugin.
The background *fill* feature is enabled by default (`proxy.config.http.background_fill_active_timeout=0`, and `proxy.config.http.background_fill_completed_threshold=0`), and it works fine if the client connection is cleartext HTTP, but I found that it does not work if the client connection is HTTPS (TLS + TCP).
I checked the behavior like below:
- Run ATS (port 8080)
- Run origin server (`$ cat | nc -l 8888`)
- Send a request (`$ curl -v http://127.0.0.1:8080/`)
- Close the client connection (`Ctrl+C` on the curl command)
- Send a response (Type a response on the cat command)
- Shutdown the origin server (`Ctrl+D` on the cat command)
- Send another request (`$ curl -v http://127.0.0.1:8080/`)
Same steps on HTTPS doesn't return the response from cache.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Background fill does not work on HTTPS connections [trafficserver]
Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on issue #12473:
URL: https://github.com/apache/trafficserver/issues/12473#issuecomment-3228944236
Apparently this block differentiate the behavior.
https://github.com/apache/trafficserver/blob/17fcff1f78c08357992251dfb10b8d54e9399940/src/proxy/http/HttpSM.cc#L875-L886
On HTTPS connection, `_ua.get_txn()->allow_half_open()` returns `false` and there isn't any other consumer at this point. That terminates HttpSM, and connections on the both side get closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Background fill does not work on HTTPS connections [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 commented on issue #12473:
URL: https://github.com/apache/trafficserver/issues/12473#issuecomment-3316584683
We found connection leak issue with #12502 patch. I'll open another one to fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Background fill does not work on HTTPS connections [trafficserver]
Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on issue #12473:
URL: https://github.com/apache/trafficserver/issues/12473#issuecomment-3250584364
Although closing the both side of the connections doesn't seem to be correct and that should be fixed, returning `false` from `allow_half_open()` on HTTPS connection is no longer always correct either. TLS 1.3 has half-open concept unlike the older versions.
> Each party MUST send a "close_notify" alert before closing its write
side of the connection, unless it has already sent some error alert.
This does not have any effect on its read side of the connection.
Note that this is a change from versions of TLS prior to TLS 1.3 in
which implementations were required to react to a "close_notify" by
discarding pending writes and sending an immediate "close_notify"
alert of their own.
https://datatracker.ietf.org/doc/html/rfc8446#section-6.1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Background fill does not work on HTTPS connections [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 closed issue #12473: Background fill does not work on HTTPS connections
URL: https://github.com/apache/trafficserver/issues/12473
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Background fill does not work on HTTPS connections [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 commented on issue #12473:
URL: https://github.com/apache/trafficserver/issues/12473#issuecomment-3399305168
The connection leak issue is fixed by https://github.com/apache/trafficserver/pull/12529.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Background fill does not work on HTTPS connections [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 closed issue #12473: Background fill does not work on HTTPS connections
URL: https://github.com/apache/trafficserver/issues/12473
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Background fill does not work on HTTPS connections [trafficserver]
Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on issue #12473:
URL: https://github.com/apache/trafficserver/issues/12473#issuecomment-3228803781
When the client connection gets closed, the origin connection gets closed at the same time.
```
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <HttpSM.cc:2648 (main_handler)> (http) [5] VC_EVENT_EOS/TS_EVENT_VCONN_EOS, 104
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <HttpSM.cc:849 (state_watch_for_client_abort)> (http) [5] [&HttpSM::state_watch_for_client_abort, VC_EVENT_EOS/TS_EVENT_VCONN_EOS]
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <Http1ClientSession.cc:275 (do_io_close)> (http_cs) [19] session closed
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <HttpSM.cc:8840 (clear)> (http_redirect) [PostDataBuffers::clear]
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <Http1ServerSession.cc:125 (do_io_close)> (http_ss) [20] session close: nevtc 0x13078b880
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <HttpSM.cc:7587 (kill_this)> (http_seq) [5] Logging transaction
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <Http1ClientSession.cc:83 (destroy)> (http_cs) [19] session destroy
[Aug 26 18:53:41.908] [ET_NET 0] DIAG: <HttpSM.cc:7636 (kill_this)> (http) [5] deallocating sm
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org