RFR: 8351347: HttpClient Improve logging of response headers [v3]
Volkan Yazici
vyazici at openjdk.org
Thu May 15 11:29:33 UTC 2025
> Includes request method, request URI, response status code, and HTTP/2 stream ID while logging response headers in the HTTP Client.
>
> ### Demonstration
>
> Snippets from running JTreg against `test/jdk/java/net/httpclient/HeadTest.java`:
>
> **Before:**
>
> INFO: HEADERS: REQUEST HEADERS:
> HEAD /transfer/ HTTP/1.1
> Content-Length: 0
> Host: 127.0.0.1:43647
> ...
> INFO: HEADERS: RESPONSE HEADERS:
> connection: Upgrade
> upgrade: h2c
> ...
> INFO: HEADERS: RESPONSE HEADERS:
> :status: 304
> content-length: 300
> ...
> INFO: HEADERS: HEADERS FRAME (streamid=1):
> :authority: 127.0.0.1:50611
> :method: GET
> :path: /
>
>
> **After:**
>
> INFO: HEADERS: REQUEST HEADERS:
> HEAD /transfer/ HTTP/1.1
> Content-Length: 0
> Host: 127.0.0.1:43647
> ...
> INFO: HEADERS: RESPONSE HEADERS:
> GET http://127.0.0.1:48497/ 101
> connection: Upgrade
> upgrade: h2c
> ...
> INFO: HEADERS: RESPONSE HEADERS (streamid=1):
> GET http://127.0.0.1:48497/ 304
> :status: 304
> content-length: 300
> ...
> INFO: HEADERS: HEADERS FRAME (streamid=1):
> GET https://127.0.0.1:50611/
> :authority: 127.0.0.1:50611
> :method: GET
> :path: /
Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision:
- Avoid localization
- Apply suggestions from code review
Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25201/files
- new: https://git.openjdk.org/jdk/pull/25201/files/be71467e..d0e36872
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25201&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25201&range=01-02
Stats: 13 lines in 4 files changed: 0 ins; 3 del; 10 mod
Patch: https://git.openjdk.org/jdk/pull/25201.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25201/head:pull/25201
PR: https://git.openjdk.org/jdk/pull/25201
More information about the net-dev
mailing list