diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2010-08-09 08:09:54 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2010-08-09 08:09:54 +0000 |
commit | b8064f4099997a9e2179f3ad4ace605f5ccac3a1 (patch) | |
tree | 81778e976b476374c48b4fe83d084b986b890421 /src/libfast | |
parent | 1ac70afcc1f7d6d2738a34308810719b0976d29f (diff) | |
download | vyos-strongswan-b8064f4099997a9e2179f3ad4ace605f5ccac3a1.tar.gz vyos-strongswan-b8064f4099997a9e2179f3ad4ace605f5ccac3a1.zip |
[svn-upgrade] new version strongswan (4.4.1)
Diffstat (limited to 'src/libfast')
-rw-r--r-- | src/libfast/Makefile.in | 2 | ||||
-rw-r--r-- | src/libfast/request.c | 9 | ||||
-rw-r--r-- | src/libfast/request.h | 9 |
3 files changed, 19 insertions, 1 deletions
diff --git a/src/libfast/Makefile.in b/src/libfast/Makefile.in index f6d1f20a5..a84b272dc 100644 --- a/src/libfast/Makefile.in +++ b/src/libfast/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff --git a/src/libfast/request.c b/src/libfast/request.c index 6bf596fd8..16c1ae583 100644 --- a/src/libfast/request.c +++ b/src/libfast/request.c @@ -204,6 +204,14 @@ static char* get_query_data(private_request_t *this, char *name) } /** + * Implementation of request_t.read_data. + */ +static int read_data(private_request_t *this, char *buf, int len) +{ + return FCGX_GetStr(buf, len, this->req.in); +} + +/** * Implementation of request_t.get_base. */ static char* get_base(private_request_t *this) @@ -407,6 +415,7 @@ request_t *request_create(int fd, bool debug) this->public.add_cookie = (void(*)(request_t*, char *name, char *value))add_cookie; this->public.get_cookie = (char*(*)(request_t*,char*))get_cookie; this->public.get_query_data = (char*(*)(request_t*, char *name))get_query_data; + this->public.read_data = (int(*)(request_t*, char*, int))read_data; 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; diff --git a/src/libfast/request.h b/src/libfast/request.h index af0f8e4f5..9ca74a91e 100644 --- a/src/libfast/request.h +++ b/src/libfast/request.h @@ -86,6 +86,15 @@ struct request_t { char* (*get_query_data)(request_t *this, char *name); /** + * Read raw POST/PUT data from HTTP request. + * + * @param buf buffer to read data into + * @param len size of the supplied buffer + * @return number of bytes read, < 0 on error + */ + int (*read_data)(request_t *this, char *buf, int len); + + /** * Close the session and it's context after handling. */ void (*close_session)(request_t *this); |