View Javadoc

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