added qse_httpd_geterrnum()/qse_httpd_seterrnum().
added more error codes to httpd. added qse_pio_gethandleasubi(). enhanced sample file handlers enhanced qse_htre_completecontent()/qse_htre_discardcontent()/qse_htre_addcontent()/qse_htre_clear() fixed many cgi handling bugs
This commit is contained in:
@ -132,6 +132,8 @@ enum qse_pio_errnum_t
|
||||
QSE_PIO_ECHILD, /**< the child is not valid */
|
||||
QSE_PIO_EINTR, /**< interrupted */
|
||||
QSE_PIO_EPIPE, /**< broken pipe */
|
||||
QSE_PIO_EACCES, /**< access denied */
|
||||
QSE_PIO_ENOENT, /**< no such file */
|
||||
QSE_PIO_ESUBSYS /**< subsystem(system call) error */
|
||||
};
|
||||
typedef enum qse_pio_errnum_t qse_pio_errnum_t;
|
||||
@ -316,6 +318,16 @@ qse_pio_hnd_t qse_pio_gethandle (
|
||||
qse_pio_hid_t hid /**< handle ID */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_pio_gethandleasubi() function gets a pipe handle wrapped
|
||||
* in the #qse_ubi_t type.
|
||||
* @return pipe handle
|
||||
*/
|
||||
qse_ubi_t qse_pio_gethandleasubi (
|
||||
qse_pio_t* pio, /**< pio object */
|
||||
qse_pio_hid_t hid /**< handle ID */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_pio_getchild() function gets a process handle.
|
||||
* @return process handle
|
||||
|
@ -126,12 +126,6 @@ struct qse_htre_t
|
||||
#define qse_htre_setsmessagefromxstr(re,v) \
|
||||
qse_htre_setstrfromxstr((re),qse_htre_getsmessage(re),(v))
|
||||
|
||||
/* NOTE: setcontent() doesn't execute concb. use this with care */
|
||||
#define qse_htre_setcontentfromcstr(re,v) \
|
||||
qse_htre_setstrfromcstr((re),qse_htre_getcontent(re),(v))
|
||||
#define qse_htre_setcontentfromxstr(re,v) \
|
||||
qse_htre_setstrfromxstr((re),qse_htre_getcontent(re),(v))
|
||||
|
||||
typedef int (*qse_htre_header_walker_t) (
|
||||
qse_htre_t* re,
|
||||
const qse_mchar_t* key,
|
||||
|
@ -34,13 +34,15 @@ enum qse_httpd_errnum_t
|
||||
QSE_HTTPD_ENOERR,
|
||||
QSE_HTTPD_ENOMEM,
|
||||
QSE_HTTPD_EINVAL,
|
||||
QSE_HTTPD_ENOENT,
|
||||
QSE_HTTPD_EACCES,
|
||||
QSE_HTTPD_EINTERN,
|
||||
QSE_HTTPD_EIOMUX,
|
||||
QSE_HTTPD_ESUBSYS,
|
||||
QSE_HTTPD_ESOCKET,
|
||||
QSE_HTTPD_EDISCON, /* client disconnnected */
|
||||
QSE_HTTPD_EBADREQ, /* bad request */
|
||||
QSE_HTTPD_ETASK,
|
||||
QSE_HTTPD_ECOMCBS
|
||||
QSE_HTTPD_ETASK
|
||||
};
|
||||
typedef enum qse_httpd_errnum_t qse_httpd_errnum_t;
|
||||
|
||||
@ -184,6 +186,15 @@ void qse_httpd_close (
|
||||
qse_httpd_t* httpd
|
||||
);
|
||||
|
||||
qse_httpd_errnum_t qse_httpd_geterrnum (
|
||||
qse_httpd_t* httpd
|
||||
);
|
||||
|
||||
void qse_httpd_seterrnum (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_errnum_t errnum
|
||||
);
|
||||
|
||||
int qse_httpd_getoption (
|
||||
qse_httpd_t* httpd
|
||||
);
|
||||
@ -214,11 +225,6 @@ int qse_httpd_addlistener (
|
||||
const qse_char_t* uri
|
||||
);
|
||||
|
||||
void qse_httpd_markbadclient (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client
|
||||
);
|
||||
|
||||
void qse_httpd_discardcontent (
|
||||
qse_httpd_t* httpd,
|
||||
qse_htre_t* req
|
||||
|
Reference in New Issue
Block a user