]> granicus.if.org Git - apache/commitdiff
When connecting to no http protocol response will be NULL and httpd cores.
authorJean-Frederic Clere <jfclere@apache.org>
Wed, 30 Sep 2009 08:56:10 +0000 (08:56 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Wed, 30 Sep 2009 08:56:10 +0000 (08:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@820216 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_serf.c

index a4eff6bda24415977edbc47f0b5e518c52f43d80..a939a0218efb3d472c2672f511c49f507e330e67 100644 (file)
@@ -122,6 +122,7 @@ static void closed_connection(serf_connection_t *conn,
         ap_mpm_register_timed_callback(apr_time_from_msec(1),
                                        timed_cleanup_callback, ctx);
     }
+    ctx->keep_reading = 0;
 }
 
 static serf_bucket_t* conn_setup(apr_socket_t *sock,
@@ -268,6 +269,11 @@ static apr_status_t handle_response(serf_request_t *request,
     apr_size_t len;
     serf_status_line sl;
 
+    if (response == NULL) {
+        ctx->rstatus = HTTP_INTERNAL_SERVER_ERROR;
+        return APR_EGENERAL;
+    }
+
     /* XXXXXXX: Create better error message. */
     rv = serf_bucket_response_status(response, &sl);
     if (rv) {