added more header handling code for http

This commit is contained in:
2010-11-11 08:28:38 +00:00
parent 19af03709a
commit b7c4acf78e
2 changed files with 149 additions and 37 deletions

View File

@ -25,7 +25,8 @@ enum qse_http_errnum_t
QSE_HTTP_ENOERR,
QSE_HTTP_ENOMEM,
QSE_HTTP_EBADREQ,
QSE_HTTP_EBADHDR
QSE_HTTP_EBADHDR,
QSE_HTTP_ETRAENC /* bad transfer-encoding */
};
typedef enum qse_http_errnum_t qse_http_errnum_t;
@ -56,6 +57,12 @@ struct qse_http_t
QSE_HTTP_REQ_POST
} method;
struct
{
qse_byte_t* ptr;
qse_size_t len;
} host;
struct
{
qse_byte_t* ptr;
@ -79,6 +86,14 @@ struct qse_http_t
qse_htb_t tab;
void* combined;
} hdr;
/* special attributes derived from the header */
struct
{
int chunked;
int content_length;
int connection_close;
} attr;
} req;
};