Fossil

Diff
Login

Differences From Artifact [a57c7b96ec]:

To Artifact [97e0ab8b27]:


134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
** Use Fossil credentials for HTTP Basic Authorization prompt
*/
static int use_fossil_creds_for_httpauth_prompt(void){
  Blob x;
  char c;
  char *zPrompt = mprintf(
    "\n%s requires Basic Authorization over %s.\n"
    "Use Fossil username and password (y/N)? ", g.urlName,
    g.urlIsHttps==1 ? "encrypted HTTPS" : "unencrypted HTTP");
  prompt_user(zPrompt, &x);
  c = blob_str(&x)[0];
  blob_reset(&x);
  free(zPrompt);
  return ( c=='y' || c=='Y' );
}








|
|
|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
** Use Fossil credentials for HTTP Basic Authorization prompt
*/
static int use_fossil_creds_for_httpauth_prompt(void){
  Blob x;
  char c;
  char *zPrompt = mprintf(
    "\n%s Authorization required by:\n%s%s\n"
    "Use Fossil username and password (y/N)? ",
    g.urlIsHttps==1 ? "Encrypted HTTPS" : "Unencrypted HTTP", g.urlCanonical);
  prompt_user(zPrompt, &x);
  c = blob_str(&x)[0];
  blob_reset(&x);
  free(zPrompt);
  return ( c=='y' || c=='Y' );
}

335
336
337
338
339
340
341



342
343
344
345
346
347
348
      j = strlen(zLine) - 1; 
      while( j>4 && fossil_strcmp(&zLine[j-4],"/xfer")==0 ){
         j -= 4;
         zLine[j] = 0;
      }
      fossil_print("redirect to %s\n", &zLine[i]);
      url_parse(&zLine[i], 0);



      transport_close(GLOBAL_URL());
      return http_exchange(pSend, pReply, useLogin, maxRedirect);
    }else if( fossil_strnicmp(zLine, "content-type: ", 14)==0 ){
      if( fossil_strnicmp(&zLine[14], "application/x-fossil-debug", -1)==0 ){
        isCompressed = 0;
      }else if( fossil_strnicmp(&zLine[14], 
                          "application/x-fossil-uncompressed", -1)==0 ){







>
>
>







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
      j = strlen(zLine) - 1; 
      while( j>4 && fossil_strcmp(&zLine[j-4],"/xfer")==0 ){
         j -= 4;
         zLine[j] = 0;
      }
      fossil_print("redirect to %s\n", &zLine[i]);
      url_parse(&zLine[i], 0);
      fSeenHttpAuth = 0;
      if( g.zHttpAuth ) free(g.zHttpAuth);
      g.zHttpAuth = get_httpauth();
      transport_close(GLOBAL_URL());
      return http_exchange(pSend, pReply, useLogin, maxRedirect);
    }else if( fossil_strnicmp(zLine, "content-type: ", 14)==0 ){
      if( fossil_strnicmp(&zLine[14], "application/x-fossil-debug", -1)==0 ){
        isCompressed = 0;
      }else if( fossil_strnicmp(&zLine[14], 
                          "application/x-fossil-uncompressed", -1)==0 ){