ZOOM: HTTP prepare for reconnect if server don't say so
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 24 Aug 2011 13:35:00 +0000 (15:35 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 24 Aug 2011 13:35:00 +0000 (15:35 +0200)
In case the server HTTP/1.1 says Keep-Alive, we set the reconnect_ok
to 1, if it closes anyway. Fixes #4555.

src/zoom-c.c

index 00158ec..dc52963 100644 (file)
@@ -1612,6 +1612,8 @@ static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
                 c->reconnect_ok = 0;
             }
         }
+        else
+            c->reconnect_ok = 1; /* if the server closes anyway */
     }
 }
 #endif
@@ -1682,7 +1684,6 @@ static int do_read(ZOOM_connection c)
 #endif
             }
         }
-        c->reconnect_ok = 0;
     }
     return 1;
 }