Skip to content

fixes #2324 getRequestURL(path) should not include current request's query string - #2327

Merged
jknack merged 3 commits into
jooby-project:2.xfrom
codeborne:fix-get-request-path
May 4, 2021
Merged

jknack merged 3 commits into
jooby-project:2.xfrom
codeborne:fix-get-request-path

Conversation

@cbxp

@cbxp cbxp commented Apr 27, 2021

Copy link
Copy Markdown

No description provided.

return getRequestURL(null);
}

@Override default @Nonnull String getRequestURL(@Nonnull String path) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep the @Nonnull annotation. This always append the provided path (never the getRequestPath and never append the queryString


@Override default @Nonnull String getRequestURL() {
return getRequestURL("");
return getRequestURL(null);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one add call getRequestURL(getRequestPath()) and append queryString if present

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is probably a better idea, yes

@jknack

jknack commented Apr 27, 2021

Copy link
Copy Markdown
Member

Looks good, couple of comment. Let's make sure javadoc is updated too

@angryziber

Copy link
Copy Markdown
Contributor

@jknack so, is it ok now to merge?

@jknack jknack added this to the 2.9.6 milestone May 4, 2021
@jknack
jknack merged commit 2ea2363 into jooby-project:2.x May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants