Revision: 29259
          http://sourceforge.net/p/bibdesk/svn/29259
Author:   hofman
Date:     2025-05-05 08:47:59 +0000 (Mon, 05 May 2025)
Log Message:
-----------
save full basica authorization header in ivar

Modified Paths:
--------------
    trunk/bibdesk/BDSKSRUGroupServer.m

Modified: trunk/bibdesk/BDSKSRUGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKSRUGroupServer.m  2025-05-05 08:33:21 UTC (rev 29258)
+++ trunk/bibdesk/BDSKSRUGroupServer.m  2025-05-05 08:47:59 UTC (rev 29259)
@@ -151,7 +151,7 @@
         NSString *user = nil;
         NSString *password = nil;
         if ([[self serverInfo] getUsername:&user password:&password])
-            authorization = [[[NSString stringWithFormat:@"%@:%@", user, 
password] dataUsingEncoding:NSUTF8StringEncoding] 
base64EncodedStringWithOptions:0];
+            authorization = [@"Basic " stringByAppendingString:[[[NSString 
stringWithFormat:@"%@:%@", user, password] 
dataUsingEncoding:NSUTF8StringEncoding] base64EncodedStringWithOptions:0]];
         else
             authorization = nil;
     }
@@ -162,7 +162,7 @@
     [request setValue:@"application/x-www-form-urlencoded; charset=utf-8" 
forHTTPHeaderField:@"Content-type"];
     [request setHTTPBody:[query dataUsingEncoding:NSUTF8StringEncoding]];
     if (authorization)
-        [request setValue:[NSString stringWithFormat:@"Basic %@", 
authorization] forHTTPHeaderField:@"Authorization"];
+        [request setValue:authorization forHTTPHeaderField:@"Authorization"];
     
     [download cancel];
     download = [[BDSKDownloader sharedDownloader] 
startDataDownloadWithRequest:request delegate:self];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to