#include <biosphere.h>#include <http_common.h>#include <apr_network_io.h>Include dependency graph for http.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| bs_status | handle_http_get (apr_socket_t *sock, apr_pool_t *mp) |
| bs_status | handle_http_post (apr_socket_t *sock, const char *headerbuf, apr_size_t headerlen, apr_pool_t *mp) |
| bs_status | send_http_error (apr_socket_t *sock, const char *errstring, apr_pool_t *mp) |
| bs_status handle_http_get | ( | apr_socket_t * | sock, | |
| apr_pool_t * | mp | |||
| ) |
Handle a HTTP GET request by simply outputting an HTML status page. This page is the banner.html file included in the daemon directory by default.
| sock | Socket to use | |
| mp | Memory pool to allocate from |
Definition at line 62 of file http.c.
References BIOSPHERE_VERSION_STRING, BS_ERROR, BS_OK, BS_UINT64_FMT, get_remote_endpoint(), get_services(), len(), runtestsuite::rv, send_http_error(), and xlate_definition_to_xml().
Referenced by worker_thread_main().
Here is the call graph for this function:

| bs_status handle_http_post | ( | apr_socket_t * | sock, | |
| const char * | headerbuf, | |||
| apr_size_t | headerlen, | |||
| apr_pool_t * | mp | |||
| ) |
Handle a HTTP POST request by assuming it contains an XML request for a service. First the HTTP headers are interpreted, then the xml payload is translated into an internal data structure (
| sock | Socket to use | |
| headerbuf | Buffer containing HTTP headers and (part) of the xml data | |
| headerlen | Length of the buffer | |
| mp | Memory pool to allocate from |
Definition at line 183 of file http.c.
References BIOSPHERE_VERSION_STRING, BS_ERROR, BS_OK, BS_UINT64_FMT, check_for_http_errors(), http_header_info::content_length, http_header_info::content_offset, delete_response(), get_remaining_content(), get_remote_endpoint(), handle_service_request(), len(), parse_http_headers(), runtestsuite::rv, send_http_error(), SERVICE_REQUEST_FROM_XML, xlate_from_xml(), and xlate_response_to_xml().
Referenced by worker_thread_main().
Here is the call graph for this function:

| bs_status send_http_error | ( | apr_socket_t * | sock, | |
| const char * | errstring, | |||
| apr_pool_t * | mp | |||
| ) |
Send an HTTP message through the socket indicating an error.
| sock | Socket to use (not closed by this function) | |
| errstring | The error string to send (ie. HTTP 404 Not Found) | |
| mp | Memory pool to allocate from |
Definition at line 274 of file http.c.
References BIOSPHERE_VERSION_STRING, BS_ERROR, BS_OK, len(), and runtestsuite::rv.
Referenced by check_for_http_errors(), handle_http_get(), handle_http_post(), and worker_thread_main().
Here is the call graph for this function:

1.5.1