[jetty-dev] HttpURI

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-dev] HttpURI

Guillaume Maillard
Hi,

Digging in some code I saw in the HttpURI source code :

 public void decodeQueryTo(MultiMap<String> parameters)
    {
        if (_query==_fragment)
            return;


_query and _fragment being defined as String,
I wonder why you are checking strict equality and not using equals.


Regards,

Guillaume

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] HttpURI

Greg Wilkins
As you correctly worked out in your pull request, these used to be indexes rather than strings and the equality check was really checking if the query was 0 length. 

So definitely a bug

On 23 Sep 2017 01:58, "Guillaume Maillard" <[hidden email]> wrote:
Hi,

Digging in some code I saw in the HttpURI source code :

 public void decodeQueryTo(MultiMap<String> parameters)
    {
        if (_query==_fragment)
            return;


_query and _fragment being defined as String,
I wonder why you are checking strict equality and not using equals.


Regards,

Guillaume

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev