summaryrefslogtreecommitdiff
path: root/src/ne_request.h
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-01-21 17:28:19 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-01-21 17:28:19 +0000
commitca5bafd57ae962918d4cdaa801ec63210b57d1dc (patch)
treec46656f5db36665b3072e160261380b503bcfe1f /src/ne_request.h
parentac179c61a5984eed8140b4d2d74fb81ceb31069b (diff)
downloadneon-ca5bafd57ae962918d4cdaa801ec63210b57d1dc.tar.gz
* src/ne_request.h (ne_get_response_header,
ne_response_header_iterate): Clarify API guarantees. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@440 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_request.h')
-rw-r--r--src/ne_request.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/ne_request.h b/src/ne_request.h
index 6161545..6bea6c0 100644
--- a/src/ne_request.h
+++ b/src/ne_request.h
@@ -140,17 +140,23 @@ typedef int (*ne_block_reader)(void *userdata, const char *buf, size_t len);
void ne_add_response_body_reader(ne_request *req, ne_accept_response accpt,
ne_block_reader reader, void *userdata);
-/* Retrieve the value of the a response header field with given name;
- * returns NULL if response header with given name was not found. */
+/* Retrieve the value of the response header field with given name;
+ * returns NULL if no response header with given name was found. The
+ * return value is valid only until the next call to either
+ * ne_request_create or ne_begin_request for this request. */
const char *ne_get_response_header(ne_request *req, const char *name);
/* Iterator interface for response headers: if passed a NULL cursor,
* returns the first header; if passed a non-NULL cursor pointer,
- * returns the next header. Return value is a cursor pointer. If
- * return value is non-NULL, *name and *value are set to the name and
- * value of the header field. If return value is NULL, no more
- * headers are found, *name and *value are undefined. The order in
- * which response headers is returned is undefined. */
+ * returns the next header. The return value is a cursor pointer: if
+ * it is non-NULL, *name and *value are set to the name and value of
+ * the header field. If the return value is NULL, no more headers are
+ * found, *name and *value are undefined.
+ *
+ * The order in which response headers is returned is undefined. Both
+ * the cursor and name/value pointers are valid only until the next
+ * call to either ne_request_destroy or ne_begin_request for this
+ * request.*/
void *ne_response_header_iterate(ne_request *req, void *cursor,
const char **name, const char **value);