hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Richeton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1375) Add context attribute when request are processed by an AsynchronousValidator
Date Mon, 22 Jul 2013 09:50:48 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13715062#comment-13715062
] 

Nicolas Richeton commented on HTTPCLIENT-1375:
----------------------------------------------

We found an alternate way to solve our use case without requiring change in HttpClient (using
a response wrapper which checks if the response has already been sent. response sent = calls
are made from an asynchronous validator)
While I still think this change may be useful in some other use cases, we no longer need it
right now. 

If you don't see a valid use case, and no one request it, feel free to close this issue.

--
Nicolas
                
> Add context attribute when request are processed by an AsynchronousValidator 
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1375
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1375
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpCache
>    Affects Versions: 4.2.5, 4.3 Beta2
>            Reporter: Nicolas Richeton
>            Priority: Minor
>             Fix For: 4.3 Beta3
>
>
> With the current code, it seems to be no way to know if a request is being processed
as a normal request, or if it is being processed by an AsynchronousValidator. 
> Our use case is : 
> - CachingHttpClient is used in a web app.
> - We use a custom cookie store to store cookies in user session (other usecases could
be access to session/response objects while processing the request, custom code between CachingHttpClient
and HttpClient). 
> - We use background revalidation. 
> - If the backend returns a cookie during revalidation, we have no longer access to the
session so we want to ignore the cookie and prevent calls on session object. 
> But we cannot identify the asynchronous request since it is the same as a synchronous
one. 
> A possible solution could be to add an attribute to the request context in AsynchronousValidationRequest
constructor, something like : context.setAttribute( "asyncRequest", "true");

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message