From d2794e65e018166c2ecf598f8e77c4f4d5abd2f4 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Sat, 11 Apr 2009 15:26:29 +0000 Subject: [PATCH] document evhttp_parse_query better svn:r1157 --- http.c | 1 - include/event2/http.h | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/http.c b/http.c index 54d6c05a..a6390f56 100644 --- a/http.c +++ b/http.c @@ -2186,7 +2186,6 @@ evhttp_decode_uri(const char *uri) /* * Helper function to parse out arguments in a query. * The arguments are separated by key and value. - * URI should already be decoded. */ void diff --git a/include/event2/http.h b/include/event2/http.h index 402a787a..dc7d7009 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -443,11 +443,21 @@ char *evhttp_decode_uri(const char *uri); /** - * Helper function to parse out arguments in a query. - * The arguments are separated by key and value. - * URI should already be decoded. + Helper function to parse out arguments in a query. + + Parsing a uri like + + http://foo.com/?q=test&s=some+thing + + will result in two entries in the key value queue. + + The first entry is: key="q", value="test" + The second entry is: key="s", value="some thing" + + @param uri the request URI + @param headers the head of the evkeyval queue */ -void evhttp_parse_query(const char *uri, struct evkeyvalq *); +void evhttp_parse_query(const char *uri, struct evkeyvalq *headers); /** -- 2.40.0