Grid Community Toolkit
6.2.1705709074 (tag: v6.2.20240202)
|
Attributes and Cntls. More...
Attributes and Cntls.
HTTP driver specific attrs and cntls.
HTTP driver specific attribute and data descriptor cntls
Enumerator | |
---|---|
GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD |
See usage for: globus_xio_attr_cntl |
GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION |
See usage for: globus_xio_attr_cntl |
GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER |
See usage for: globus_xio_attr_cntl |
GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER |
See usage for: globus_xio_attr_cntl |
GLOBUS_XIO_HTTP_GET_REQUEST |
See usage for: globus_xio_data_descriptor_cntl |
GLOBUS_XIO_HTTP_GET_RESPONSE |
See usage for: globus_xio_data_descriptor_cntl |
HTTP driver specific cntls
Enumerator | |
---|---|
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER |
See usage for: globus_xio_handle_cntl |
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE |
See usage for: globus_xio_handle_cntl |
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE |
See usage for: globus_xio_handle_cntl |
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION |
See usage for: globus_xio_handle_cntl |
GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY |
See usage for: globus_xio_handle_cntl |
globus_result_t globus_xio_attr_cntl | ( | attr | , |
driver | , | ||
GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD | , | ||
const char * | method | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the HTTP method to use for a client request.
method | The request method string ("GET", "PUT", "POST", etc) that will be used in the HTTP request. |
If this is not set on the target before it is opened, it will default to GET.
This attribute is ignored when opening the server side of an HTTP connection.
Setting this attribute may fail with
globus_result_t globus_xio_attr_cntl | ( | attr | , |
driver | , | ||
GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION | , | ||
globus_xio_http_version_t | version | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the HTTP version to use for a client request.
version | The HTTP version to use for the client request. |
If the client is using HTTP/1.0 in a request which will send a request message body (such as a POST or PUT), then the client MUST set the "Content-Length" HTTP header to be the length of the message. If this attribute is not present, then the default of GLOBUS_XIO_HTTP_VERSION_1_1 will be used.
This attribute is ignored when opening the server side of an HTTP connection.
globus_result_t globus_xio_attr_cntl | ( | attr | , |
driver | , | ||
GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER | , | ||
const char * | header_name, | ||
const char * | header_value | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the value of an HTTP request header.
header_name | Name of the HTTP header to set. |
header_value | Value of the HTTP header |
Certain headers will cause the HTTP driver to behave differently than normal. This must be called before
globus_result_t globus_xio_handle_cntl | ( | handle | , |
driver | , | ||
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER | , | ||
const char * | header_name, | ||
const char * | header_value | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the value of a response HTTP header.
header_name | Name of the HTTP header to set. |
header_value | Value of the HTTP header |
Certain headers will cause changes in how the HTTP protocol will be handled. These include:
globus_result_t globus_xio_handle_cntl | ( | handle | , |
driver | , | ||
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE | , | ||
int | status | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the response status code.
status | Value in the range 100-599 which will be used as the HTTP response code, as per RFC 2616. |
If this cntl is not called by a server, then the default value of 200 ("Ok") will be used. If this is called on the client-side of an HTTP connection, the handle control will fail with a GLOBUS_XIO_ERROR_PARAMETER error.
globus_result_t globus_xio_handle_cntl | ( | handle | , |
driver | , | ||
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE | , | ||
const char * | reason | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the response reason phrase.
reason | The value of the HTTP response string, as per RFC 2616. |
If this cntl is not called by a server, then a default value based on the handle's response status code will be generated. If this is called on the client-side of an HTTP connection, the handle control will fail with a GLOBUS_XIO_ERROR_PARAMETER error.
globus_result_t globus_xio_handle_cntl | ( | handle | , |
driver | , | ||
GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION | , | ||
globus_xio_http_version_t | version | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the response HTTP version.
version | The HTTP version to be used in the server response line. |
If this cntl is not called by a server, then the default of GLOBUS_XIO_HTTP_VERSION_1_1 will be used, though no HTTP/1.1 features (chunking, persistent connections, etc) will be assumed if the client request was an HTTP/1.0 request. If this is called on the client-side of an HTTP connection, the handle control will fail with GLOBUS_XIO_ERROR_PARAMETER.
globus_result_t globus_xio_handle_cntl | ( | handle | , |
driver | , | ||
GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY | |||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Indicate end-of-entity for an HTTP body.
HTTP clients and servers must call this command to indicate to the driver that the entity-body which is being sent is completed. Subsequent attempts to write data on the handle will fail.
This handle command MUST be called on the client side of an HTTP connection when the HTTP method is OPTIONS, POST, or PUT, or when the open attributes indicate that an entity will be sent. This handle command MUST be called on the server side of an HTTP request connection when the HTTP method was OPTIONS, GET, POST, or TRACE.