Differences From:
File
src/http.c
part of check-in
[767ae79c3d]
- There is some bug in the new HTTP transport layer. The easiest solution
is to close the TCP connection after each round trip, which is what this
check-in does.
by
drh on
2009-04-24 18:40:03.
[view]
To:
File
src/http.c
part of check-in
[7a2c37063a]
- merge trunk into creole branch
by
bob on
2009-09-22 07:49:39.
Also file
src/http.c
part of check-in
[9e274a2e7b]
- Update the proxy handler so that it supports basic authorization.
by
drh on
2009-09-12 21:53:24.
[view]
@@ -52,9 +52,9 @@
if( g.urlUser==0 ){
user_select();
db_blob(&pw, "SELECT pw FROM user WHERE uid=%d", g.userUid);
sha1sum_blob(&pw, &sig);
- blob_appendf(pLogin, "login %s %b %b\n", g.zLogin, &nonce, &sig);
+ blob_appendf(pLogin, "login %F %b %b\n", g.zLogin, &nonce, &sig);
}else{
if( g.urlPasswd==0 ){
if( strcmp(g.urlUser,"anonymous")!=0 ){
char *zPrompt = mprintf("password for %s: ", g.urlUser);
@@ -67,9 +67,9 @@
}
}
blob_append(&pw, g.urlPasswd, -1);
sha1sum_blob(&pw, &sig);
- blob_appendf(pLogin, "login %s %b %b\n", g.urlUser, &nonce, &sig);
+ blob_appendf(pLogin, "login %F %b %b\n", g.urlUser, &nonce, &sig);
}
blob_reset(&nonce);
blob_reset(&pw);
blob_reset(&sig);
@@ -91,8 +91,11 @@
}else{
zSep = "/";
}
blob_appendf(pHdr, "POST %s%sxfer HTTP/1.1\r\n", g.urlPath, zSep);
+ if( g.urlProxyAuth ){
+ blob_appendf(pHdr, "Proxy-Authorization: %s\n", g.urlProxyAuth);
+ }
blob_appendf(pHdr, "Host: %s\r\n", g.urlHostname);
blob_appendf(pHdr, "User-Agent: Fossil/" MANIFEST_VERSION "\r\n");
if( g.fHttpTrace ){
blob_appendf(pHdr, "Content-Type: application/x-fossil-debug\r\n");