http.c File Reference

Implements HTTP decoding. More...

#include <ctype.h>
#include <yaz/odr.h>
#include <yaz/yaz-version.h>
#include <yaz/yaz-iconv.h>
#include <yaz/matchstr.h>
#include <yaz/zgdu.h>

Go to the source code of this file.

Functions

static void yaz_base64encode (const char *in, char *out)
static int decode_headers_content (ODR o, int off, Z_HTTP_Header **headers, char **content_buf, int *content_len)
void z_HTTP_header_add_content_type (ODR o, Z_HTTP_Header **hp, const char *content_type, const char *charset)
void z_HTTP_header_add_basic_auth (ODR o, Z_HTTP_Header **hp, const char *username, const char *password)
void z_HTTP_header_add (ODR o, Z_HTTP_Header **hp, const char *n, const char *v)
const char * z_HTTP_header_lookup (const Z_HTTP_Header *hp, const char *n)
Z_GDUz_get_HTTP_Request (ODR o)
Z_GDUz_get_HTTP_Request_host_path (ODR odr, const char *host, const char *path)
Z_GDUz_get_HTTP_Response (ODR o, int code)
const char * z_HTTP_errmsg (int code)
int yaz_decode_http_response (ODR o, Z_HTTP_Response **hr_p)
int yaz_decode_http_request (ODR o, Z_HTTP_Request **hr_p)
int yaz_encode_http_response (ODR o, Z_HTTP_Response *hr)
int yaz_encode_http_request (ODR o, Z_HTTP_Request *hr)

Detailed Description

Implements HTTP decoding.

Definition in file http.c.


Function Documentation

static int decode_headers_content ( ODR  o,
int  off,
Z_HTTP_Header **  headers,
char **  content_buf,
int *  content_len 
) [static]
static void yaz_base64encode ( const char *  in,
char *  out 
) [static]

Definition at line 31 of file http.c.

Referenced by z_HTTP_header_add_basic_auth().

int yaz_decode_http_request ( ODR  o,
Z_HTTP_Request **  hr_p 
)
int yaz_decode_http_response ( ODR  o,
Z_HTTP_Response **  hr_p 
)
int yaz_encode_http_request ( ODR  o,
Z_HTTP_Request hr 
)
int yaz_encode_http_response ( ODR  o,
Z_HTTP_Response hr 
)
Z_GDU* z_get_HTTP_Request ( ODR  o  ) 
Z_GDU* z_get_HTTP_Request_host_path ( ODR  odr,
const char *  host,
const char *  path 
)
Z_GDU* z_get_HTTP_Response ( ODR  o,
int  code 
)
const char* z_HTTP_errmsg ( int  code  ) 

Definition at line 357 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 
)
void z_HTTP_header_add_basic_auth ( ODR  o,
Z_HTTP_Header **  hp,
const char *  username,
const char *  password 
)
void z_HTTP_header_add_content_type ( ODR  o,
Z_HTTP_Header **  hp,
const char *  content_type,
const char *  charset 
)

Definition at line 205 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 
)
Generated on Tue Aug 17 13:13:19 2010 for YAZ by  doxygen 1.6.3