Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

getRequestURL can append "null" if getRequestURI is unspecified in an authority-form request-target #8578

Closed
electrum opened this issue Sep 9, 2022 · 3 comments
Assignees
Labels
Bug For general bugs on Jetty side Sponsored This issue affects a user with a commercial support agreement

Comments

@electrum
Copy link

electrum commented Sep 9, 2022

Jetty version(s)

9.4.x
10.x

Description

When upgrading to Jetty 9.4.48, we see that AbstractProxyServlet.rewriteTarget() calls clientRequest.getRequestURL() which results in https://localhost:50393null due to getRequestURI() returning null (since the URI path is null). While this Request behavior seems to have existed for ~10 years and is not the root issue, it still seems to be a bug.

@electrum electrum added the Bug For general bugs on Jetty side label Sep 9, 2022
@joakime joakime added the Sponsored This issue affects a user with a commercial support agreement label Sep 9, 2022
joakime added a commit that referenced this issue Sep 9, 2022
…URI when working with CONNECT method

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime
Copy link
Contributor

joakime commented Sep 9, 2022

Opened PR #8579 to solve for jetty-9.4.x.

Attempting to replicate in jetty-10.0.x now ...

joakime added a commit that referenced this issue Sep 9, 2022
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Sep 9, 2022
…URI when working with CONNECT method

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime
Copy link
Contributor

joakime commented Sep 9, 2022

Opened PR #8580 to solve for jetty-10.0.x (this will be merged to jetty-11.0.x once approved/merged)

@joakime joakime self-assigned this Sep 9, 2022
joakime added a commit that referenced this issue Sep 12, 2022
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Sep 12, 2022
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Sep 13, 2022
…ull-request-url

Issue #8578 - `getRequestURL` can append "null" if `getRequestURI` is unspecified in an authority-form request-target
joakime added a commit that referenced this issue Sep 13, 2022
…null-uri

Issue #8578 - `getRequestURL` can append "null" if `getRequestURI` is unspecified in an authority-form request-target
@joakime
Copy link
Contributor

joakime commented Sep 13, 2022

Complete.

Merged from 9.4.x through to 12.0.x

@joakime joakime closed this as completed Sep 13, 2022
@joakime joakime changed the title Request.getRequestURL() can append null getRequestURI() getRequestURL can append "null" if getRequestURI is unspecified in an authority-form request-target Sep 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug For general bugs on Jetty side Sponsored This issue affects a user with a commercial support agreement
Projects
None yet
Development

No branches or pull requests

2 participants