"Nicola Ken Barozzi" <[EMAIL PROTECTED]> wrote: > > Good work ;-)
Ok, part one of two: I fixed redirections and they seem to work all right now. Problem is that the flow still doesn't work (I'll have to dig into that in more details, maybe Ovidiu can you give me a couple of clues?) Attached is what I sent to Jetty-DEV, once the patch is included by them, I'll put up a new Jar in CVS (jetty-4.2.6-dev.jar or do you prefer something like jetty-20030128.jar ???)... FUN FUN FUN! :-) Pier
--- Begin Message ---"Pier Fumagalli" <[EMAIL PROTECTED]> wrote: > The patch works great... Thank you Greg... (Well, I told you this already, > but just FYI to the list). Another little problem with "sendredirect"... If the request URL ends with a '/' character (like I'm requesting stuff from a '/News/') and I want to send a redirection, URI.parentPath is misused... This patch should fix it somehow: it checks if the last character in the current request URI is '/' and if NOT so (only in that case) it will call URI.parentPath()... I thought also about fixing URI.parentPath(), but that might break other stuff (and we don't want that to happen)... Greg? Anyone? Comments? Pier Index: src/org/mortbay/jetty/servlet/ServletHttpResponse.java =================================================================== RCS file: /cvsroot/jetty/Jetty/src/org/mortbay/jetty/servlet/ServletHttpResponse.java, v retrieving revision 1.32 diff -U3 -r1.32 ServletHttpResponse.java --- src/org/mortbay/jetty/servlet/ServletHttpResponse.java 19 Jan 2003 21:42:38 -0000 1.32 +++ src/org/mortbay/jetty/servlet/ServletHttpResponse.java 28 Jan 2003 16:15:36 -0000 @@ -419,7 +419,10 @@ buf.append(URI.canonicalPath(url)); else { - url=URI.canonicalPath(URI.addPaths(URI.parentPath(_servletHttpRequest.getReq uestURI()),url)); + String ruri=_servletHttpRequest.getRequestURI(); + if (ruri.charAt(ruri.length()-1)!='/') + ruri=URI.parentPath(ruri); + url=URI.canonicalPath(URI.addPaths(ruri,url)); if (!url.startsWith("/")) buf.append('/'); buf.append(url); For the latest information about Jetty, please see http://jetty.mortbay.org To alter your subscription to this list goto http://groups.yahoo.com/group/jetty-discuss Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/--- End Message ---
patch.txt
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]