HTTP Basic Auth needs to be supported for sync operations in order to be compatible with any kind of user validation done by the web server hosting fossil.

A patch was provided (6 lines of code) by mightyhe on Sun, 27 Mar 2011 07:45:06 -0700 and may be accessed at:

  <a

and for convenience is included here (NOTE: a fix for an incorrect line terminator on the Proxy-Authorization header is also mixed in with this patch):
<verbatim>
Index: src/http.c
===================================================================
--- src/http.c
+++ src/http.c
@@ -105,11 +105,19 @@
   }else{
     zSep = "/";
   }
   blob_appendf(pHdr, "POST %s%sxfer/xfer g.urlPath, zSep);
   if( g.urlProxyAuth ){
-    blob_appendf(pHdr, "Proxy-Authorization: %s\n", g.urlProxyAuth);
+    blob_appendf(pHdr, "Proxy-Authorization: g.urlProxyAuth);
+  }
+  Basic HTTP Authorization
+  if( g.urlUser && g.urlUser[0] && g.urlPasswd ){
+      char *zpw = mprintf("%s:%s", g.urlUser, g.urlPasswd);
+      char *zpw64 = encode64(zpw, strlen(zpw));
+      free(zpw);
+      blob_appendf(pHdr, "Authorization: Basic zpw64);
+      free(zpw64);
   }
   blob_appendf(pHdr, "Host: g.urlHostname);
   blob_appendf(pHdr, "User-Agent: Fossil/" MANIFEST_VERSION
   if( g.fHttpTrace ){
     blob_appendf(pHdr, "Content-Type:
</verbatim>