You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Diane Smith (JIRA)" <ji...@apache.org> on 2010/03/30 22:28:27 UTC

[jira] Resolved: (TS-251) Add INKHttpIsInternalRequest to sdk documentation

     [ https://issues.apache.org/jira/browse/TS-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diane Smith resolved TS-251.
----------------------------

    Resolution: Fixed

Added function to the newly-created "General HTTP Functions" section, located within "HTTP Functions" SDK chapt 

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