Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create TCK tests for early hints #700

Open
markt-asf opened this issue Aug 22, 2024 · 1 comment
Open

Create TCK tests for early hints #700

markt-asf opened this issue Aug 22, 2024 · 1 comment

Comments

@markt-asf
Copy link
Contributor

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?

@IamLRBA
Copy link

IamLRBA commented Nov 19, 2024

@markt-asf your approach seems like a pragmatic way to test early hints without relying on external libraries. I'd be happy to assist in exploring the socket-based client implementation or further scoping the test cases. Let me know how I can help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants