Revision: 28109
          http://sourceforge.net/p/bibdesk/svn/28109
Author:   hofman
Date:     2022-12-13 16:39:45 +0000 (Tue, 13 Dec 2022)
Log Message:
-----------
include version number in user agent string

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

Modified: trunk/bibdesk/BDSKSoapBinding.m
===================================================================
--- trunk/bibdesk/BDSKSoapBinding.m     2022-12-13 15:32:49 UTC (rev 28108)
+++ trunk/bibdesk/BDSKSoapBinding.m     2022-12-13 16:39:45 UTC (rev 28109)
@@ -136,11 +136,13 @@
 {
        NSMutableURLRequest *request = [NSMutableURLRequest 
requestWithURL:self.address 
cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData 
timeoutInterval:self.defaultTimeout];
        NSData *bodyData = [outputBody dataUsingEncoding:NSUTF8StringEncoding];
+    NSBundle *bundle = [NSBundle mainBundle];
+    NSString *userAgent = [NSString stringWithFormat:@"%@/%@", [bundle 
objectForInfoDictionaryKey:(NSString *)kCFBundleNameKey], [bundle 
objectForInfoDictionaryKey:@"CFBundleShortVersionString"]];
        
        if(cookies != nil) {
                [request setAllHTTPHeaderFields:[NSHTTPCookie 
requestHeaderFieldsWithCookies:cookies]];
        }
-       [request setValue:[[NSBundle mainBundle] 
objectForInfoDictionaryKey:(NSString *)kCFBundleNameKey] 
forHTTPHeaderField:@"User-Agent"];
+       [request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
        [request setValue:soapAction forHTTPHeaderField:@"SOAPAction"];
        [request setValue:@"text/xml; charset=utf-8" 
forHTTPHeaderField:@"Content-Type"];
        [request setValue:[NSString stringWithFormat:@"%lu", (unsigned 
long)[bodyData length]] forHTTPHeaderField:@"Content-Length"];

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to