add tests
[webserver.git] / http.c
diff --git a/http.c b/http.c
index 6ce72c05854f61204aba636b0036b5d2f8e5978c..c17781fc76b3d24e8e6f9dc73b642e1284a8adc0 100644 (file)
--- a/http.c
+++ b/http.c
@@ -393,7 +393,7 @@ int processing (char *data, int len, conf_t *conf, char **pdata)
     case get_e:
         VERBOSE (DEBUG, PRINT ("Read file %s\n", filename));
         len = readfile (&buffer, filename);
-        if (len == 0) {
+        if (len < 0) {
             sprintf (location, "http://%s/", conf->servername);
             len = error_404 (pdata, location);
         } else {