#include <yaz/z-core.h>
Go to the source code of this file.
Definition in file zgdu.h.
| #define Z_GDU_HTTP_Request 2 |
| #define Z_GDU_HTTP_Response 3 |
| typedef struct Z_HTTP_Header Z_HTTP_Header |
| int yaz_decode_http_request | ( | ODR | o, | |
| Z_HTTP_Request ** | hr_p | |||
| ) |
Definition at line 405 of file http.c.
References odr::buf, Z_HTTP_Request::content_buf, Z_HTTP_Request::content_len, odr::error, Z_HTTP_Request::headers, Z_HTTP_Request::method, odr_malloc(), OHTTP, Z_HTTP_Request::path, odr::size, and Z_HTTP_Request::version.
Referenced by z_GDU().
| int yaz_decode_http_response | ( | ODR | o, | |
| Z_HTTP_Response ** | hr_p | |||
| ) |
Definition at line 371 of file http.c.
References odr::buf, Z_HTTP_Response::code, Z_HTTP_Response::content_buf, Z_HTTP_Response::content_len, odr::error, Z_HTTP_Response::headers, odr_malloc(), OHTTP, and Z_HTTP_Response::version.
Referenced by z_GDU().
| int yaz_encode_http_request | ( | ODR | o, | |
| Z_HTTP_Request * | hr | |||
| ) |
Definition at line 499 of file http.c.
References odr::buf, Z_HTTP_Request::content_buf, Z_HTTP_Request::content_len, odr::direction, Z_HTTP_Request::headers, Z_HTTP_Request::method, Z_HTTP_Header::name, Z_HTTP_Header::next, ODR_PRINT, odr_printf(), odr_write(), Z_HTTP_Request::path, odr::top, Z_HTTP_Header::value, Z_HTTP_Request::version, and z_HTTP_header_lookup().
Referenced by z_GDU().
| int yaz_encode_http_response | ( | ODR | o, | |
| Z_HTTP_Response * | hr | |||
| ) |
Definition at line 459 of file http.c.
References odr::buf, Z_HTTP_Response::code, Z_HTTP_Response::content_buf, Z_HTTP_Response::content_len, odr::direction, Z_HTTP_Response::headers, Z_HTTP_Header::name, Z_HTTP_Header::next, ODR_PRINT, odr_printf(), odr_write(), odr::top, Z_HTTP_Header::value, Z_HTTP_Response::version, z_HTTP_errmsg(), and z_HTTP_header_lookup().
Referenced by z_GDU().
Definition at line 15 of file zgdu.c.
References odr::buf, odr::direction, ODR_DECODE, odr_malloc(), odr::size, yaz_decode_http_request(), yaz_decode_http_response(), yaz_encode_http_request(), yaz_encode_http_response(), z_APDU(), Z_GDU_HTTP_Request, Z_GDU_HTTP_Response, and Z_GDU_Z3950.
Referenced by ir_read().
Definition at line 264 of file http.c.
References Z_HTTP_Request::content_buf, Z_HTTP_Request::content_len, Z_HTTP_Request::headers, Z_GDU::HTTP_Request, Z_HTTP_Request::method, odr_malloc(), Z_HTTP_Request::path, Z_GDU::u, Z_HTTP_Request::version, Z_GDU::which, YAZ_VERSION, Z_GDU_HTTP_Request, and z_HTTP_header_add().
Referenced by z_get_HTTP_Request_host_path().
Definition at line 283 of file http.c.
References Z_HTTP_Request::headers, Z_GDU::HTTP_Request, odr_malloc(), odr_strdup(), Z_HTTP_Request::path, Z_GDU::u, z_get_HTTP_Request(), and z_HTTP_header_add().
Definition at line 317 of file http.c.
References Z_HTTP_Response::code, Z_HTTP_Response::content_buf, Z_HTTP_Response::content_len, Z_HTTP_Response::headers, Z_GDU::HTTP_Response, odr_malloc(), Z_GDU::u, Z_HTTP_Response::version, Z_GDU::which, YAZ_VERSION, Z_GDU_HTTP_Response, z_HTTP_errmsg(), and z_HTTP_header_add().
Referenced by ir_read().
| const char* z_HTTP_errmsg | ( | int | code | ) |
Definition at line 355 of file http.c.
Referenced by yaz_encode_http_response(), z_get_HTTP_Response(), and ZOOM_connection_error_x().
| void z_HTTP_header_add | ( | ODR | o, | |
| Z_HTTP_Header ** | hp, | |||
| const char * | n, | |||
| const char * | v | |||
| ) |
Definition at line 244 of file http.c.
References Z_HTTP_Header::next, odr_malloc(), and odr_strdup().
Referenced by yaz_sru_soap_encode(), z_get_HTTP_Request(), z_get_HTTP_Request_host_path(), z_get_HTTP_Response(), z_HTTP_header_add_basic_auth(), and z_HTTP_header_add_content_type().
| void z_HTTP_header_add_basic_auth | ( | ODR | o, | |
| Z_HTTP_Header ** | hp, | |||
| const char * | username, | |||
| const char * | password | |||
| ) |
Definition at line 225 of file http.c.
References odr_malloc(), and z_HTTP_header_add().
Referenced by yaz_sru_get_encode(), yaz_sru_post_encode(), and yaz_sru_soap_encode().
| void z_HTTP_header_add_content_type | ( | ODR | o, | |
| Z_HTTP_Header ** | hp, | |||
| const char * | content_type, | |||
| const char * | charset | |||
| ) |
Definition at line 204 of file http.c.
References odr_malloc(), and z_HTTP_header_add().
Referenced by yaz_sru_get_encode(), yaz_sru_post_encode(), and yaz_sru_soap_encode().
| const char* z_HTTP_header_lookup | ( | const Z_HTTP_Header * | hp, | |
| const char * | n | |||
| ) |
Definition at line 255 of file http.c.
References Z_HTTP_Header::name, Z_HTTP_Header::next, Z_HTTP_Header::value, and yaz_matchstr().
Referenced by yaz_encode_http_request(), yaz_encode_http_response(), yaz_sru_decode(), yaz_srw_check_content_type(), and yaz_srw_decode().
1.5.6