Issue #2901 - Moving Http Upgrader to Http Conversation
+ Solves for Authentication and Redirect Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
aebe436e00
commit
00843c8ed9
|
@ -108,7 +108,7 @@ public class HttpRequest implements Request
|
|||
headers.put(userAgentField);
|
||||
}
|
||||
|
||||
protected HttpConversation getConversation()
|
||||
public HttpConversation getConversation()
|
||||
{
|
||||
return conversation;
|
||||
}
|
||||
|
|
|
@ -110,16 +110,16 @@ public class HttpChannelOverHTTP extends HttpChannel
|
|||
|
||||
// Upgrade Response
|
||||
HttpRequest request = exchange.getRequest();
|
||||
if (request instanceof HttpConnectionUpgrader)
|
||||
HttpConnectionUpgrader upgrader = (HttpConnectionUpgrader) request.getConversation().getAttribute(HttpConnectionUpgrader.class.getName());
|
||||
if (upgrader != null)
|
||||
{
|
||||
HttpConnectionUpgrader listener = (HttpConnectionUpgrader)request;
|
||||
try
|
||||
{
|
||||
listener.upgrade(response,getHttpConnection());
|
||||
upgrader.upgrade(response, getHttpConnection());
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
return new Result(result,x);
|
||||
return new Result(result, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue