Fossil SCM
Include User-Agent when connecting to proxy for https tunnels. Fixed a misplaced EOL.
Commit
08b02fe828a1b8932b744e028a92317053fb510e
Parent
ca61c5e992a1513…
1 file changed
+7
-5
+7
-5
| --- src/http_ssl.c | ||
| +++ src/http_ssl.c | ||
| @@ -181,19 +181,21 @@ | ||
| 181 | 181 | char *connStr, *bbuf; |
| 182 | 182 | Blob reply; |
| 183 | 183 | int done=0,end=0; |
| 184 | 184 | if( !g.urlProxyAuth ){ |
| 185 | 185 | connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n" |
| 186 | - "Host: %s\r\n\r\n" | |
| 187 | - "Proxy-Connection: keep-alive\r\n", g.urlHostname, g.proxyOrigPort, | |
| 188 | - g.urlHostname); | |
| 186 | + "Host: %s\r\n" | |
| 187 | + "Proxy-Connection: keep-alive\r\n", | |
| 188 | + "User-Agent: Fossil/" RELEASE_VERSION "\r\n\r\n", | |
| 189 | + g.urlHostname, g.proxyOrigPort, g.urlHostname); | |
| 189 | 190 | }else{ |
| 190 | 191 | connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n" |
| 191 | 192 | "Host: %s\r\n" |
| 192 | 193 | "Proxy-Connection: keep-alive\r\n" |
| 193 | - "Proxy-Authorization: %s\r\n\r\n", g.urlHostname, g.proxyOrigPort, | |
| 194 | - g.urlHostname, g.urlProxyAuth); | |
| 194 | + "User-Agent: Fossil/" RELEASE_VERSION "\r\n", | |
| 195 | + "Proxy-Authorization: %s\r\n\r\n", | |
| 196 | + g.urlHostname, g.proxyOrigPort, g.urlHostname, g.urlProxyAuth); | |
| 195 | 197 | } |
| 196 | 198 | BIO_write(bio, connStr, strlen(connStr)); |
| 197 | 199 | free(connStr); |
| 198 | 200 | |
| 199 | 201 | /* Wait for end of reply */ |
| 200 | 202 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -181,19 +181,21 @@ | |
| 181 | char *connStr, *bbuf; |
| 182 | Blob reply; |
| 183 | int done=0,end=0; |
| 184 | if( !g.urlProxyAuth ){ |
| 185 | connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n" |
| 186 | "Host: %s\r\n\r\n" |
| 187 | "Proxy-Connection: keep-alive\r\n", g.urlHostname, g.proxyOrigPort, |
| 188 | g.urlHostname); |
| 189 | }else{ |
| 190 | connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n" |
| 191 | "Host: %s\r\n" |
| 192 | "Proxy-Connection: keep-alive\r\n" |
| 193 | "Proxy-Authorization: %s\r\n\r\n", g.urlHostname, g.proxyOrigPort, |
| 194 | g.urlHostname, g.urlProxyAuth); |
| 195 | } |
| 196 | BIO_write(bio, connStr, strlen(connStr)); |
| 197 | free(connStr); |
| 198 | |
| 199 | /* Wait for end of reply */ |
| 200 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -181,19 +181,21 @@ | |
| 181 | char *connStr, *bbuf; |
| 182 | Blob reply; |
| 183 | int done=0,end=0; |
| 184 | if( !g.urlProxyAuth ){ |
| 185 | connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n" |
| 186 | "Host: %s\r\n" |
| 187 | "Proxy-Connection: keep-alive\r\n", |
| 188 | "User-Agent: Fossil/" RELEASE_VERSION "\r\n\r\n", |
| 189 | g.urlHostname, g.proxyOrigPort, g.urlHostname); |
| 190 | }else{ |
| 191 | connStr = mprintf("CONNECT %s:%d HTTP/1.1\r\n" |
| 192 | "Host: %s\r\n" |
| 193 | "Proxy-Connection: keep-alive\r\n" |
| 194 | "User-Agent: Fossil/" RELEASE_VERSION "\r\n", |
| 195 | "Proxy-Authorization: %s\r\n\r\n", |
| 196 | g.urlHostname, g.proxyOrigPort, g.urlHostname, g.urlProxyAuth); |
| 197 | } |
| 198 | BIO_write(bio, connStr, strlen(connStr)); |
| 199 | free(connStr); |
| 200 | |
| 201 | /* Wait for end of reply */ |
| 202 |