395232 - UpgradeRequest object passed to createWebSocket() has null Session

+ Server side UpgradeRequest.getSession() now has HttpSession (if
  it has already been created)
This commit is contained in:
Joakim Erdfelt 2013-01-31 11:26:17 -07:00
parent 32cb1045ba
commit 1aa6e63d25

View File

@ -135,6 +135,17 @@ public class ServletWebSocketRequest extends UpgradeRequest
return parameters; return parameters;
} }
/**
* Return the HttpSession if it exists.
* <p>
* Note: this is equivalent to {@link HttpServletRequest#getSession()} and will not create a new HttpSession.
*/
@Override
public Object getSession()
{
return this.req.getSession();
}
protected String[] parseProtocols(String protocol) protected String[] parseProtocols(String protocol)
{ {
if (protocol == null) if (protocol == null)