Diff
Not logged in

Differences From:

File src/http.c part of check-in [e621b6dbe3] - Use POST instead of GET for the /xfer method. Other bug fixes in the URL parser. by drh on 2007-07-30 14:28:17. [view]

To:

File src/http.c part of check-in [3a25b68390] - Only request the password one time on a push or pull. by drh on 2007-07-30 16:35:16. [view]

@@ -171,14 +171,14 @@
     blob_appendf(&login, "login %s %b %b\n", g.zLogin, &nonce, &sig);
   }else{
     if( g.urlPasswd==0 ){
       if( strcmp(g.urlUser,"anonymous")!=0 ){
-        char *zPrompt = mprintf("password for %s", g.urlUser);
+        char *zPrompt = mprintf("password for %s: ", g.urlUser);
         Blob x;
         prompt_for_password(zPrompt, &x, 0);
         free(zPrompt);
-        blob_append(&pw, blob_buffer(&x), blob_size(&x));
-        blob_reset(&x);
+        g.urlPasswd = blob_str(&x);
+        blob_append(&pw, g.urlPasswd, -1);
       }
     }
     sha1sum_blob(&pw, &sig);
     blob_appendf(&login, "login %s %b %b\n", g.urlUser, &nonce, &sig);