Fossil SCM

Add a "User-Agent" header to the HTTP traffic generated by fossil. The user-agent string is "Fossil/$UUID".

dan 2008-07-26 16:51 trunk
Commit 31824fbf9128ae397c0d7d7f7da813938f63b5c7
1 file changed +1
+1
--- src/http.c
+++ src/http.c
@@ -339,10 +339,11 @@
339339
}else{
340340
zSep = "/";
341341
}
342342
blob_appendf(&hdr, "POST %s%sxfer HTTP/1.1\r\n", g.urlPath, zSep);
343343
blob_appendf(&hdr, "Host: %s\r\n", g.urlHostname);
344
+ blob_appendf(&hdr, "User-Agent: Fossil/" MANIFEST_VERSION "\r\n");
344345
if( g.fHttpTrace ){
345346
blob_appendf(&hdr, "Content-Type: application/x-fossil-debug\r\n");
346347
}else{
347348
blob_appendf(&hdr, "Content-Type: application/x-fossil\r\n");
348349
}
349350
--- src/http.c
+++ src/http.c
@@ -339,10 +339,11 @@
339 }else{
340 zSep = "/";
341 }
342 blob_appendf(&hdr, "POST %s%sxfer HTTP/1.1\r\n", g.urlPath, zSep);
343 blob_appendf(&hdr, "Host: %s\r\n", g.urlHostname);
 
344 if( g.fHttpTrace ){
345 blob_appendf(&hdr, "Content-Type: application/x-fossil-debug\r\n");
346 }else{
347 blob_appendf(&hdr, "Content-Type: application/x-fossil\r\n");
348 }
349
--- src/http.c
+++ src/http.c
@@ -339,10 +339,11 @@
339 }else{
340 zSep = "/";
341 }
342 blob_appendf(&hdr, "POST %s%sxfer HTTP/1.1\r\n", g.urlPath, zSep);
343 blob_appendf(&hdr, "Host: %s\r\n", g.urlHostname);
344 blob_appendf(&hdr, "User-Agent: Fossil/" MANIFEST_VERSION "\r\n");
345 if( g.fHttpTrace ){
346 blob_appendf(&hdr, "Content-Type: application/x-fossil-debug\r\n");
347 }else{
348 blob_appendf(&hdr, "Content-Type: application/x-fossil\r\n");
349 }
350

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button