[Jetty-support] Bug - MovedContextHandler does not use 301 when permanent is true

"Boris Hamanov" <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <0743D2E3B17D41DFB0A92913F888FC99@GreenCitadel>
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 http://www.w3.org/TR/WCAG-TECHS/SVR1.html
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,
Boris

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev

_______________________________________________
Jetty-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jetty-support
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.