1 /*
2 * $HeadURL: https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1/httpcore/src/main/java/org/apache/http/params/CoreProtocolPNames.java $
3 * $Revision: 729513 $
4 * $Date: 2008-12-26 18:06:04 +0100 (Fri, 26 Dec 2008) $
5 *
6 * ====================================================================
7 * Licensed to the Apache Software Foundation (ASF) under one
8 * or more contributor license agreements. See the NOTICE file
9 * distributed with this work for additional information
10 * regarding copyright ownership. The ASF licenses this file
11 * to you under the Apache License, Version 2.0 (the
12 * "License"); you may not use this file except in compliance
13 * with the License. You may obtain a copy of the License at
14 *
15 * http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing,
18 * software distributed under the License is distributed on an
19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 * KIND, either express or implied. See the License for the
21 * specific language governing permissions and limitations
22 * under the License.
23 * ====================================================================
24 *
25 * This software consists of voluntary contributions made by many
26 * individuals on behalf of the Apache Software Foundation. For more
27 * information on the Apache Software Foundation, please see
28 * <http://www.apache.org/>.
29 *
30 */
31
32 package org.apache.http.params;
33
34 import org.apache.http.ProtocolVersion;
35
36 /**
37 * Defines parameter names for protocol execution in HttpCore.
38 *
39 * @version $Revision: 729513 $
40 *
41 * @since 4.0
42 */
43 public interface CoreProtocolPNames {
44
45 /**
46 * Defines the {@link ProtocolVersion} used per default.
47 * <p>
48 * This parameter expects a value of type {@link ProtocolVersion}.
49 * </p>
50 */
51 public static final String PROTOCOL_VERSION = "http.protocol.version";
52
53 /**
54 * Defines the charset to be used for encoding HTTP protocol elements.
55 * <p>
56 * This parameter expects a value of type {@link String}.
57 * </p>
58 */
59 public static final String HTTP_ELEMENT_CHARSET = "http.protocol.element-charset";
60
61 /**
62 * Defines the charset to be used per default for encoding content body.
63 * <p>
64 * This parameter expects a value of type {@link String}.
65 * </p>
66 */
67 public static final String HTTP_CONTENT_CHARSET = "http.protocol.content-charset";
68
69 /**
70 * Defines the content of the <code>User-Agent</code> header.
71 * <p>
72 * This parameter expects a value of type {@link String}.
73 * </p>
74 */
75 public static final String USER_AGENT = "http.useragent";
76
77 /**
78 * Defines the content of the <code>Server</code> header.
79 * <p>
80 * This parameter expects a value of type {@link String}.
81 * </p>
82 */
83 public static final String ORIGIN_SERVER = "http.origin-server";
84
85 /**
86 * Defines whether responses with an invalid <code>Transfer-Encoding</code>
87 * header should be rejected.
88 * <p>
89 * This parameter expects a value of type {@link Boolean}.
90 * </p>
91 */
92 public static final String STRICT_TRANSFER_ENCODING = "http.protocol.strict-transfer-encoding";
93
94 /**
95 * <p>
96 * Activates 'Expect: 100-Continue' handshake for the
97 * entity enclosing methods. The purpose of the 'Expect: 100-Continue'
98 * handshake to allow a client that is sending a request message with
99 * a request body to determine if the origin server is willing to
100 * accept the request (based on the request headers) before the client
101 * sends the request body.
102 * </p>
103 *
104 * <p>
105 * The use of the 'Expect: 100-continue' handshake can result in
106 * noticable peformance improvement for entity enclosing requests
107 * (such as POST and PUT) that require the target server's
108 * authentication.
109 * </p>
110 *
111 * <p>
112 * 'Expect: 100-continue' handshake should be used with
113 * caution, as it may cause problems with HTTP servers and
114 * proxies that do not support HTTP/1.1 protocol.
115 * </p>
116 *
117 * This parameter expects a value of type {@link Boolean}.
118 */
119 public static final String USE_EXPECT_CONTINUE = "http.protocol.expect-continue";
120
121 /**
122 * <p>
123 * Defines the maximum period of time in milliseconds the client should spend
124 * waiting for a 100-continue response.
125 * </p>
126 *
127 * This parameter expects a value of type {@link Integer}.
128 */
129 public static final String WAIT_FOR_CONTINUE = "http.protocol.wait-for-continue";
130
131 }