Package play.utils
Class HTTP
- java.lang.Object
-
- play.utils.HTTP
-
public class HTTP extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HTTP.ContentTypeWithEncoding
-
Constructor Summary
Constructors Constructor Description HTTP()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
fixCaseForHttpHeader(java.lang.String headerName)
Use this method to make sure you have the correct casing of a http header name.static boolean
isModified(java.lang.String etag, long last, java.lang.String browserEtag, java.lang.String ifModifiedSince)
Checks if an entity was modified or notstatic HTTP.ContentTypeWithEncoding
parseContentType(java.lang.String contentType)
-
-
-
Method Detail
-
parseContentType
public static HTTP.ContentTypeWithEncoding parseContentType(java.lang.String contentType)
-
fixCaseForHttpHeader
public static java.lang.String fixCaseForHttpHeader(java.lang.String headerName)
Use this method to make sure you have the correct casing of a http header name. eg: fixes 'content-type' to 'Content-Type'- Parameters:
headerName
- The given header name to check- Returns:
- The correct header name
-
isModified
public static boolean isModified(java.lang.String etag, long last, java.lang.String browserEtag, java.lang.String ifModifiedSince)
Checks if an entity was modified or not
- Parameters:
etag
- the entity taglast
- a Last-Modified valuebrowserEtag
- an entity tag from request headerifModifiedSince
- a Last-Modified value from request header 'If-Modified-Since'- Returns:
true
if the entity was modified- See Also:
- RFC 2616 - Hypertext Transfer Protocol - Section 14.26
-
-