users@jersey.java.net

Re: [Jersey] Re: UriInfo bug or as designed?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 10 Feb 2009 11:06:49 +0100

On Feb 7, 2009, at 11:26 PM, Markus KARG wrote:

> Daniel,
>
> query parameters is everything right to the question mark in the URL.
>
> The port 80 is omitted as it is the HTTP default port. The port is
> not a query parameter.
>

And it is not a bug. Port 80 is the default port for HTTP so can be
omitted. It looks like Grizzly is including the default port, but it
is harmless. See here:

http://tools.ietf.org/html/rfc1738#section-3.3

Paul.


> Regards
> Markus
>
> From: Daniel Manzke [mailto:daniel.manzke_at_googlemail.com]
> Sent: Samstag, 7. Februar 2009 21:13
> To: users_at_jersey.dev.java.net
> Subject: [Jersey] Re: UriInfo bug or as designed?
>
> Ok,
>
> I searched for the Java Doc of JAX-RS:
>
> java.net.URI
> getRequestUri()
> Get the absolute request URI including any query parameters.
>
> Does URI with ANY query parameter mean, that the port jas to be
> included?! :)
>
>
> Bye,
> Daniel
>
> 2009/2/7 Daniel Manzke <daniel.manzke_at_googlemail.com>
> Hi there,
>
> ok I got my webdav application up and running, but now I have a
> problem.
>
> It get different result when calling UriInfo.getRequestUri().
>
>
> Grizzly: http://localhost:80/filesystem
> Tomcat: http://localhost/filesystem
>
> You see the difference? :) The PORT is missing. :)
>
>
>
> Is the okay? Or is it a bug?
>
>
>
>
> Bye and a nice weekend from Germany,
> Daniel
>
>
>
> --
> Mit freundlichen Grüßen
>
> Daniel Manzke