]> granicus.if.org Git - libevent/commitdiff
we indicate a failed request by removing the uri from the request object
authorNiels Provos <provos@gmail.com>
Thu, 16 Nov 2006 15:59:42 +0000 (15:59 +0000)
committerNiels Provos <provos@gmail.com>
Thu, 16 Nov 2006 15:59:42 +0000 (15:59 +0000)
svn:r257

http.c

diff --git a/http.c b/http.c
index dd3ea5db418021ef7d45b614c129a64e73c53834..4dfcd3fba421297559bf3f08b8169b74f2fd6683 100644 (file)
--- a/http.c
+++ b/http.c
@@ -332,6 +332,11 @@ evhttp_connection_fail(struct evhttp_connection *evcon)
                 * kill the connection.
                 */
                if (evcon->flags & EVHTTP_CON_INCOMING) {
+                       /* the callback looks at the uri to determine errors */
+                       if (req->uri) {
+                               free(req->uri);
+                               req->uri = NULL;
+                       }
                        (*req->cb)(req, req->cb_arg);
                        return;
                }