Add ws_getrequestheader

This commit is contained in:
Ron Pedde 2003-12-01 06:55:36 +00:00
parent 25bc6750e1
commit 5feb9f8528
2 changed files with 6 additions and 0 deletions

View File

@ -99,6 +99,7 @@ int ws_registerhandler(WSHANDLE ws, char *regex,
int addheaders);
int ws_decodepassword(char *header, char **username, char **password);
int ws_testrequestheader(WS_CONNINFO *pwsc, char *header, char *value);
char *ws_getrequestheader(WS_CONNINFO *pwsc, char *header);
/*
* Globals
@ -1276,3 +1277,7 @@ int ws_addresponseheader(WS_CONNINFO *pwsc, char *header, char *fmt, ...) {
char *ws_getvar(WS_CONNINFO *pwsc, char *var) {
return ws_getarg(&pwsc->request_vars,var);
}
char *ws_getrequestheader(WS_CONNINFO *pwsc, char *header) {
return ws_getarg(&pwsc->request_headers,header);
}

View File

@ -82,6 +82,7 @@ extern int ws_returnerror(WS_CONNINFO *pwsc, int error, char *description);
extern int ws_addresponseheader(WS_CONNINFO *pwsc, char *header, char *fmt, ...);
extern int ws_writefd(WS_CONNINFO *pwsc, char *fmt, ...);
extern char *ws_getvar(WS_CONNINFO *pwsc, char *var);
extern char *ws_getrequestheader(WS_CONNINFO *pwsc, char *header);
extern int ws_testrequestheader(WS_CONNINFO *pwsc, char *header, char *value);
#endif /* _WEBSERVER_H_ */