garydgregory opened a new pull request, #1548:
URL: https://github.com/apache/httpcomponents-core/pull/1548

   Preserve already bracketed IPv6 literals and encoded zone IDs when 
formatting URI authorities.
   
   Add regression coverage for IPv6 address forms, ports, user info, zone 
encoding, and non-IPv6 inputs.
   
   The client will send the wrong HTTP `Host` header which will cause the 
server to return an error.
   
   A client-based reproducer can be boiled down to:
   ```
   new org.apache.hc.client5.http.classic.methods.HttpPost(new 
java.net.URI("http://[::1]:8080";)).getAuthority().toString()
   ```
   
   For example:
   ```
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "Host: 
[[::1]]:59149[\r][\n]"
   ```
   
   extracted from this log:
   
   ```
   2026-12-01T07:50:17,107 DEBUG [Time-limited 
test][org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager] 
ep-0000000001 executing exchange ex-0000000001 over http-outgoing-0
   2026-12-01T07:50:17,108 DEBUG [Time-limited 
test][org.apache.hc.client5.http.headers] http-outgoing-0 >> POST /lde/ HTTP/1.1
   2026-12-01T07:50:17,108 DEBUG [Time-limited 
test][org.apache.hc.client5.http.headers] http-outgoing-0 >> Accept-Encoding: 
gzip, deflate, br, lz4-framed, lz4-block, bzip2, pack200, deflate64, x-gzip
   2026-12-01T07:50:17,108 DEBUG [Time-limited 
test][org.apache.hc.client5.http.headers] http-outgoing-0 >> Host: [[::1]]:59149
   2026-12-01T07:50:17,108 DEBUG [Time-limited 
test][org.apache.hc.client5.http.headers] http-outgoing-0 >> Content-Length: 244
   2026-12-01T07:50:17,108 DEBUG [Time-limited 
test][org.apache.hc.client5.http.headers] http-outgoing-0 >> Content-Type: 
text/xml; charset=UTF-8
   2026-12-01T07:50:17,108 DEBUG [Time-limited 
test][org.apache.hc.client5.http.headers] http-outgoing-0 >> Connection: 
keep-alive
   2026-12-01T07:50:17,108 DEBUG [Time-limited 
test][org.apache.hc.client5.http.headers] http-outgoing-0 >> User-Agent: 
Apache-HttpClient/5.6.5 (Java/17.0.21)
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "POST /lde/ 
HTTP/1.1[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "Accept-Encoding: 
gzip, deflate, br, lz4-framed, lz4-block, bzip2, pack200, deflate64, 
x-gzip[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "Host: 
[[::1]]:59149[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "Content-Length: 
244[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "Content-Type: 
text/xml; charset=UTF-8[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "Connection: 
keep-alive[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "User-Agent: 
Apache-HttpClient/5.6.5 (Java/17.0.21)[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "[\r][\n]"
   2026-12-01T07:50:17,109 DEBUG [Time-limited 
test][org.apache.hc.client5.http.wire] http-outgoing-0 >> "<?xml version="1.0" 
encoding="UTF-8"?><?com.seagullsw.appinterface.model.ModelIORegistry 
elementType="function"elementAspect="request"bindingType="AppInterface"syntaxVersion="7.0"?><Request
 name="com.seagullsw.appinterface.server.admin.Logon"/>"
   2026-12-01T07:50:17,111 DEBUG 
[qtp745089008-55][org.eclipse.jetty.io.IdleTimeout] Setting idle timeout 0 -> 
30000 on 
oeji.SocketChannelEndPoint@959f82[{l=/[0:0:0:0:0:0:0:1]:59149,r=/[0:0:0:0:0:0:0:1]:59150,OPEN,fill=-,flush=-,to=4/30000}{:io=0/0,kio=0,kro=0}]->[<null>]
   ```


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to