Diff
Not logged in

Differences From:

File src/cgi.c part of check-in [dfb68976be] - Add the "ui" command to automatically launch a web browser after starting the HTTP server. The web browser choice can be configured using the "setting" command. by drh on 2008-05-17 18:19:11. [view]

To:

File src/cgi.c part of check-in [16ec6e558b] - Always redirect incoming HTTP requests to the /xfer method when the content-type is application/x-fossil. by drh on 2008-05-29 14:00:27. [view]

@@ -696,10 +696,18 @@
       }
     }else if( strcmp(zType, "application/x-fossil")==0 ){
       blob_read_from_channel(&g.cgiIn, g.httpIn, len);
       blob_uncompress(&g.cgiIn, &g.cgiIn);
+      /* If the content type is application/x-fossil, then ignore
+      ** the path in the first line of the HTTP header and always
+      ** use the /xfer method since the /xfer method is the only
+      ** method that understands the application/x-fossil content
+      ** type.
+      */
+      cgi_replace_parameter("PATH_INFO", "/xfer");
     }else if( strcmp(zType, "application/x-fossil-debug")==0 ){
       blob_read_from_channel(&g.cgiIn, g.httpIn, len);
+      cgi_replace_parameter("PATH_INFO", "/xfer");  /* See comment above */
     }
   }
 
   z = (char*)P("HTTP_COOKIE");