diff options
author | Martin Willi <martin@revosec.ch> | 2010-03-09 15:03:57 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-03-10 15:09:12 +0100 |
commit | a3920abb76707df5b743a687692c703729a313d8 (patch) | |
tree | 37546458625bc26790d262b6a359431810aa1fc7 /src/libfast/request.c | |
parent | d12ad4748a01cd17834e32081d3893bd97eef2b2 (diff) | |
download | strongswan-a3920abb76707df5b743a687692c703729a313d8.tar.bz2 strongswan-a3920abb76707df5b743a687692c703729a313d8.tar.xz |
Add a getter for the HTTP referer
Diffstat (limited to 'src/libfast/request.c')
-rw-r--r-- | src/libfast/request.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libfast/request.c b/src/libfast/request.c index 3f4894c45..0f743e3b9 100644 --- a/src/libfast/request.c +++ b/src/libfast/request.c @@ -232,6 +232,14 @@ static void redirect(private_request_t *this, char *fmt, ...) } /** + * Implementation of request_t.get_referer. + */ +static char* get_referer(private_request_t *this) +{ + return FCGX_GetParam("HTTP_REFERER", this->req.envp); +} + +/** * Implementation of request_t.to_referer. */ static void to_referer(private_request_t *this) @@ -396,6 +404,7 @@ request_t *request_create(int fd, bool debug) this->public.session_closed = (bool(*)(request_t*))session_closed; this->public.close_session = (void(*)(request_t*))close_session; this->public.redirect = (void(*)(request_t*, char *fmt,...))redirect; + this->public.get_referer = (char*(*)(request_t*))get_referer; this->public.to_referer = (void(*)(request_t*))to_referer; this->public.render = (void(*)(request_t*,char*))render; this->public.streamf = (int(*)(request_t*, char *format, ...))streamf; |