You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Both the migration guides in the docs as well as this code sample mention that Request.getHttpURI replaces HttpServletRequest.getRequestURL. However, they are not identical: Request.getHttpURI also includes the query part, while HttpServletRequest.getRequestURL doesn't. This becomes obvious when looking at Jetty's servlet API implementation, which strips the query part before returning the URL:
This might not make a difference in many cases, but we did have a case where this incorrect migration introduced a bug, so it might be worth pointing out in the migration guides.
The text was updated successfully, but these errors were encountered:
Jetty version(s)
Jetty 12.0.10
Jetty Environment
core, docs
Description
Both the migration guides in the docs as well as this code sample mention that
Request.getHttpURI
replacesHttpServletRequest.getRequestURL
. However, they are not identical:Request.getHttpURI
also includes the query part, whileHttpServletRequest.getRequestURL
doesn't. This becomes obvious when looking at Jetty's servlet API implementation, which strips the query part before returning the URL:jetty.project/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest.java
Lines 504 to 508 in 9d0a457
This might not make a difference in many cases, but we did have a case where this incorrect migration introduced a bug, so it might be worth pointing out in the migration guides.
The text was updated successfully, but these errors were encountered: