masaori335 opened a new pull request, #14037:
URL: https://github.com/apache/trafficserver/pull/14037

   # Motivation
   
   No cripts unit test covered `Server::Request` (edited at SEND_REQUEST) or 
`Client::Response` (edited at
   SEND_RESPONSE). The test transaction could only fill in the client request 
and the server response, so a test
   could not reach these headers.
   
   # Approach
   
   Instead of adding a setter for every header, `cripts_test::Txn` now exposes 
the core's headers through
   `headers()`. A test parses whichever header it needs with `parse_request()` 
or `parse_response()`. The test still
   sets `context->state.hook` itself, the same way the existing READ_RESPONSE 
test does.
   
   `set_server_response()` stays, marked deprecated, so this PR doesn't change 
any existing test.
   
   # Tests added
   
   - **Client response at SEND_RESPONSE:** a status write goes to the response 
header itself, not to the transaction
     status as in most other hooks.
   - **Server request at SEND_REQUEST:** a field write changes only the origin 
request, not the client request it was
     copied from.


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

Reply via email to