Search the web
Sign In
New User? Sign Up
jetty-discuss · Jetty Discussion
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Question regarding HttpResponse   Message List  
Reply | Forward Message #7515 of 8501 |
Hello, I am using jetty 5.1.10, and I seem to have a problem with the
sendError method of HttpServletResponse, as it encodes the error message (for
example, replacing spaces with plus). Debugging with the sources I found that
happens here in HttpResponse.class :

public void setStatus(int code,String message)
{
setStatus(code);
Integer code_integer=TypeUtil.newInteger(code);
if (message == null)
{
message = (String)__statusMsg.get(code_integer);
if (message==null)
message=""+code;
setReason(message);
}
else
setReason(UrlEncoded.encodeString(message)); <--- HERE
}

As that code has not been touch in 7 months (according to CVS) maybe I am the
only one with the problem. What I wonder is what is the encode for. Does a
RFC specify so?
Also, may it be that messages kept in the variable __statusMsg are not being
encoded?
Right now to solve this issue, I am using the setStatus() method (from
HttpServletResponse), although it is deprecated.
I would like some clarification of why it is being encoded.

Thank you very much,
Luciano Leggieri



_______________________________________________
jetty-discuss mailing list
jetty-discuss@...
https://lists.sourceforge.net/lists/listinfo/jetty-discuss



Wed Jun 7, 2006 1:10 pm

jetty-discuss@...
Send Email Send Email

Forward
Message #7515 of 8501 |
Expand Messages Author Sort by Date

Hello, I am using jetty 5.1.10, and I seem to have a problem with the sendError method of HttpServletResponse, as it encodes the error message (for example,...
Luciano Leggieri
jetty-discuss@...
Send Email
Jun 7, 2006
10:12 pm

Ciao Liciano, We encode the status method because the jasper JSP engine can pass user supplied data as the status method. This makes it possible for mal-ware...
Greg Wilkins
gregjwilkins
Offline Send Email
Jun 20, 2006
3:38 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help