-
Notifications
You must be signed in to change notification settings - Fork 401
[WICKET-7162] avoid a NPE when a JavaxUpgradeHttpRequest is created i… #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| if (httpSession == null) | ||
| { | ||
| this.contextPath = "/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martin-g I'm not sure this is correct or if this path is used anywhere else.. I was looking into code base and didn't see any other object from where we could take the path. We are getting this NPE from time to time on our test severs...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure either. It should be OK.
| userProperties.put("session", httpSession); | ||
| userProperties.put(JavaxUpgradeHttpRequest.SESSION, httpSession); | ||
| } else { | ||
| sec.getPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it is
|
|
||
| if (httpSession == null) | ||
| { | ||
| this.contextPath = "/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure either. It should be OK.
| if (requestURI != null) | ||
| { | ||
| userProperties.put("requestURI", requestURI); | ||
| String path = requestURI.getPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martin-g I think this should always work.
...cket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketServerEndpointConfig.java
Show resolved
Hide resolved
...bsocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/JavaxUpgradeHttpRequest.java
Show resolved
Hide resolved
…n a situation when there is no session (e.g. some stateless page) and extract context from requestedUI
d531a56 to
c574107
Compare
…n a situation when there is no session (e.g. some stateless page).