Diff
Not logged in

Differences From Artifact [61fbf27e9e]:

To Artifact [42b36191ca]:


2288
2289
2290
2291
2292
2293
2294
2295


2296
2297
2298
2299
2300
2301
2302
2288
2289
2290
2291
2292
2293
2294

2295
2296
2297
2298
2299
2300
2301
2302
2303







-
+
+







**
** It is called in a loop so some variables will need to be replaced
*/
void cgi_handle_ssh_http_request(const char *zIpAddr){
  static int nCycles = 0;
  static char *zCmd = 0;
  char *z, *zToken;
  int i, n;
  int i;
  size_t n;
  char zLine[2000];     /* A single line of input. */

  assert( !g.httpUseSSL );
#ifdef FOSSIL_ENABLE_JSON
  if( nCycles==0 ){ json_bootstrap_early(); }
#endif
  if( zIpAddr ){
2352
2353
2354
2355
2356
2357
2358
2359



2360
2361
2362
2363
2364
2365
2366
2353
2354
2355
2356
2357
2358
2359

2360
2361
2362
2363
2364
2365
2366
2367
2368
2369







-
+
+
+







  }

  zToken = extract_token(z, &z);
  if( zToken==0 ){
    malformed_request("malformed URL in HTTP header");
  }
  n = strlen(g.zRepositoryName);
  if( fossil_strncmp(g.zRepositoryName, zToken, n)==0 ){
  if( fossil_strncmp(g.zRepositoryName, zToken, n)==0 
   && (zToken[n]=='/' || zToken[n]==0)
  ){
    zToken += n;
  }
  if( zToken && strlen(zToken)==0 ){
    malformed_request("malformed URL in HTTP header");
  }
  if( nCycles==0 ){
    cgi_setenv("REQUEST_URI", zToken);