Hi Samuel, Amos, Hurd team,
below you can find a first patch towards HTTP compatibility that fixes
the HEAD request so that we can successfully do the following:
settrans -fac /tmp/site/ ./httpfs -D www.example.com/
In the HTML parser for parsing tmp
trying to open www.example.com:80/http://www.example.com/
entering the main loop
ls -1 /tmp/site/
filling out dir tmp
index.html
Hope it helps.
Sincerely,
Gianluca
Index: httpfs/http.c
===================================================================
--- httpfs.orig/http.c
+++ httpfs/http.c
@@ -110,7 +110,7 @@ error_t open_connection(struct netnode *
}
/* Send a HEAD request find header length */
- sprintf(buffer,"HEAD %s HTTP/1.0\n\n",node->conn_req);
+ sprintf(buffer,"HEAD %s HTTP/1.0\r\nHost: %s\r\n\r\n",node->conn_req,node->url);
towrite = strlen (buffer);
written = TEMP_FAILURE_RETRY (write (*fd, buffer, towrite));
if ( written == -1 || written < towrite )