]> granicus.if.org Git - libevent/commitdiff
document evhttp_parse_query better
authorNiels Provos <provos@gmail.com>
Sat, 11 Apr 2009 15:26:29 +0000 (15:26 +0000)
committerNiels Provos <provos@gmail.com>
Sat, 11 Apr 2009 15:26:29 +0000 (15:26 +0000)
svn:r1157

http.c
include/event2/http.h

diff --git a/http.c b/http.c
index 54d6c05a1be33d73a582cf4b3d80c495dec0a7a9..a6390f5688e2dd4387cce632b037f3c10ccf142f 100644 (file)
--- 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
index 402a787a93e896b57eea0548278af8f27ce2e779..dc7d700952bf49f253a6af37c4ff400532a03b8c 100644 (file)
@@ -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);
 
 
 /**