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 94B4D200BF4 for ; Fri, 23 Dec 2016 04:45:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 93420160B27; Fri, 23 Dec 2016 03:45:13 +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 DDF9B160B26 for ; Fri, 23 Dec 2016 04:45:12 +0100 (CET) Received: (qmail 5014 invoked by uid 500); 23 Dec 2016 03:45:11 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 4999 invoked by uid 99); 23 Dec 2016 03:45:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2016 03:45:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 363E418C4A9 for ; Fri, 23 Dec 2016 03:45:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.899 X-Spam-Level: **** X-Spam-Status: No, score=4.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RDNS_NONE=3, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=williamhill.com.au Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 82o1Hd_WKGz7 for ; Fri, 23 Dec 2016 03:45:08 +0000 (UTC) Received: from mail-general-01.williamhill.com.au (unknown [122.102.16.110]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2CCF05F47A for ; Fri, 23 Dec 2016 03:45:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=williamhill.com.au; i=@williamhill.com.au; q=dns/txt; s=wh-syd-gen; t=1482464707; x=1514000707; h=from:to:subject:date:message-id:mime-version; bh=YTk7OBA6UR9gVNpZiGqSZJPWEouVivMP8NZlZUAYw8U=; b=Dj+bvH1J+6E35BZtrEL45ZiR6R6sT650gb/3DatCU83HUzTL4AmBNPGL PqHkyWU5jWKbPPf6inRXVUD0RMdIPKA7ImTxzgeKE7AxsUpxzxD5e6AHJ N2Qf/PUQtEFB3lI0kNxmsGAMxJJhPn78TEnEFi1vDrFDVZAJGk3SP0dsU GPVRoBwaJKRZLGrmfyCmcCW9iUiqO9S+kEGzKLyumkiqQAJjDv0K+H76R mzZnDlu6m9Ox8PVNXJzpJF0WzK9sOzHTA0s5PN5IeLMxKA8LWwUp5YqDi RodpRM6SsoveScATJaVLaF2JrCOzwf1EpUT/uFOqRKj9GKor9HBb88b5T g==; X-IronPort-AV: E=Sophos;i="5.33,391,1477918800"; d="scan'208,217";a="21622766" Received: from unknown (HELO EQ3EXCH05.prod.sbet.com.au) ([10.1.3.66]) by eq3mprx01.prod.sbet.com.au with ESMTP; 23 Dec 2016 14:44:57 +1100 Received: from SY3WNPRINEX01.prod.sbet.com.au (10.132.150.58) by EQ3EXCH05.prod.sbet.com.au (10.1.3.66) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 23 Dec 2016 14:44:57 +1100 Received: from SY3WNPRINEX02.prod.sbet.com.au (10.132.150.59) by SY3WNPRINEX01.prod.sbet.com.au (10.132.150.58) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 23 Dec 2016 14:44:56 +1100 Received: from SY3WNPRINEX02.prod.sbet.com.au ([fe80::994b:9c70:8f7b:b1c8]) by SY3WNPRINEX02.prod.sbet.com.au ([fe80::994b:9c70:8f7b:b1c8%14]) with mapi id 15.00.1178.000; Fri, 23 Dec 2016 14:44:56 +1100 From: Antony Bowesman To: "user@jmeter.apache.org" Subject: HTTP requests and HeaderManager Thread-Topic: HTTP requests and HeaderManager Thread-Index: AdJczkIZBuqZ54fZSSS8R+kMzJuj3g== Date: Fri, 23 Dec 2016 03:44:56 +0000 Message-ID: <42f1b910a4974789a5b81fe8ef1d1ed7@SY3WNPRINEX02.prod.sbet.com.au> Accept-Language: en-AU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.132.154.5] Content-Type: multipart/alternative; boundary="_000_42f1b910a4974789a5b81fe8ef1d1ed7SY3WNPRINEX02prodsbetco_" MIME-Version: 1.0 archived-at: Fri, 23 Dec 2016 03:45:13 -0000 --_000_42f1b910a4974789a5b81fe8ef1d1ed7SY3WNPRINEX02prodsbetco_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Could be way off target here, as I'm a bit of a newbie. I have a custom java sampler that uses a HeaderManager to manage headers in= multiple requests. My sampler makes a number of http requests in a single = sample to form part of a dynamic 'transaction' and this means that differen= t requests may need different headers, e.g. some could be GET, some POST, s= ome require CSRF headers etc. I'm using an HTTPSamplerBase implementation and it appears there's no disti= nction between a default header and a request header that just applies to t= he request to be sent, could be wrong, but I can't see any way to separate = the two in the API. My solution is to manage default and request headers is a wrapper class tha= t will remove headers after the request is made, so they do not pollute sub= sequent requests. However, from my basic reading of the code, the header manager is using an = ArrayList to store headers and to remove a header, it has to iterate that l= ist. Is there any reason why it would not be more sensible to use a LinkedHashSe= t. Slightly additional overhead in storage, but much faster in removing ele= ments. Cheers --_000_42f1b910a4974789a5b81fe8ef1d1ed7SY3WNPRINEX02prodsbetco_--