Fossil SCM
Add a "User-Agent" header to the HTTP traffic generated by fossil. The user-agent string is "Fossil/$UUID".
Commit
31824fbf9128ae397c0d7d7f7da813938f63b5c7
Parent
3cb547be2c7db73…
1 file changed
+1
+1
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -339,10 +339,11 @@ | ||
| 339 | 339 | }else{ |
| 340 | 340 | zSep = "/"; |
| 341 | 341 | } |
| 342 | 342 | blob_appendf(&hdr, "POST %s%sxfer HTTP/1.1\r\n", g.urlPath, zSep); |
| 343 | 343 | blob_appendf(&hdr, "Host: %s\r\n", g.urlHostname); |
| 344 | + blob_appendf(&hdr, "User-Agent: Fossil/" MANIFEST_VERSION "\r\n"); | |
| 344 | 345 | if( g.fHttpTrace ){ |
| 345 | 346 | blob_appendf(&hdr, "Content-Type: application/x-fossil-debug\r\n"); |
| 346 | 347 | }else{ |
| 347 | 348 | blob_appendf(&hdr, "Content-Type: application/x-fossil\r\n"); |
| 348 | 349 | } |
| 349 | 350 |
| --- 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 |