Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Bug - MovedContextHandler does not use 301 when permanent is true

This is in Jetty 7.1.6 stable.
MovedContextHandler always uses 302, moved temporarily. no matter what is the value of the permanent flag.
I confirmed that when seeing the headers from my server. This problem is critical as Google and some of the other search engines threat 302 differently from 301 and that will seriously affect a site ranking by splitting link value between the urls that you want to forward to one another. For example when redirecting non www version of the domain site to www.
I looked at the source, it seems OK, maybe the problem is in the servlet API, look at this article
they use sendError there to produce 301 and you use setStatus. The API doc itself says that your way is the correct one, but it does not work.
Best Regards,

Back to the top