globus_xio_http_driver_cntls (3) - Linux Manuals
NAME
Attributes and Cntls -
Enumerations
enum globus_xio_http_handle_cmd_t { GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION, GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY }
enum globus_xio_http_attr_cmd_t { GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER, GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER, GLOBUS_XIO_HTTP_GET_REQUEST, GLOBUS_XIO_HTTP_GET_RESPONSE }
Functions
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER, const char *header_name, const char *header_value)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE, int status)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE, const char *reason)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION, globus_xio_http_version_t version)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY)
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD, const char *method)
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION, globus_xio_http_version_t version)
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER, const char *header_name, const char *header_value)
Detailed Description
HTTP driver specific attrs and cntls.
See Also:
-
globus_xio_attr_cntl()
globus_xio_handle_cntl()
Enumeration Type Documentation
enum globus_xio_http_attr_cmd_t
HTTP driver specific attribute and data descriptor cntlsEnumerator
- 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
enum globus_xio_http_handle_cmd_t
HTTP driver specific cntlsEnumerator
- 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
Function Documentation
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.Parameters:
- 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_XIO_ERROR_MEMORY
- •
- GLOBUS_XIO_ERROR_PARAMETER
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION, globus_xio_http_version_tversion)
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.Parameters:
- 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.Parameters:
-
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
- •
-
Transfer-Encoding: {identity|chunked} Override the default transfer encoding. If a server knows the exact length of the message body, or does not intend to support persistent connections, it may set this header to be 'identity'.
If this is set to 'identity' and any of the following are true, then the connection will be closed after the end of the message is sent:
- •
- A Content-Length header is not present
- •
- The HTTP version is set to 'HTTP/1.0'
- •
- The Connection header is set to 'close' Attempts to set this to 'chunked' with an 'HTTP/1.0' client will fail with a GLOBUS_XIO_ERROR_HTTP_INVALID_HEADER error.
- •
- Content-Length: 1*Digit
- •
- Provide a content length for the response message. If the 'chunked' transfer encoding is being used, then this header will be silently ignored by the HTTP driver.
- •
- Connection: close
- •
- If present in the server response, the connection will be closed after the end of the data response is written. Otherwise, when persistent connections are enabled, the connection may be left open by the driver. Persistent connections are not yet implemented.
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.Parameters:
-
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:
- •
-
Transfer-Encoding: {identity|chunked} Override the default transfer encoding. If a server knows the exact length of the message body, or does not intend to support persistent connections, it may set this header to be 'identity'.
If this is set to 'identity' and any of the following are true, then the connection will be closed after the end of the response is sent:
- •
- A Content-Length header is not present
- •
- The HTTP version is set to 'HTTP/1.0'
- •
- The Connection header is set to 'close' Attempts to set this to 'chunked' with an 'HTTP/1.0' client will fail with a GLOBUS_XIO_ERROR_HTTP_INVALID_HEADER error.
- •
- Content-Length: 1*Digit
- •
- Provide a content length for the response message. If the 'chunked' transfer encoding is being used, then this header will be silently ignored by the HTTP driver.
- •
- Connection: close
- •
- The HTTP connection will be closed after the end of the data response is written.
Returns:
-
This handle control function can fail with
- •
- GLOBUS_XIO_ERROR_MEMORY
- •
- GLOBUS_XIO_ERROR_PARAMETER
- •
- GLOBUS_XIO_ERROR_HTTP_INVALID_HEADER
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE, intstatus)
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.Parameters:
- 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.
Returns:
-
This handle control function can fail with
- •
- GLOBUS_XIO_ERROR_PARAMETER
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.Parameters:
- 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.
Returns:
-
This handle control function can fail with
- •
- GLOBUS_XIO_ERROR_MEMORY
- •
- GLOBUS_XIO_ERROR_PARAMETER
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION, globus_xio_http_version_tversion)
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.Parameters:
- 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.
Returns:
-
This handle control function can fail with
- •
- GLOBUS_XIO_ERROR_MEMORY
- •
- 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.
Author
Generated automatically by Doxygen for globus_xio from the source code.