bneradt opened a new pull request #8066:
URL: https://github.com/apache/trafficserver/pull/8066


   The value for TS_HTTP_REQUEST_BUFFER_READ_COMPLETE_HOOK was out of sync with
   the corresponding event, TS_EVENT_HTTP_REQUEST_BUFFER_READ_COMPLETE. This
   caused the handler for TS_HTTP_REQUEST_BUFFER_READ_COMPLETE_HOOK to never be
   invoked with the TS_EVENT_HTTP_REQUEST_BUFFER_READ_COMPLETE event. This patch
   fixes this problem and adds comments explaining the otherwise implicit but
   very important requirement that these values correspond as they do.
   
   The naming of the event and hook were off too. A hook with name 
TS_HTTP_X_HOOK
   should have an event of name TS_EVENT_HTTP_X, but these got out of sync 
somehow
   for request buffer read complete. This adjusts the event name appropriately.
   
   ---
   ### Review Tips
   
   In order to make the `REBASE` macro work, I had to move the `TSEvent` enum 
above the `TSHttpHookID`. I'm sorry that increases the churn for this review. 
The only material changes that happened in apidefs.h.in are:
   
   * For the `TSEvent` enum, `TS_EVENT_HTTP_RESPONSE_CLIENT              = 
60019` is added. This was incorrectly missing before.
   * For the `TSHttpHookID` enum, the 
`TS_HTTP_REQUEST_BUFFER_READ_COMPLETE_HOOK` is moved from the bottom to just 
before `TS_HTTP_RESPONSE_CLIENT_HOOK`
   * Added the `REBASE` macro for  `TS_HTTP_` to enforce our HOOK/EVENT naming 
convention and the enum value of the HOOK vs EVENT value.


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