marinofaggiana 5 年之前
父节点
当前提交
44295ae9a7
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 4 4
      iOSClient/Library/OCCommunicationLib/OCCommunication.m
  2. 3 3
      iOSClient/Networking/OCNetworking.m

+ 4 - 4
iOSClient/Library/OCCommunicationLib/OCCommunication.m

@@ -1860,8 +1860,8 @@
     serverPath = [serverPath stringByAppendingString:@"/devices"];
     serverPath = [serverPath stringByAppendingString:@"/devices"];
     
     
     OCWebDAVClient *request = [OCWebDAVClient new];
     OCWebDAVClient *request = [OCWebDAVClient new];
-    request = [self getRequestWithCredentials:request];
-    
+    [request.defaultHeaders setObject:self.userAgent forKey:@"User-Agent"];
+
     [request subscribingPushProxy:serverPath pushToken:pushToken deviceIdentifier:deviceIdentifier deviceIdentifierSignature:deviceIdentifierSignature publicKey:publicKey onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
     [request subscribingPushProxy:serverPath pushToken:pushToken deviceIdentifier:deviceIdentifier deviceIdentifierSignature:deviceIdentifierSignature publicKey:publicKey onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
         
         
         if (successRequest) {
         if (successRequest) {
@@ -1881,8 +1881,8 @@
     serverPath = [serverPath stringByAppendingString:@"/devices"];
     serverPath = [serverPath stringByAppendingString:@"/devices"];
     
     
     OCWebDAVClient *request = [OCWebDAVClient new];
     OCWebDAVClient *request = [OCWebDAVClient new];
-    request = [self getRequestWithCredentials:request];
-    
+    [request.defaultHeaders setObject:self.userAgent forKey:@"User-Agent"];
+
     [request unsubscribingPushProxy:serverPath deviceIdentifier:deviceIdentifier deviceIdentifierSignature:deviceIdentifierSignature publicKey:publicKey onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
     [request unsubscribingPushProxy:serverPath deviceIdentifier:deviceIdentifier deviceIdentifierSignature:deviceIdentifierSignature publicKey:publicKey onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
         
         
         if (successRequest) {
         if (successRequest) {

+ 3 - 3
iOSClient/Networking/OCNetworking.m

@@ -1963,8 +1963,8 @@
     NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
     NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
     
     
 #ifdef DEBUG
 #ifdef DEBUG
-    proxyServerPath = @"http://127.0.0.1:8088";
-    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+//    proxyServerPath = @"http://127.0.0.1:8088";
+//    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
 #endif
 #endif
     
     
     OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
     OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
@@ -2044,7 +2044,7 @@
     NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
     NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
     
     
 #ifdef DEBUG
 #ifdef DEBUG
-    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+//    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
 #endif
 #endif
     
     
     OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
     OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;