globus_xio 6.6
Loading...
Searching...
No Matches
globus_xio_http.h
Go to the documentation of this file.
1/*
2 * Copyright 1999-2006 University of Chicago
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#if !defined GLOBUS_XIO_DRIVER_HTTP_H
18#define GLOBUS_XIO_DRIVER_HTTP_H 1
19
24#include "globus_xio.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
43
67
79
100
111
130
132 * @brief HTTP Header
133 * @ingroup globus_xio_http_driver
134 */
135typedef struct
136{
138 char * name;
139
140 char * value;
141}
143
145 * HTTP driver specific cntls
146 * @ingroup globus_xio_http_driver_cntls
147 */
148typedef enum
164
170 * - A Content-Length header is not present
171 * - The HTTP version is set to "HTTP/1.0"
172 * - The Connection header is set to "close"
173 * Attempts to set this to "chunked" with an "HTTP/1.0" client will
174 * fail with a GLOBUS_XIO_ERROR_HTTP_INVALID_HEADER error.
175 * - Content-Length: 1*Digit
176 * - Provide a content length for the response message. If the
177 * "chunked" transfer encoding is being used, then this header
178 * will be silently ignored by the HTTP driver.
179 * - Connection: close
180 * - The HTTP connection will be closed after the end of the data
181 * response is written.
182 *
183 * @return This handle control function can fail with
184 * - GLOBUS_XIO_ERROR_MEMORY
185 * - GLOBUS_XIO_ERROR_PARAMETER
186 * - GLOBUS_XIO_ERROR_HTTP_INVALID_HEADER
187 */
188 /* const char * header_name,
189 const char * header_value */
192
199 * If this cntl is not called by a server, then
200 * the default value of 200 ("Ok") will be used. If this is called on the
201 * client-side of an HTTP connection, the handle control will fail with a
202 * GLOBUS_XIO_ERROR_PARAMETER error.
203 *
204 * @return This handle control function can fail with
205 * - GLOBUS_XIO_ERROR_PARAMETER
206 */
207 /* int status */
223
225 /* const char * reason */
231 * @param version
232 * The HTTP version to be used in the server response line.
233 *
234 * If this cntl is not called by a server, then the default of
235 * GLOBUS_XIO_HTTP_VERSION_1_1 will be used, though no HTTP/1.1 features
236 * (chunking, persistent connections, etc) will be
237 * assumed if the client request was an HTTP/1.0 request. If this is
238 * called on the client-side of an HTTP connection, the handle control
239 * will fail with GLOBUS_XIO_ERROR_PARAMETER.
240 *
241 * @return This handle control function can fail with
242 * - GLOBUS_XIO_ERROR_MEMORY
243 * - GLOBUS_XIO_ERROR_PARAMETER
244 */
245 /* globus_xio_http_version_t version */
262 GLOBUS_XIO_HTTP_HANDLE_SET_REQUEST_HEADER
263}
265
270typedef enum
271{
290 /* const char * method */
308 /* globus_xio_http_version_t version */
346 /* const char * header_name,
347 * const char * header_value */
383 /* char ** method,
384 char ** uri,
385 globus_xio_http_version_t * http_version,
386 globus_hashtable_t * headers */
413 /* int * status_code,
414 char ** reason_phrase,
415 globus_xio_http_version_t * http_version,
416 globus_hashtable_t * headers */
418
419}
421
426typedef enum
427{
450}
452
459typedef enum
460{
461 GLOBUS_XIO_HTTP_VERSION_UNSET,
470}
472
473#ifdef __cplusplus
474}
475#endif
476
477#endif
globus_xio_http_attr_cmd_t
Definition globus_xio_http.h:171
globus_xio_http_handle_cmd_t
Definition globus_xio_http.h:146
@ GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD
Definition globus_xio_http.h:174
@ GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER
Definition globus_xio_http.h:180
@ GLOBUS_XIO_HTTP_GET_REQUEST
Definition globus_xio_http.h:186
@ GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER
Definition globus_xio_http.h:183
@ GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION
Definition globus_xio_http.h:177
@ GLOBUS_XIO_HTTP_GET_RESPONSE
Definition globus_xio_http.h:189
@ GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE
Definition globus_xio_http.h:152
@ GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY
Definition globus_xio_http.h:161
@ GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER
Definition globus_xio_http.h:149
@ GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION
Definition globus_xio_http.h:158
@ GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE
Definition globus_xio_http.h:155
globus_xio_http_errors_t
Definition globus_xio_http.h:199
@ GLOBUS_XIO_HTTP_ERROR_PARSE
Definition globus_xio_http.h:209
@ GLOBUS_XIO_HTTP_ERROR_NO_ENTITY
Definition globus_xio_http.h:213
@ GLOBUS_XIO_HTTP_ERROR_INVALID_HEADER
Definition globus_xio_http.h:205
@ GLOBUS_XIO_HTTP_ERROR_EOF
Definition globus_xio_http.h:217
@ GLOBUS_XIO_HTTP_ERROR_PERSISTENT_CONNECTION_DROPPED
Definition globus_xio_http.h:221
globus_xio_http_version_t
Definition globus_xio_http.h:232
@ GLOBUS_XIO_HTTP_VERSION_1_0
Definition globus_xio_http.h:237
@ GLOBUS_XIO_HTTP_VERSION_1_1
Definition globus_xio_http.h:241
HTTP Header.
Definition globus_xio_http.h:133
char * value
Definition globus_xio_http.h:137
char * name
Definition globus_xio_http.h:135