added some code to support raw proxying
This commit is contained in:
@ -56,7 +56,8 @@ enum qse_htrd_option_t
|
||||
QSE_HTRD_REQUEST = (1 << 4), /**< parse input as a request */
|
||||
QSE_HTRD_RESPONSE = (1 << 5), /**< parse input as a response */
|
||||
QSE_HTRD_TRAILERS = (1 << 6), /**< store trailers in a separate table */
|
||||
QSE_HTRD_STRICT = (1 << 7) /**< be more picky */
|
||||
QSE_HTRD_STRICT = (1 << 7), /**< be more picky */
|
||||
QSE_HTRD_DUMMY = (1 << 8) /**< be dummy */
|
||||
};
|
||||
|
||||
typedef enum qse_htrd_option_t qse_htrd_option_t;
|
||||
|
@ -62,7 +62,7 @@ struct qse_htre_t
|
||||
enum
|
||||
{
|
||||
QSE_HTRE_Q,
|
||||
QSE_HTRE_S
|
||||
QSE_HTRE_S
|
||||
} type;
|
||||
|
||||
/* version */
|
||||
|
@ -477,6 +477,14 @@ struct qse_httpd_rsrc_cgi_t
|
||||
int nph;
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_rsrc_proxy_t qse_httpd_rsrc_proxy_t;
|
||||
struct qse_httpd_rsrc_proxy_t
|
||||
{
|
||||
qse_nwad_t dst;
|
||||
qse_nwad_t src;
|
||||
int raw;
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_rsrc_dir_t qse_httpd_rsrc_dir_t;
|
||||
struct qse_httpd_rsrc_dir_t
|
||||
{
|
||||
@ -511,21 +519,17 @@ struct qse_httpd_rsrc_t
|
||||
const qse_mchar_t* mime;
|
||||
} file;
|
||||
|
||||
struct
|
||||
{
|
||||
qse_nwad_t dst;
|
||||
qse_nwad_t src;
|
||||
} proxy;
|
||||
qse_httpd_rsrc_proxy_t proxy;
|
||||
|
||||
struct
|
||||
{
|
||||
const qse_mchar_t* dst;
|
||||
} reloc;
|
||||
} reloc;
|
||||
|
||||
struct
|
||||
{
|
||||
const qse_mchar_t* dst;
|
||||
} redir;
|
||||
} redir;
|
||||
|
||||
struct
|
||||
{
|
||||
@ -758,15 +762,15 @@ QSE_EXPORT qse_httpd_task_t* qse_httpd_entasktext (
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskerr (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
int code,
|
||||
int code,
|
||||
qse_htre_t* req
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskcontinue (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
qse_htre_t* req
|
||||
@ -776,7 +780,7 @@ QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskcontinue (
|
||||
* The qse_httpd_entaskauth() function adds a basic authorization task.
|
||||
*/
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskauth (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
const qse_mchar_t* realm,
|
||||
@ -784,7 +788,7 @@ QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskauth (
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskreloc (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
const qse_mchar_t* dst,
|
||||
@ -792,7 +796,7 @@ QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskreloc (
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskredir (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
const qse_mchar_t* dst,
|
||||
@ -801,7 +805,7 @@ QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskredir (
|
||||
|
||||
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entasknomod (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
qse_htre_t* req
|
||||
@ -833,20 +837,19 @@ QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskfile (
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskcgi (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
qse_httpd_rsrc_cgi_t* cgi,
|
||||
qse_htre_t* req
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
const qse_httpd_rsrc_cgi_t* cgi,
|
||||
qse_htre_t* req
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskproxy (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
const qse_nwad_t* dst,
|
||||
const qse_nwad_t* src,
|
||||
qse_htre_t* req
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
const qse_httpd_rsrc_proxy_t* proxy,
|
||||
qse_htre_t* req
|
||||
);
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -169,9 +169,9 @@ QSE_EXPORT qse_httpd_server_t* qse_httpd_attachserverstd (
|
||||
QSE_EXPORT qse_httpd_server_t* qse_httpd_attachserverstdwithuri (
|
||||
qse_httpd_t* httpd,
|
||||
const qse_char_t* uri,
|
||||
qse_httpd_server_detach_t detach,
|
||||
qse_httpd_server_impede_t impede,
|
||||
qse_httpd_serverstd_query_t query,
|
||||
qse_httpd_server_detach_t detach,
|
||||
qse_httpd_server_impede_t impede,
|
||||
qse_httpd_serverstd_query_t query,
|
||||
qse_size_t xtnsize
|
||||
);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user