01: //========================================================================
02: //Copyright 2006 Mort Bay Consulting Pty. Ltd.
03: //------------------------------------------------------------------------
04: //Licensed under the Apache License, Version 2.0 (the "License");
05: //you may not use this file except in compliance with the License.
06: //You may obtain a copy of the License at
07: //http://www.apache.org/licenses/LICENSE-2.0
08: //Unless required by applicable law or agreed to in writing, software
09: //distributed under the License is distributed on an "AS IS" BASIS,
10: //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11: //See the License for the specific language governing permissions and
12: //limitations under the License.
13: //========================================================================
14:
15: package org.mortbay.jetty.ajp;
16:
17: import org.mortbay.io.BufferCache;
18: import org.mortbay.io.Buffer;
19:
20: /**
21: * @author Markus Kobler
22: */
23: public class Ajp13ResponseHeaders extends BufferCache {
24:
25: public final static int MAGIC = 0xab00;
26:
27: public final static String CONTENT_TYPE = "Content-Type",
28: CONTENT_LANGUAGE = "Content-Language",
29: CONTENT_LENGTH = "Content-Length", DATE = "Date",
30: LAST_MODIFIED = "Last-Modified", LOCATION = "Location",
31: SET_COOKIE = "Set-Cookie", SET_COOKIE2 = "Set-Cookie2",
32: SERVLET_ENGINE = "Servlet-Engine", STATUS = "Status",
33: WWW_AUTHENTICATE = "WWW-Authenticate";
34:
35: public final static int CONTENT_TYPE_ORDINAL = 1,
36: CONTENT_LANGUAGE_ORDINAL = 2, CONTENT_LENGTH_ORDINAL = 3,
37: DATE_ORDINAL = 4, LAST_MODIFIED_ORDINAL = 5,
38: LOCATION_ORDINAL = 6, SET_COOKIE_ORDINAL = 7,
39: SET_COOKIE2_ORDINAL = 8, SERVLET_ENGINE_ORDINAL = 9,
40: STATUS_ORDINAL = 10, WWW_AUTHENTICATE_ORDINAL = 11;
41:
42: public final static BufferCache CACHE = new BufferCache();
43:
44: public final static Buffer CONTENT_TYPE_BUFFER = CACHE.add(
45: CONTENT_TYPE, CONTENT_TYPE_ORDINAL),
46: CONTENT_LANGUAGE_BUFFER = CACHE.add(CONTENT_LANGUAGE,
47: CONTENT_LANGUAGE_ORDINAL),
48: CONTENT_LENGTH_BUFFER = CACHE.add(CONTENT_LENGTH,
49: CONTENT_LENGTH_ORDINAL), DATE_BUFFER = CACHE.add(
50: DATE, DATE_ORDINAL), LAST_MODIFIED_BUFFER = CACHE
51: .add(LAST_MODIFIED, LAST_MODIFIED_ORDINAL),
52: LOCATION_BUFFER = CACHE.add(LOCATION, LOCATION_ORDINAL),
53: SET_COOKIE_BUFFER = CACHE.add(SET_COOKIE,
54: SET_COOKIE_ORDINAL), SET_COOKIE2_BUFFER = CACHE
55: .add(SET_COOKIE2, SET_COOKIE2_ORDINAL),
56: SERVLET_ENGINE_BUFFER = CACHE.add(SERVLET_ENGINE,
57: SERVLET_ENGINE_ORDINAL), STATUS_BUFFER = CACHE.add(
58: STATUS, STATUS_ORDINAL),
59: WWW_AUTHENTICATE_BUFFER = CACHE.add(WWW_AUTHENTICATE,
60: WWW_AUTHENTICATE_ORDINAL);
61:
62: }
|