maskit opened a new pull request, #13946:
URL: https://github.com/apache/trafficserver/pull/13946

   ## Why
   
   When a connection to the origin fails, ATS builds the 502 reason phrase from 
`strerror()` of the connect error (`HttpTransact::get_error_string`). For a 
connect timeout that is `strerror(ETIMEDOUT)`, whose wording depends on the C 
library: glibc and musl say "Connection timed out", macOS says "Operation timed 
out". The handshake cases of `test_tls_conn_timeout` hard-coded the glibc 
wording, so they failed on macOS. CI runs on Linux and was unaffected.
   
   ## Change
   
   The two handshake cases now expect `HTTP/1.1 502 
{os.strerror(errno.ETIMEDOUT)}`. Python's `os.strerror` calls the same C 
library `strerror()` as ATS on the same host, so the expected line matches on 
any platform while the assertion stays as strict as before: a different connect 
failure, such as a refused connection, still fails the test. The two 
response-timeout cases expect ATS's fixed "504 Connection Timed Out" and are 
unchanged.
   
   ## Validation
   
   All four cases pass on macOS with this change; the two handshake cases 
failed there before it. On Linux, `os.strerror(errno.ETIMEDOUT)` is "Connection 
timed out", the same string the test expected before.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to