servlet icon indicating copy to clipboard operation
servlet copied to clipboard

Create TCK tests for early hints

Open markt-asf opened this issue 1 year ago • 1 comments

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?

markt-asf avatar Aug 22 '24 15:08 markt-asf

@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!

IamLRBA avatar Nov 19 '24 22:11 IamLRBA