Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,15 @@
response.addCookie(sessionCookie);
}

public static String getHeaderOrLegacy(HttpServletRequest request, String headerName, String legacyHeaderName) {

Check warning on line 238 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Reference type 'String' is missing a nullability annotation. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java:238:91: warning: Reference type 'String' is missing a nullability annotation. (sh.adelessfox.checkstyle.checks.NullabilityAnnotationsCheck)

Check warning on line 238 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Reference type 'String' is missing a nullability annotation. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java:238:72: warning: Reference type 'String' is missing a nullability annotation. (sh.adelessfox.checkstyle.checks.NullabilityAnnotationsCheck)

Check warning on line 238 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Reference type 'HttpServletRequest' is missing a nullability annotation. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java:238:44: warning: Reference type 'HttpServletRequest' is missing a nullability annotation. (sh.adelessfox.checkstyle.checks.NullabilityAnnotationsCheck)

Check warning on line 238 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Reference type 'String' is missing a nullability annotation. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java:238:19: warning: Reference type 'String' is missing a nullability annotation. (sh.adelessfox.checkstyle.checks.NullabilityAnnotationsCheck)
String value = request.getHeader(headerName);
if (CommonUtils.isEmpty(value)) {
value = request.getHeader(legacyHeaderName);
}
return value;
}

public static String getRequestCookie(HttpServletRequest request, String cookieName) {

Check warning on line 246 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Reference type 'String' is missing a nullability annotation. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java:246:71: warning: Reference type 'String' is missing a nullability annotation. (sh.adelessfox.checkstyle.checks.NullabilityAnnotationsCheck)

Check warning on line 246 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Reference type 'HttpServletRequest' is missing a nullability annotation. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java:246:43: warning: Reference type 'HttpServletRequest' is missing a nullability annotation. (sh.adelessfox.checkstyle.checks.NullabilityAnnotationsCheck)

Check warning on line 246 in server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Reference type 'String' is missing a nullability annotation. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/ServletAppUtils.java:246:19: warning: Reference type 'String' is missing a nullability annotation. (sh.adelessfox.checkstyle.checks.NullabilityAnnotationsCheck)
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (Cookie cookie : cookies) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ private CBEventsLongPolling getOrCreatePollSession(@NotNull BaseWebSession ws, @

ps.handleWebSessionEvent(new WSSocketConnectedEvent(ws.getApplication().getApplicationRunId()));
resp.setHeader(WSConstants.WS_SESSION_HEADER, sid);
resp.setHeader(WSConstants.WS_SESSION_HEADER_LEGACY, sid);
log.debug("HTTP Long-Poll channel opened for session " + sid);

return ps;
Expand Down Expand Up @@ -304,7 +305,7 @@ public static class HeadlessSessionResolver implements SessionResolver {
@Override
public BaseWebSession resolve(@NotNull HttpServletRequest req) throws SMException {

String sid = req.getHeader(WSConstants.WS_SESSION_HEADER);
String sid = ServletAppUtils.getHeaderOrLegacy(req, WSConstants.WS_SESSION_HEADER, WSConstants.WS_SESSION_HEADER_LEGACY);
String token = req.getHeader(WSConstants.WS_AUTH_HEADER);

if (CommonUtils.isEmpty(sid) && CommonUtils.isEmpty(token)) {
Expand Down
Loading