From 8df5de994876cb613314f738f35f5e2bee62625a Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Wed, 3 Oct 2012 11:28:37 +0000
Subject: [PATCH] Conditional support of iPad in the JsonRpc call

SVN: 26962
---
 openbis-ipad/BisKit/Classes/CISDOBJsonRpcCall.m | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/openbis-ipad/BisKit/Classes/CISDOBJsonRpcCall.m b/openbis-ipad/BisKit/Classes/CISDOBJsonRpcCall.m
index d533292eff7..c4dbcfd8a98 100644
--- a/openbis-ipad/BisKit/Classes/CISDOBJsonRpcCall.m
+++ b/openbis-ipad/BisKit/Classes/CISDOBJsonRpcCall.m
@@ -69,7 +69,12 @@ NSString *const CISOBJsonRpcResponseObjectKey = @"CISOBJsonRpcResponseObjectKey"
     [request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
     [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
     [request setHTTPMethod:@"POST"];
-    [request setValue: [NSString stringWithFormat:@"%li", [httpBody length]]  forHTTPHeaderField:@"Content-Legth"];        
+#if TARGET_OS_IPHONE
+    [request setValue: [NSString stringWithFormat:@"%i", [httpBody length]]  forHTTPHeaderField:@"Content-Length"];
+#else
+    [request setValue: [NSString stringWithFormat:@"%li", [httpBody length]]  forHTTPHeaderField:@"Content-Length"];
+#endif
+    
     [request setHTTPBody: httpBody];
         
     // Check that the connection can be created
-- 
GitLab