I have set this API proposal up as a pull request with the documentation for 
the API. We will see if this provides a better platform for discussion.

API: Proposal for additional IO buffer and body template API. by 
SolidWallOfCode · Pull Request #272 · apache/trafficserver


|   |
|   |  |   |   |   |   |   |
| API: Proposal for additional IO buffer and body template...This is not 
intended to be merge immediately because it describes API that has not yet been 
written. Comments should be about the API itself. The new functions are ... |
|  |
| View on github.com | Preview by Yahoo |
|  |
|   |


Please comment on either the new functions as API or on the documentation of 
other existing API (which was needed because it directly connects to the new 
API and was not documented).
The overall goal of this API is to improve the handling of error pages and 
BodyFactory, which in turn is intended to clean up the mess described in 
TS-1980 and its linked bugs. After some discussion on the IRC, the 
mini-consensus was that rather than passing malloc buffers around it would be 
better to use the existing IOBuffer mechanism. TSHttpTxnApplyLogFormat does 
this, taking a transaction, a log format string, and an MIOBuffer and writing 
the generated output to that MIOBuffer. A custom error template would be passed 
to this and then to TSHttpTxnErrorBodyBufferSet to create a custom error page. 
The additional IOBufferReader functions are intended to make this easier and to 
handle the use case where the plugin wants direct access to the log format 
output rather than passing it off as an error body.

Reply via email to