[
https://issues.apache.org/jira/browse/TS-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on TS-251 started by Diane Smith.
> Add INKHttpIsInternalRequest to sdk documentation
> --------------------------------------------------
>
> Key: TS-251
> URL: https://issues.apache.org/jira/browse/TS-251
> Project: Traffic Server
> Issue Type: New Feature
> Reporter: Miles Libbey
> Assignee: Diane Smith
>
> Where it should live : HTTP Functions
> What it does : Check if the state machine/request is internal
> Prototype : bool INKHttpIsInternalRequest(INKHttpTxn txnp);
> Description :
> Provides an API to distinguish between internal and external requests.
> Internal requests are those Checks if request being handled originated from
> with the traffic server process. ( any request that came in through a
> connection created by INKHttpConnect.)
> Returns : true if the request originated from within the traffic server
> process
> Use case :
> A plugin to implement stale-while-revalidate makes a background fetch request
> when the data in cache is stale. The background fetch request is made on the
> INKVConn returned by INKHttpConnect. When the swr plugin sees this background
> fetch request, it needs to turn off read while write.
> In addition to checking for the special header that gets inserted for the
> background fetch request, the plugin has to
> check to see if the request was internal or not. This is because the header
> can be spoofed.
> background info
> Some plugins (like those modifying cache-control behaviors) need to know
> whether the current state machine that they are running within was originated
> by an external connection (through the http port) or as an internal one such
> as one created by something like InkHTTPConnect.
> Currently, there is no way for
> - the state machine to know whether its a state machine created by an
> external connection or one that is internal
> - since the State Machine itself doesn't know how it was created, plugins
> have no way of knowing either
> (for questions -- see Raghav J)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.