You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ligang (JIRA)" <ji...@apache.org> on 2012/12/18 03:48:13 UTC
[jira] [Commented] (TS-1622) Add an API to query if a response
header would be cacheable
[ https://issues.apache.org/jira/browse/TS-1622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534567#comment-13534567 ]
ligang commented on TS-1622:
----------------------------
how about this ?
int TSRespIsCacheable(TSHttpTxn txnp)
{
sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
HttpSM *sm = (HttpSM *) txnp;
HTTPHdr *req_hdr = &(sm->t_state.hdr_info.client_request);
HTTPHdr *resp_hdr = &(sm->t_state.hdr_info.server_response);
return HttpTransact::is_response_cacheable(&sm->t_state, req_hdr, resp_hdr);
}
> Add an API to query if a response header would be cacheable
> -----------------------------------------------------------
>
> Key: TS-1622
> URL: https://issues.apache.org/jira/browse/TS-1622
> Project: Traffic Server
> Issue Type: Improvement
> Reporter: Leif Hedstrom
>
> It would be useful for a plugin to be able to take e.g. a response header (a Hdr object) and ask the HttpSM if this response would be cacheable or not. It should use the same logic (and configs) as the core does normally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira