Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] HTTP Client, Request.getPath() interface change in 9.0.3

Great, thanks for the fix and this clarification, as the change wasn't clear in the release notes nor javadoc.

--David

On 05/10/2013 01:21 PM, Joakim Erdfelt wrote:
I think the existence of the the query parameters in the getPath() was a mistake. a bug.

Also think the API is being aligned to match behavior in the Servlet Spec and the Java WebSocket API (both which exclude query parameters from paths and request URIs, and instead have a getQuery() method to specifically get the query string)

HttpClient version:

javax.servlet.http.HttpServletRequest version:

javax.websocket.server.HandshakeRequest version:
org.eclipse.jetty.websocket.api.UpgradeRequest version:

On Fri, May 10, 2013 at 1:07 PM, David Kellum <dek94@xxxxxxxxxxxxx> wrote:
It might be worth noting that 9.0.3.v20130506 appears to introduce an interface change, which is possibly also a desirably fix, in that org.eclipse.jetty.client.api.Request.getPath() no longer includes any query string parameters that might be present.  I'm guessing this had something to do with:

jetty-9.0.3.v20130506 06 May 2013
  + 406015 Query parameters and POST queries. Fixed proxy case where the path is
    rewritten to be absolute.

But this particular change is broader than only proxy requests.  I was relying on query parameters being in getPath() through 9.0.2.  A workaround that makes user code work for all 9.0.x versions, 9.0.3 included, is to use the similar accessors available via Request.getURI() -> URI.

Back to the top