jakartaee / jakartaee/servlet

Create TCK tests for early hints

Open
#700 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
325
Forks
112
PR merge metrics
No merged PRs in 30d

Description

I've taken an initial look at this and it appears that the JRE provided HttpClient doesn't understand early hints. Neither does Apache HttpClient.

If we limit the test to looking for:
- an interim response with 103 status code
- one or more expected headers with expected values
- ignore all other headers
- a final response with a 200 status code
- one or more expected headers with expected values
- possibly ensure one or more headers are not present
- ignore all other headers

I think we could do this with a relatively simple client that writes/reads directly to/from the socket. The risk is that there is sufficient variation in the responses that the client ends up being more complex. I think we avoid most/all of this by only considering specific headers that we set (and unset?) in the test.

If there are some utilities in the TCK we can re-use to do most/all of this that would be great but I haven't found any so far.

Thoughts?

Contributor guide

Open the contributing guide

Research direction

Start by locating existing TCK utilities and tests that inspect HTTP response status and headers; the issue does not name specific files or entry points. Compare whether a direct socket client is needed, then define coverage for a 103 response, selected early-hint headers, a final 200 response, and absent headers where required.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.