Fossil SCM
Doc improvements and internal API renaming for clarity. No functional changes.
Commit
286110dec0d1b95f82743768b5c7572ec7a20c651fa3d499f60bbdd3c7581cb2
Parent
d1b7be2ff8822c9…
3 files changed
+5
-6
+8
-6
+11
-12
+5
-6
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1284,13 +1284,13 @@ | ||
| 1284 | 1284 | /* |
| 1285 | 1285 | ** Checks the QUERY_STRING environment variable, sets it up via |
| 1286 | 1286 | ** add_param_list() and, if found, applies its "skin" setting. Returns |
| 1287 | 1287 | ** 0 if no QUERY_STRING is set, else it returns a bitmask of: |
| 1288 | 1288 | ** |
| 1289 | -** 0x01 = QUERY_STRING was set. | |
| 1290 | -** 0x02 = "skin" argument was set and processed | |
| 1291 | -** 0x04 = "x-f-x-l" arg was processed. | |
| 1289 | +** 0x01 = QUERY_STRING was set up | |
| 1290 | +** 0x02 = "skin" GET arg was processed | |
| 1291 | +** 0x04 = "x-f-x-l" GET arg was processed. | |
| 1292 | 1292 | ** |
| 1293 | 1293 | * In the case of the skin, the cookie may still need flushing |
| 1294 | 1294 | ** by the page, via cookie_render(). |
| 1295 | 1295 | */ |
| 1296 | 1296 | int cgi_setup_query_string(void){ |
| @@ -1318,11 +1318,11 @@ | ||
| 1318 | 1318 | ** they cannot see the X-Fossil-Xfer-Login card. As a consolation |
| 1319 | 1319 | ** to them, we'll accept that via this query argument. */ |
| 1320 | 1320 | rc |= 0x04; |
| 1321 | 1321 | fossil_free( g.syncInfo.zLoginCard ); |
| 1322 | 1322 | g.syncInfo.zLoginCard = fossil_strdup(z); |
| 1323 | - g.syncInfo.bLoginCardHeader = 3; | |
| 1323 | + g.syncInfo.fLoginCardMode = 3; | |
| 1324 | 1324 | cgi_delete_parameter("x-f-x-l"); |
| 1325 | 1325 | } |
| 1326 | 1326 | } |
| 1327 | 1327 | return rc; |
| 1328 | 1328 | } |
| @@ -2141,11 +2141,10 @@ | ||
| 2141 | 2141 | const char *zScheme = "http"; |
| 2142 | 2142 | char zLine[2000]; /* A single line of input. */ |
| 2143 | 2143 | g.fullHttpReply = 1; |
| 2144 | 2144 | g.zReqType = "HTTP"; |
| 2145 | 2145 | |
| 2146 | - /*cgi_setenv("JUST_TESTING1", "cgi_handle_http_request()");*/ | |
| 2147 | 2146 | if( cgi_fgets(zLine, sizeof(zLine))==0 ){ |
| 2148 | 2147 | malformed_request("missing header"); |
| 2149 | 2148 | } |
| 2150 | 2149 | blob_append(&g.httpHeader, zLine, -1); |
| 2151 | 2150 | cgi_trace(zLine); |
| @@ -2240,11 +2239,11 @@ | ||
| 2240 | 2239 | rangeEnd = x2+1; |
| 2241 | 2240 | } |
| 2242 | 2241 | }else if( fossil_strcmp(zFieldName, "x-fossil-xfer-login:")==0 ){ |
| 2243 | 2242 | fossil_free( g.syncInfo.zLoginCard ); |
| 2244 | 2243 | g.syncInfo.zLoginCard = fossil_strdup(zVal); |
| 2245 | - g.syncInfo.bLoginCardHeader = 1; | |
| 2244 | + g.syncInfo.fLoginCardMode = 1; | |
| 2246 | 2245 | } |
| 2247 | 2246 | } |
| 2248 | 2247 | cgi_setenv("REQUEST_SCHEME",zScheme); |
| 2249 | 2248 | cgi_init(); |
| 2250 | 2249 | cgi_trace(0); |
| 2251 | 2250 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1284,13 +1284,13 @@ | |
| 1284 | /* |
| 1285 | ** Checks the QUERY_STRING environment variable, sets it up via |
| 1286 | ** add_param_list() and, if found, applies its "skin" setting. Returns |
| 1287 | ** 0 if no QUERY_STRING is set, else it returns a bitmask of: |
| 1288 | ** |
| 1289 | ** 0x01 = QUERY_STRING was set. |
| 1290 | ** 0x02 = "skin" argument was set and processed |
| 1291 | ** 0x04 = "x-f-x-l" arg was processed. |
| 1292 | ** |
| 1293 | * In the case of the skin, the cookie may still need flushing |
| 1294 | ** by the page, via cookie_render(). |
| 1295 | */ |
| 1296 | int cgi_setup_query_string(void){ |
| @@ -1318,11 +1318,11 @@ | |
| 1318 | ** they cannot see the X-Fossil-Xfer-Login card. As a consolation |
| 1319 | ** to them, we'll accept that via this query argument. */ |
| 1320 | rc |= 0x04; |
| 1321 | fossil_free( g.syncInfo.zLoginCard ); |
| 1322 | g.syncInfo.zLoginCard = fossil_strdup(z); |
| 1323 | g.syncInfo.bLoginCardHeader = 3; |
| 1324 | cgi_delete_parameter("x-f-x-l"); |
| 1325 | } |
| 1326 | } |
| 1327 | return rc; |
| 1328 | } |
| @@ -2141,11 +2141,10 @@ | |
| 2141 | const char *zScheme = "http"; |
| 2142 | char zLine[2000]; /* A single line of input. */ |
| 2143 | g.fullHttpReply = 1; |
| 2144 | g.zReqType = "HTTP"; |
| 2145 | |
| 2146 | /*cgi_setenv("JUST_TESTING1", "cgi_handle_http_request()");*/ |
| 2147 | if( cgi_fgets(zLine, sizeof(zLine))==0 ){ |
| 2148 | malformed_request("missing header"); |
| 2149 | } |
| 2150 | blob_append(&g.httpHeader, zLine, -1); |
| 2151 | cgi_trace(zLine); |
| @@ -2240,11 +2239,11 @@ | |
| 2240 | rangeEnd = x2+1; |
| 2241 | } |
| 2242 | }else if( fossil_strcmp(zFieldName, "x-fossil-xfer-login:")==0 ){ |
| 2243 | fossil_free( g.syncInfo.zLoginCard ); |
| 2244 | g.syncInfo.zLoginCard = fossil_strdup(zVal); |
| 2245 | g.syncInfo.bLoginCardHeader = 1; |
| 2246 | } |
| 2247 | } |
| 2248 | cgi_setenv("REQUEST_SCHEME",zScheme); |
| 2249 | cgi_init(); |
| 2250 | cgi_trace(0); |
| 2251 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1284,13 +1284,13 @@ | |
| 1284 | /* |
| 1285 | ** Checks the QUERY_STRING environment variable, sets it up via |
| 1286 | ** add_param_list() and, if found, applies its "skin" setting. Returns |
| 1287 | ** 0 if no QUERY_STRING is set, else it returns a bitmask of: |
| 1288 | ** |
| 1289 | ** 0x01 = QUERY_STRING was set up |
| 1290 | ** 0x02 = "skin" GET arg was processed |
| 1291 | ** 0x04 = "x-f-x-l" GET arg was processed. |
| 1292 | ** |
| 1293 | * In the case of the skin, the cookie may still need flushing |
| 1294 | ** by the page, via cookie_render(). |
| 1295 | */ |
| 1296 | int cgi_setup_query_string(void){ |
| @@ -1318,11 +1318,11 @@ | |
| 1318 | ** they cannot see the X-Fossil-Xfer-Login card. As a consolation |
| 1319 | ** to them, we'll accept that via this query argument. */ |
| 1320 | rc |= 0x04; |
| 1321 | fossil_free( g.syncInfo.zLoginCard ); |
| 1322 | g.syncInfo.zLoginCard = fossil_strdup(z); |
| 1323 | g.syncInfo.fLoginCardMode = 3; |
| 1324 | cgi_delete_parameter("x-f-x-l"); |
| 1325 | } |
| 1326 | } |
| 1327 | return rc; |
| 1328 | } |
| @@ -2141,11 +2141,10 @@ | |
| 2141 | const char *zScheme = "http"; |
| 2142 | char zLine[2000]; /* A single line of input. */ |
| 2143 | g.fullHttpReply = 1; |
| 2144 | g.zReqType = "HTTP"; |
| 2145 | |
| 2146 | if( cgi_fgets(zLine, sizeof(zLine))==0 ){ |
| 2147 | malformed_request("missing header"); |
| 2148 | } |
| 2149 | blob_append(&g.httpHeader, zLine, -1); |
| 2150 | cgi_trace(zLine); |
| @@ -2240,11 +2239,11 @@ | |
| 2239 | rangeEnd = x2+1; |
| 2240 | } |
| 2241 | }else if( fossil_strcmp(zFieldName, "x-fossil-xfer-login:")==0 ){ |
| 2242 | fossil_free( g.syncInfo.zLoginCard ); |
| 2243 | g.syncInfo.zLoginCard = fossil_strdup(zVal); |
| 2244 | g.syncInfo.fLoginCardMode = 1; |
| 2245 | } |
| 2246 | } |
| 2247 | cgi_setenv("REQUEST_SCHEME",zScheme); |
| 2248 | cgi_init(); |
| 2249 | cgi_trace(0); |
| 2250 |
+8
-6
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -137,22 +137,22 @@ | ||
| 137 | 137 | ** login card to CGI-hosted fossil instances, as those do not read the |
| 138 | 138 | ** HTTP headers so cannot see the X-Fossil-Xfer-Login (x-f-x-l) |
| 139 | 139 | ** header. |
| 140 | 140 | */ |
| 141 | 141 | static void url_append_login_card(Blob * const pLogin){ |
| 142 | - if( g.syncInfo.bLoginCardHeader || | |
| 142 | + if( g.syncInfo.fLoginCardMode || | |
| 143 | 143 | g.syncInfo.remoteVersion >= RELEASE_VERSION_NUMBER ){ |
| 144 | 144 | char * x; |
| 145 | 145 | char * z = g.url.path; |
| 146 | 146 | while( z && *z && '?'!=*z ) ++z; |
| 147 | 147 | if( z && *z ) *z = 0; |
| 148 | 148 | x = mprintf("%s?x-f-x-l=%T", g.url.path ? g.url.path : "/", |
| 149 | 149 | blob_str(pLogin)); |
| 150 | 150 | fossil_free(g.url.path); |
| 151 | 151 | g.url.path = x; |
| 152 | - if( !g.syncInfo.bLoginCardHeader ){ | |
| 153 | - g.syncInfo.bLoginCardHeader = 4; | |
| 152 | + if( !g.syncInfo.fLoginCardMode ){ | |
| 153 | + g.syncInfo.fLoginCardMode = 4; | |
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /* |
| @@ -189,11 +189,13 @@ | ||
| 189 | 189 | blob_appendf(pHdr, "Host: %s\r\n", g.url.hostname); |
| 190 | 190 | blob_appendf(pHdr, "User-Agent: %s\r\n", get_user_agent()); |
| 191 | 191 | if( g.url.isSsh ) blob_appendf(pHdr, "X-Fossil-Transport: SSH\r\n"); |
| 192 | 192 | if( pLogin && blob_size(pLogin) ){ |
| 193 | 193 | blob_appendf(pHdr, "X-Fossil-Xfer-Login: %b\r\n", pLogin) |
| 194 | - /* Noting that CGIs can't read headers */; | |
| 194 | + /* Noting that CGIs can't read headers, but test-http can. If we | |
| 195 | + ** set this _only_ as a URL argument then we lose that info for | |
| 196 | + ** purposes of feeding it back through test-http. */; | |
| 195 | 197 | } |
| 196 | 198 | if( nPayload ){ |
| 197 | 199 | if( zAltMimetype ){ |
| 198 | 200 | blob_appendf(pHdr, "Content-Type: %s\r\n", zAltMimetype); |
| 199 | 201 | }else if( g.fHttpTrace ){ |
| @@ -501,11 +503,11 @@ | ||
| 501 | 503 | blob_zero(&login); |
| 502 | 504 | if( blob_size(pSend)==0 ){ |
| 503 | 505 | blob_zero(&payload); |
| 504 | 506 | }else{ |
| 505 | 507 | if( mHttpFlags & HTTP_USE_LOGIN ) http_build_login_card(pSend, &login); |
| 506 | - if( g.syncInfo.bLoginCardHeader>0 ){ | |
| 508 | + if( g.syncInfo.fLoginCardMode>0 ){ | |
| 507 | 509 | /* The login card will be sent via an HTTP header and/or URL flag. */ |
| 508 | 510 | if( g.fHttpTrace || (mHttpFlags & HTTP_NOCOMPRESS)!=0 ){ |
| 509 | 511 | /* Maintenance note: we cannot blob_swap(pSend,&payload) here |
| 510 | 512 | ** because the HTTP 401 and redirect response handling below |
| 511 | 513 | ** needs pSend unmodified. payload won't be modified after |
| @@ -694,11 +696,11 @@ | ||
| 694 | 696 | } |
| 695 | 697 | } |
| 696 | 698 | }else if( fossil_strnicmp(zLine, "x-fossil-xfer-login: ", 21)==0 ){ |
| 697 | 699 | fossil_free( g.syncInfo.zLoginCard ); |
| 698 | 700 | g.syncInfo.zLoginCard = fossil_strdup(&zLine[21]); |
| 699 | - g.syncInfo.bLoginCardHeader = 1; | |
| 701 | + g.syncInfo.fLoginCardMode = 1; | |
| 700 | 702 | } |
| 701 | 703 | } |
| 702 | 704 | if( iHttpVersion<0 ){ |
| 703 | 705 | /* We got nothing back from the server. If using the ssh: protocol, |
| 704 | 706 | ** this might mean we need to add or remove the PATH=... argument |
| 705 | 707 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -137,22 +137,22 @@ | |
| 137 | ** login card to CGI-hosted fossil instances, as those do not read the |
| 138 | ** HTTP headers so cannot see the X-Fossil-Xfer-Login (x-f-x-l) |
| 139 | ** header. |
| 140 | */ |
| 141 | static void url_append_login_card(Blob * const pLogin){ |
| 142 | if( g.syncInfo.bLoginCardHeader || |
| 143 | g.syncInfo.remoteVersion >= RELEASE_VERSION_NUMBER ){ |
| 144 | char * x; |
| 145 | char * z = g.url.path; |
| 146 | while( z && *z && '?'!=*z ) ++z; |
| 147 | if( z && *z ) *z = 0; |
| 148 | x = mprintf("%s?x-f-x-l=%T", g.url.path ? g.url.path : "/", |
| 149 | blob_str(pLogin)); |
| 150 | fossil_free(g.url.path); |
| 151 | g.url.path = x; |
| 152 | if( !g.syncInfo.bLoginCardHeader ){ |
| 153 | g.syncInfo.bLoginCardHeader = 4; |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | /* |
| @@ -189,11 +189,13 @@ | |
| 189 | blob_appendf(pHdr, "Host: %s\r\n", g.url.hostname); |
| 190 | blob_appendf(pHdr, "User-Agent: %s\r\n", get_user_agent()); |
| 191 | if( g.url.isSsh ) blob_appendf(pHdr, "X-Fossil-Transport: SSH\r\n"); |
| 192 | if( pLogin && blob_size(pLogin) ){ |
| 193 | blob_appendf(pHdr, "X-Fossil-Xfer-Login: %b\r\n", pLogin) |
| 194 | /* Noting that CGIs can't read headers */; |
| 195 | } |
| 196 | if( nPayload ){ |
| 197 | if( zAltMimetype ){ |
| 198 | blob_appendf(pHdr, "Content-Type: %s\r\n", zAltMimetype); |
| 199 | }else if( g.fHttpTrace ){ |
| @@ -501,11 +503,11 @@ | |
| 501 | blob_zero(&login); |
| 502 | if( blob_size(pSend)==0 ){ |
| 503 | blob_zero(&payload); |
| 504 | }else{ |
| 505 | if( mHttpFlags & HTTP_USE_LOGIN ) http_build_login_card(pSend, &login); |
| 506 | if( g.syncInfo.bLoginCardHeader>0 ){ |
| 507 | /* The login card will be sent via an HTTP header and/or URL flag. */ |
| 508 | if( g.fHttpTrace || (mHttpFlags & HTTP_NOCOMPRESS)!=0 ){ |
| 509 | /* Maintenance note: we cannot blob_swap(pSend,&payload) here |
| 510 | ** because the HTTP 401 and redirect response handling below |
| 511 | ** needs pSend unmodified. payload won't be modified after |
| @@ -694,11 +696,11 @@ | |
| 694 | } |
| 695 | } |
| 696 | }else if( fossil_strnicmp(zLine, "x-fossil-xfer-login: ", 21)==0 ){ |
| 697 | fossil_free( g.syncInfo.zLoginCard ); |
| 698 | g.syncInfo.zLoginCard = fossil_strdup(&zLine[21]); |
| 699 | g.syncInfo.bLoginCardHeader = 1; |
| 700 | } |
| 701 | } |
| 702 | if( iHttpVersion<0 ){ |
| 703 | /* We got nothing back from the server. If using the ssh: protocol, |
| 704 | ** this might mean we need to add or remove the PATH=... argument |
| 705 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -137,22 +137,22 @@ | |
| 137 | ** login card to CGI-hosted fossil instances, as those do not read the |
| 138 | ** HTTP headers so cannot see the X-Fossil-Xfer-Login (x-f-x-l) |
| 139 | ** header. |
| 140 | */ |
| 141 | static void url_append_login_card(Blob * const pLogin){ |
| 142 | if( g.syncInfo.fLoginCardMode || |
| 143 | g.syncInfo.remoteVersion >= RELEASE_VERSION_NUMBER ){ |
| 144 | char * x; |
| 145 | char * z = g.url.path; |
| 146 | while( z && *z && '?'!=*z ) ++z; |
| 147 | if( z && *z ) *z = 0; |
| 148 | x = mprintf("%s?x-f-x-l=%T", g.url.path ? g.url.path : "/", |
| 149 | blob_str(pLogin)); |
| 150 | fossil_free(g.url.path); |
| 151 | g.url.path = x; |
| 152 | if( !g.syncInfo.fLoginCardMode ){ |
| 153 | g.syncInfo.fLoginCardMode = 4; |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | /* |
| @@ -189,11 +189,13 @@ | |
| 189 | blob_appendf(pHdr, "Host: %s\r\n", g.url.hostname); |
| 190 | blob_appendf(pHdr, "User-Agent: %s\r\n", get_user_agent()); |
| 191 | if( g.url.isSsh ) blob_appendf(pHdr, "X-Fossil-Transport: SSH\r\n"); |
| 192 | if( pLogin && blob_size(pLogin) ){ |
| 193 | blob_appendf(pHdr, "X-Fossil-Xfer-Login: %b\r\n", pLogin) |
| 194 | /* Noting that CGIs can't read headers, but test-http can. If we |
| 195 | ** set this _only_ as a URL argument then we lose that info for |
| 196 | ** purposes of feeding it back through test-http. */; |
| 197 | } |
| 198 | if( nPayload ){ |
| 199 | if( zAltMimetype ){ |
| 200 | blob_appendf(pHdr, "Content-Type: %s\r\n", zAltMimetype); |
| 201 | }else if( g.fHttpTrace ){ |
| @@ -501,11 +503,11 @@ | |
| 503 | blob_zero(&login); |
| 504 | if( blob_size(pSend)==0 ){ |
| 505 | blob_zero(&payload); |
| 506 | }else{ |
| 507 | if( mHttpFlags & HTTP_USE_LOGIN ) http_build_login_card(pSend, &login); |
| 508 | if( g.syncInfo.fLoginCardMode>0 ){ |
| 509 | /* The login card will be sent via an HTTP header and/or URL flag. */ |
| 510 | if( g.fHttpTrace || (mHttpFlags & HTTP_NOCOMPRESS)!=0 ){ |
| 511 | /* Maintenance note: we cannot blob_swap(pSend,&payload) here |
| 512 | ** because the HTTP 401 and redirect response handling below |
| 513 | ** needs pSend unmodified. payload won't be modified after |
| @@ -694,11 +696,11 @@ | |
| 696 | } |
| 697 | } |
| 698 | }else if( fossil_strnicmp(zLine, "x-fossil-xfer-login: ", 21)==0 ){ |
| 699 | fossil_free( g.syncInfo.zLoginCard ); |
| 700 | g.syncInfo.zLoginCard = fossil_strdup(&zLine[21]); |
| 701 | g.syncInfo.fLoginCardMode = 1; |
| 702 | } |
| 703 | } |
| 704 | if( iHttpVersion<0 ){ |
| 705 | /* We got nothing back from the server. If using the ssh: protocol, |
| 706 | ** this might mean we need to add or remove the PATH=... argument |
| 707 |
+11
-12
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -292,21 +292,20 @@ | ||
| 292 | 292 | int bAvoidDeltaManifests; /* Avoid using delta manifests if true */ |
| 293 | 293 | |
| 294 | 294 | /* State for communicating specific details between the inbound HTTP |
| 295 | 295 | ** header parser (cgi.c), xfer.c, and http.c. */ |
| 296 | 296 | struct { |
| 297 | - char *zLoginCard; /* Inbound X-Fossil-Xfer-Login request header | |
| 298 | - ** or x-f-x-l URL parameter. */ | |
| 299 | - int bLoginCardHeader; /* If non-0, emit login cards in outbound | |
| 300 | - ** requests as HTTP headers instead of as | |
| 301 | - ** part of the payload. Gets activated | |
| 302 | - ** on-demand based on xfer traffic | |
| 303 | - ** contents. Values, for | |
| 304 | - ** diagnostic/debuggin purposes: 1=set via | |
| 305 | - ** CLI --flag. 2=set via inbound HTTP | |
| 306 | - ** header. 3=set via query string | |
| 307 | - ** arg. 4=set via http_build_header(). */ | |
| 297 | + char *zLoginCard; /* Inbound "X-Fossil-Xfer-Login" request | |
| 298 | + ** header or "x-f-x-l" URL parameter. */ | |
| 299 | + int fLoginCardMode; /* If non-0, emit login cards in outbound | |
| 300 | + ** requests as a HTTP header or URL | |
| 301 | + ** parameter instead of as part of the | |
| 302 | + ** payload. Gets activated on-demand based | |
| 303 | + ** on xfer traffic contents. Values, for | |
| 304 | + ** diagnostic/debugging purposes: 1=CLI | |
| 305 | + ** --flag. 2=inbound HTTP header. 3=query | |
| 306 | + ** string arg. 4=http_build_header(). */ | |
| 308 | 307 | int remoteVersion; /* Remote fossil version. Used for negotiating |
| 309 | 308 | ** how to handle the login card. */ |
| 310 | 309 | } syncInfo; |
| 311 | 310 | #ifdef FOSSIL_ENABLE_JSON |
| 312 | 311 | struct FossilJsonBits { |
| @@ -776,11 +775,11 @@ | ||
| 776 | 775 | g.tcl.argc = g.argc; |
| 777 | 776 | g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */ |
| 778 | 777 | #endif |
| 779 | 778 | g.mainTimerId = fossil_timer_start(); |
| 780 | 779 | capture_case_sensitive_option(); |
| 781 | - g.syncInfo.bLoginCardHeader = | |
| 780 | + g.syncInfo.fLoginCardMode = | |
| 782 | 781 | /* This is only for facilitating development of the |
| 783 | 782 | ** xfer-login-card branch. It will be removed or re-imagined at |
| 784 | 783 | ** some point. */ |
| 785 | 784 | !!find_option("login-card-header","lch", 0); |
| 786 | 785 | g.zVfsName = find_option("vfs",0,1); |
| 787 | 786 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -292,21 +292,20 @@ | |
| 292 | int bAvoidDeltaManifests; /* Avoid using delta manifests if true */ |
| 293 | |
| 294 | /* State for communicating specific details between the inbound HTTP |
| 295 | ** header parser (cgi.c), xfer.c, and http.c. */ |
| 296 | struct { |
| 297 | char *zLoginCard; /* Inbound X-Fossil-Xfer-Login request header |
| 298 | ** or x-f-x-l URL parameter. */ |
| 299 | int bLoginCardHeader; /* If non-0, emit login cards in outbound |
| 300 | ** requests as HTTP headers instead of as |
| 301 | ** part of the payload. Gets activated |
| 302 | ** on-demand based on xfer traffic |
| 303 | ** contents. Values, for |
| 304 | ** diagnostic/debuggin purposes: 1=set via |
| 305 | ** CLI --flag. 2=set via inbound HTTP |
| 306 | ** header. 3=set via query string |
| 307 | ** arg. 4=set via http_build_header(). */ |
| 308 | int remoteVersion; /* Remote fossil version. Used for negotiating |
| 309 | ** how to handle the login card. */ |
| 310 | } syncInfo; |
| 311 | #ifdef FOSSIL_ENABLE_JSON |
| 312 | struct FossilJsonBits { |
| @@ -776,11 +775,11 @@ | |
| 776 | g.tcl.argc = g.argc; |
| 777 | g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */ |
| 778 | #endif |
| 779 | g.mainTimerId = fossil_timer_start(); |
| 780 | capture_case_sensitive_option(); |
| 781 | g.syncInfo.bLoginCardHeader = |
| 782 | /* This is only for facilitating development of the |
| 783 | ** xfer-login-card branch. It will be removed or re-imagined at |
| 784 | ** some point. */ |
| 785 | !!find_option("login-card-header","lch", 0); |
| 786 | g.zVfsName = find_option("vfs",0,1); |
| 787 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -292,21 +292,20 @@ | |
| 292 | int bAvoidDeltaManifests; /* Avoid using delta manifests if true */ |
| 293 | |
| 294 | /* State for communicating specific details between the inbound HTTP |
| 295 | ** header parser (cgi.c), xfer.c, and http.c. */ |
| 296 | struct { |
| 297 | char *zLoginCard; /* Inbound "X-Fossil-Xfer-Login" request |
| 298 | ** header or "x-f-x-l" URL parameter. */ |
| 299 | int fLoginCardMode; /* If non-0, emit login cards in outbound |
| 300 | ** requests as a HTTP header or URL |
| 301 | ** parameter instead of as part of the |
| 302 | ** payload. Gets activated on-demand based |
| 303 | ** on xfer traffic contents. Values, for |
| 304 | ** diagnostic/debugging purposes: 1=CLI |
| 305 | ** --flag. 2=inbound HTTP header. 3=query |
| 306 | ** string arg. 4=http_build_header(). */ |
| 307 | int remoteVersion; /* Remote fossil version. Used for negotiating |
| 308 | ** how to handle the login card. */ |
| 309 | } syncInfo; |
| 310 | #ifdef FOSSIL_ENABLE_JSON |
| 311 | struct FossilJsonBits { |
| @@ -776,11 +775,11 @@ | |
| 775 | g.tcl.argc = g.argc; |
| 776 | g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */ |
| 777 | #endif |
| 778 | g.mainTimerId = fossil_timer_start(); |
| 779 | capture_case_sensitive_option(); |
| 780 | g.syncInfo.fLoginCardMode = |
| 781 | /* This is only for facilitating development of the |
| 782 | ** xfer-login-card branch. It will be removed or re-imagined at |
| 783 | ** some point. */ |
| 784 | !!find_option("login-card-header","lch", 0); |
| 785 | g.zVfsName = find_option("vfs",0,1); |
| 786 |