-
Notifications
You must be signed in to change notification settings - Fork 2k
Issue #11505 - Document HttpURI methods #14200
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
base: jetty-12.1.x
Are you sure you want to change the base?
Conversation
| * @return The last path parameter or null | ||
| * <p>Get a URI path parameter.</p> | ||
| * <p>Path parameters (also known as matrix parameters) were defined in | ||
| * <a href="https://tools.ietf.org/html/rfc2396#section-3.3">RFC2396</a> and appear |
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 first shows up in https://www.rfc-editor.org/rfc/rfc2068#section-3.2.1
I've never seen it called matrix parameters before.
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.
BTW, where did you get "matrix parameters" from?
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.
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.
Thanks.
Looks like Tim Berners-Lee even had comments about this awkward, and historical, piece of the URL/URI specs.
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.
Looks like Jakarta EE Rest (what used to be called JAXRS) even has a @MatrixParam concept that uses this ...
It's implementation is a bit limited though, it only cares about the last path segment.
If a param exists in path segments that are not the last it considers that entire URL/URI as ambiguous and doesn't throws an exception.
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.
@joakime should we add the "matrix parameters" back to the Javadoc then, to pay a tribute? Suggest a text
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.
Interestingly the path parameters are still referenced in the current active URI spec too.
See: https://www.rfc-editor.org/rfc/rfc3986#section-3.3
Aside from dot-segments in hierarchical paths, a path segment is
considered opaque by the generic syntax. URI producing applications
often use the reserved characters allowed in a segment to delimit
scheme-specific or dereference-handler-specific subcomponents. For
example, the semicolon (";") and equals ("=") reserved characters are
often used to delimit parameters and parameter values applicable to
that segment. The comma (",") reserved character is often used for ...
Add method-level Javadoc to
HttpURIclass which was missing documentation for most public methods: