Sort header names
This commit is contained in:
parent
8c694b3bfb
commit
605bbac15c
@ -33,7 +33,10 @@ import org.jboss.netty.util.internal.CaseIgnoringComparator;
|
||||
public class HttpHeaders {
|
||||
|
||||
/**
|
||||
* Standard HTTP header names.
|
||||
* Standard and CORS HTTP header names.
|
||||
* For CORS headers, see
|
||||
* https://developer.mozilla.org/en-US/docs/HTTP_access_control
|
||||
*
|
||||
* @apiviz.stereotype static
|
||||
*/
|
||||
public static final class Names {
|
||||
@ -61,6 +64,38 @@ public class HttpHeaders {
|
||||
* {@code "Accept-Patch"}
|
||||
*/
|
||||
public static final String ACCEPT_PATCH = "Accept-Patch";
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Credentials"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Headers"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Methods"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Origin"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
|
||||
/**
|
||||
* {@code "Access-Control-Expose-Headers"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
|
||||
/**
|
||||
* {@code "Access-Control-Max-Age"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
|
||||
/**
|
||||
* {@code "Access-Control-Request-Headers"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers";
|
||||
/**
|
||||
* {@code "Access-Control-Request-Method"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method";
|
||||
/**
|
||||
* {@code "Age"}
|
||||
*/
|
||||
@ -298,49 +333,6 @@ public class HttpHeaders {
|
||||
*/
|
||||
public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
|
||||
|
||||
// CORS:
|
||||
// http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
|
||||
// https://developer.mozilla.org/en-US/docs/HTTP_access_control
|
||||
|
||||
// CORS response headers
|
||||
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Origin"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
|
||||
/**
|
||||
* {@code "Access-Control-Expose-Headers"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
|
||||
/**
|
||||
* {@code "Access-Control-Max-Age"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Credentials"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Methods"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
|
||||
/**
|
||||
* {@code "Access-Control-Allow-Headers"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
|
||||
|
||||
// CORS request headers
|
||||
// "Origin" has already been declared above
|
||||
|
||||
/**
|
||||
* {@code "Access-Control-Request-Method"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_REQUEST_METHODS = "Access-Control-Request-Method";
|
||||
/**
|
||||
* {@code "Access-Control-Request-Headers"}
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers";
|
||||
|
||||
private Names() {
|
||||
super();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user