Package org.apache.tomcat.util.http
Class HttpMessages
java.lang.Object
org.apache.tomcat.util.http.HttpMessages
Handle (internationalized) HTTP messages.
- Author:
- James Duncan Davidson [duncan@eng.sun.com], James Todd [gonzo@eng.sun.com], Jason Hunter [jch@eng.sun.com], Harish Prabandham, costin@eng.sun.com
- 
Method SummaryModifier and TypeMethodDescriptionstatic HttpMessagesgetInstance(Locale locale) getMessage(int status) Get the status string associated with a status code.static booleanisSafeInHttpHeader(String msg) Is the provided message safe to use in an HTTP header.
- 
Method Details- 
getMessageGet the status string associated with a status code. Common messages are cached.- Parameters:
- status- The HTTP status code to retrieve the message for
- Returns:
- The HTTP status string that conforms to the requirements of the HTTP specification
 
- 
getInstance
- 
isSafeInHttpHeaderIs the provided message safe to use in an HTTP header. Safe messages must meet the requirements of RFC2616 - i.e. must consist only of TEXT.- Parameters:
- msg- The message to test
- Returns:
- trueif the message is safe to use in an HTTP header else- false
 
 
-