Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4EEC6200BB4 for ; Wed, 2 Nov 2016 00:01:27 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4D94E160AF7; Tue, 1 Nov 2016 23:01:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 93A15160ADA for ; Wed, 2 Nov 2016 00:01:26 +0100 (CET) Received: (qmail 78752 invoked by uid 500); 1 Nov 2016 23:01:25 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 78692 invoked by uid 99); 1 Nov 2016 23:01:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2016 23:01:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 31620E0FC4; Tue, 1 Nov 2016 23:01:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ios commit: CB-12049 user-agent string has a unique number appended Date: Tue, 1 Nov 2016 23:01:25 +0000 (UTC) archived-at: Tue, 01 Nov 2016 23:01:27 -0000 Repository: cordova-ios Updated Branches: refs/heads/master 69e06b0a8 -> fa72583ea CB-12049 user-agent string has a unique number appended This closes #272 Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/fa72583e Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/fa72583e Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/fa72583e Branch: refs/heads/master Commit: fa72583eaa1cb91c6473e179ed6b9df392f73c50 Parents: 69e06b0 Author: Sterling Authored: Tue Nov 1 15:15:08 2016 -0700 Committer: Shazron Abdullah Committed: Tue Nov 1 16:02:22 2016 -0700 ---------------------------------------------------------------------- CordovaLib/Classes/Public/CDVViewController.m | 2 +- tests/CordovaLibTests/CDVUserAgentTest.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/fa72583e/CordovaLib/Classes/Public/CDVViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m index f3a763b..3856c56 100644 --- a/CordovaLib/Classes/Public/CDVViewController.m +++ b/CordovaLib/Classes/Public/CDVViewController.m @@ -499,7 +499,7 @@ _userAgent = [NSString stringWithFormat:@"%@ %@", localBaseUserAgent, appendUserAgent]; } else { // Use our address as a unique number to append to the User-Agent. - _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self]; + _userAgent = localBaseUserAgent; } return _userAgent; } http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/fa72583e/tests/CordovaLibTests/CDVUserAgentTest.m ---------------------------------------------------------------------- diff --git a/tests/CordovaLibTests/CDVUserAgentTest.m b/tests/CordovaLibTests/CDVUserAgentTest.m index f52178a..a028158 100644 --- a/tests/CordovaLibTests/CDVUserAgentTest.m +++ b/tests/CordovaLibTests/CDVUserAgentTest.m @@ -129,7 +129,7 @@ NSString* ua1 = [vc1WebView stringByEvaluatingJavaScriptFromString:getUserAgentCode]; NSString* ua2 = [vc2WebView stringByEvaluatingJavaScriptFromString:getUserAgentCode]; - XCTAssertFalse([ua1 isEqual:ua2], @"User-Agents should be different."); + XCTAssertTrue([ua1 isEqual:ua2], @"User-Agents should be different."); } - (void)testBaseUserAgent --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org