My apologies -- I actually didn't catch that HTTP_TARGET_HOST returns a HttpHost object with a scheme property. I thought TARGET_HOST just returned a String. Thank you for pointing that out. For the record, Signpost works great in a request interceptor!
Thanks again Oleg. On Mon, Sep 13, 2010 at 11:15 AM, Oleg Kalnichevski <ol...@apache.org>wrote: > On Mon, 2010-09-13 at 09:03 -0400, Thom Nichols wrote: > > A follow-up question -- > > > > I'm not sure how to reconstruct the full request URI given the > > HttpURIRequest and HttpContext. It appears the URI from the request > itself > > always contains the path portion of the original request URI. I can get > the > > host & port from the ExecutionContext.HTTP_TARGET_HOST attribute in the > > HttpContext. But how do I determine the URI scheme? > > > > HttpHost#getSchemeName() should give you the URI scheme of the original > request. > > > > I'm trying to integrate Signpost OAuth via an HttpRequestInterceptor in > lieu > > of the same information in an AuthScheme callback. But given that both > the > > HttpRequest I'm given and the one that's contained in the HttpContext > > ExecutionContext.HTTP_REQUEST attribute both appear to contain the > mutable > > HttpRequest copy rather than the original immutable one, I'm not sure how > to > > get or reliably reconstruct the original request URI. > > > > The ExecutionContext#HTTP_TARGET_HOST and ExecutionContext#HTTP_REQUEST > attributes set in the context should be sufficient to construct the > absolute request URI. > > Hope this helps. > > Oleg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > For additional commands, e-mail: dev-h...@hc.apache.org > >