GitHub user ato opened a pull request:

    https://github.com/apache/httpcomponents-core/pull/70

    Add the original request's context to the server pushed's context

    This is to enable the push consumer to determine which request the server 
sent the push in reply to when there are multiple multiplexed requests active.
    
    There may be a more appropriate name than 'original context'. I also 
considered 'source context' and 'pushed from context' but wasn't totally happy 
with any of them. I'm also unsure if there's a better way to access the context 
than making it package-private like this.
    
    This is core part of solving the problem I described in "Associating a 
server push with the original client request" [thread] on the users list.
    
    The client part is to change AsyncPushConsumer to receive the push's 
HttpContext. It currently only has access to the push's HttpRequest and 
HttpResponse. The push consumer could then do something like:
    
        context.getOriginalContext().getRequest();
    
    In my 'saving to a directory' example when I make the request add a custom 
context attribute for the directory I want to save to and then access it in the 
push consumer like:
    
         
context.getOriginalContext().getAttribute("myapp.request-specific-output-directory");
    
    [thread]: 
http://mail-archives.apache.org/mod_mbox/hc-httpclient-users/201807.mbox/%3C1531636562.3812678.1441097240.7E58FF13%40webmail.messagingengine.com%3E

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ato/httpcomponents-core push-original-context

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/httpcomponents-core/pull/70.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #70
    
----
commit c12dcf6915450a487c1796e1690743317588f692
Author: Alex Osborne <aosborne@...>
Date:   2018-07-15T14:01:25Z

    Add the original request's context to the server pushed's context
    
    This is to enable the push consumer to determine which request the
    server sent the push in reply to when there are multiple
    multiplexed requests active.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to