This is an issue that will be fixed once the latest Undertow release is merged into WF
core. It came about as a result of fixing
With the latest code it only redirects if the target is the war root without a / and the
target servlet is registered as the default servlet.
I have done a Undertow release with this fix, I just need to sort out some of the
development mode stuff before it can be merged into core.
Stuart
On Aug 6, 2013, at 6:55 PM, Bill Burke <bburke(a)redhat.com> wrote:
> Client is doing a get request:
>
> GET /jaxrs_spec_resource_requestmatching_web HTTP/1.1
>
>
> Response is is a 302. Notice that there is no trailing / for the path.
> Is this part of tthe servlet spec or something?
Is this a WAR root or subdirectory (and not a servlet)? if so then yes, take
a look at section 10.10 of the servlet spec. It just uses the term
"redirect" and in all other places in the spec they refer to 302 with the
word redirect, and never 301.
> Did Undertow used to
> send a 301, or just invoke on the war's root?
I think it used to forward.
>
> I have a JAX-RS TCK test that is regressing. It is expecting a 200 or
> 301 response back from the server. I need to know how to word the
> challenge to allow 302 as well, or Undertow needs to be fixed.
I am not sure which makes more sense. 301 would be more efficient but I can
think of some contrived scenarios where you change the layout of your war
and the client misbehaves.
e.g you have foo.war/blah/ as a directory but then you later map blah to a
servlet, so then the servlet gets the trailing slash which it somehow
mishandles.
Hmm. As I say that I am leaning more towards 301.
IMO the TCK should accept any redirect status code, since it is not
restricted in the spec.
>
> Thanks,
>
> Bill
>
> --
> Bill Burke
> JBoss, a division of Red Hat
>
http://bill.burkecentral.com
> _______________________________________________
> undertow-dev mailing list
> undertow-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/undertow-dev
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev