mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 16:03:23 -05:00
Add ws_getrequestheader
This commit is contained in:
parent
25bc6750e1
commit
5feb9f8528
@ -99,6 +99,7 @@ int ws_registerhandler(WSHANDLE ws, char *regex,
|
|||||||
int addheaders);
|
int addheaders);
|
||||||
int ws_decodepassword(char *header, char **username, char **password);
|
int ws_decodepassword(char *header, char **username, char **password);
|
||||||
int ws_testrequestheader(WS_CONNINFO *pwsc, char *header, char *value);
|
int ws_testrequestheader(WS_CONNINFO *pwsc, char *header, char *value);
|
||||||
|
char *ws_getrequestheader(WS_CONNINFO *pwsc, char *header);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Globals
|
* Globals
|
||||||
@ -1276,3 +1277,7 @@ int ws_addresponseheader(WS_CONNINFO *pwsc, char *header, char *fmt, ...) {
|
|||||||
char *ws_getvar(WS_CONNINFO *pwsc, char *var) {
|
char *ws_getvar(WS_CONNINFO *pwsc, char *var) {
|
||||||
return ws_getarg(&pwsc->request_vars,var);
|
return ws_getarg(&pwsc->request_vars,var);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *ws_getrequestheader(WS_CONNINFO *pwsc, char *header) {
|
||||||
|
return ws_getarg(&pwsc->request_headers,header);
|
||||||
|
}
|
||||||
|
@ -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_addresponseheader(WS_CONNINFO *pwsc, char *header, char *fmt, ...);
|
||||||
extern int ws_writefd(WS_CONNINFO *pwsc, char *fmt, ...);
|
extern int ws_writefd(WS_CONNINFO *pwsc, char *fmt, ...);
|
||||||
extern char *ws_getvar(WS_CONNINFO *pwsc, char *var);
|
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);
|
extern int ws_testrequestheader(WS_CONNINFO *pwsc, char *header, char *value);
|
||||||
|
|
||||||
#endif /* _WEBSERVER_H_ */
|
#endif /* _WEBSERVER_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user