You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Aliaksei Ilkiu <al...@gmail.com> on 2015/07/31 13:47:05 UTC

JMeter: how to override Host header

It seams to me that overwriting Host header by adding it into HTTP Header Manager works only partially: port gets overwritten to actual port.
So how can I pass my value for port portion of Host header?

Example:
In HTTP Header Manager I added
<stringProp name="Header.name">Host</stringProp>
<stringProp name="Header.value">myhost.com:443</stringProp>

But I see in View Results Tree

GET https://127.0.0.1:9443/test.html

[no cookies]

Request Headers:
Connection: keep-alive
Host: myhost.com:9443

Tested with JMeter 2.13 r1665067

-- 
Best regards,
 Aliaksei                          mailto:alexmsu@gmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 31.07.2015 um 20:10 schrieb Felix Schumacher:
> Am 31.07.2015 um 13:47 schrieb Aliaksei Ilkiu:
>> It seams to me that overwriting Host header by adding it into HTTP 
>> Header Manager works only partially: port gets overwritten to actual 
>> port.
>> So how can I pass my value for port portion of Host header?
>>
>> Example:
>> In HTTP Header Manager I added
>> <stringProp name="Header.name">Host</stringProp>
>> <stringProp name="Header.value">myhost.com:443</stringProp>
>>
>> But I see in View Results Tree
>>
>> GET https://127.0.0.1:9443/test.html
>>
>> [no cookies]
>>
>> Request Headers:
>> Connection: keep-alive
>> Host: myhost.com:9443
>>
>> Tested with JMeter 2.13 r1665067
> Which http client implementation do you use?

I have tested all implementations and found that:

  httpclient 4 will replace the port with the one from the sampler
  httpclient 3 will strip the port from the host header entirely
  javaclient will leave host header as is

That seems to be a bit inconsistent.

That behaviour seems a result from fixing 
https://bz.apache.org/bugzilla/show_bug.cgi?id=51775.

Regards,
  Felix

>
> Regards,
>  Felix
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 31.07.2015 um 13:47 schrieb Aliaksei Ilkiu:
> It seams to me that overwriting Host header by adding it into HTTP Header Manager works only partially: port gets overwritten to actual port.
> So how can I pass my value for port portion of Host header?
>
> Example:
> In HTTP Header Manager I added
> <stringProp name="Header.name">Host</stringProp>
> <stringProp name="Header.value">myhost.com:443</stringProp>
>
> But I see in View Results Tree
>
> GET https://127.0.0.1:9443/test.html
>
> [no cookies]
>
> Request Headers:
> Connection: keep-alive
> Host: myhost.com:9443
>
> Tested with JMeter 2.13 r1665067
Which http client implementation do you use?

Regards,
  Felix
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 31.07.2015 um 19:19 schrieb Deepak Shetty:
> You might want to file a bug or patch and see if HTTPClient works- In 2.13
> I see the code as always reading the port from URL rather than the host
> header specified-
I have filed a bug

https://bz.apache.org/bugzilla/show_bug.cgi?id=58201

Regards,
  Felix

> regards
> deepak
>
> Snippet from HTTPHC4Impl.java
> if (! HTTPConstants.HEADER_CONTENT_LENGTH.equalsIgnoreCase(n)){
>                          String v = header.getValue();
>                          if (HTTPConstants.HEADER_HOST.equalsIgnoreCase(n)) {
>                              int port = url.getPort();
>                              v = v.replaceFirst(":\\d+$",""); // remove any
> port specification // $NON-NLS-1$ $NON-NLS-2$
>   if (port != -1) {
>                                  if (port == url.getDefaultPort()) {
>                                      port = -1; // no need to specify the
> port if it is the default
>                                  }
>                              }
>
> request.getParams().setParameter(ClientPNames.VIRTUAL_HOST, new HttpHost(v,
> port));
>
> On Fri, Jul 31, 2015 at 9:41 AM, Deepak Shetty <sh...@gmail.com> wrote:
>
>>> I’m sure that I’m not a first person who tries to load-test ‘virtual
>> server’ behind reverse/caching proxy and it is just a matter of time to
>>> find the solution for this.
>> We do have a reverse proxy for our app - and I either change my local
>> applications ports to match the real application or I setup a dummy reverse
>> proxy(because the reverse proxy has the URL rules for e.g. for SEO) that
>> allows me to use the same port (and swap out Hosts) - if I remember
>> correctly around Httpclient 3.x there wasn't a way to setup the port to be
>> different and you could do this in the Sun JDK by setting a couple of sun
>> specific headers if you were using the Sun implementation (but that would
>> need JMeter code change)
>> You probably need to see if this is possible in the latest versions of
>> HTTPClient - if yes then probably JMeter can be enhanced.
>>
>> On Fri, Jul 31, 2015 at 9:05 AM, Aliaksei Ilkiu <al...@gmail.com> wrote:
>>
>>> Bob,
>>> I have few hundred requests and rewrite each of them as such low-level
>>> request is impractical.
>>> HTTP Header Manager provides standard facility to configure custom header
>>> Host.
>>> Apparently there is undocumented behavior that modifies this header and
>>> adds incorrect port.
>>> I’m sure that I’m not a first person who tries to load-test ‘virtual
>>> server’ behind reverse/caching proxy and it is just a matter of time to
>>> find the solution for this.
>>>
>>> Aliaksei Ilkiu
>>> alexmsu@gmail.com
>>>
>>>
>>>
>>>> On Jul 31, 2015, at 9:55 AM, Bob <b....@gmail.com> wrote:
>>>>
>>>> Try this plugin, it might help but not sure.
>>>>
>>>> http://jmeter-plugins.org/wiki/RawRequest/
>>>>
>>>> On 31/07/15 17:57, Aliaksei Ilkiu wrote:
>>>>> Hello Bob,
>>>>>
>>>>> Thanks for you feedback. It is already done: my server runs on IP
>>> 127.0.0.1 and port 9443.
>>>>> These values are set in HTTP Request Defaults (in HTTP Request these
>>> values are empty)
>>>>> Externally my server is available via https://myhost.com
>>>>> I'm running JMeter internally and want to keep it this way.
>>>>> In order to emulate external traffic I need to pass Host header with
>>> value 'myhost.com:443'.
>>>>> If I define such header in HTTP Header Manager the value gets replaced
>>> to 'myhost.com:9443'.
>>>>> I'm asking how can I configure Host header correctly.
>>>>> It was an old discussion about this
>>> http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-td4295391.html
>>> but it was only about customizing hostname and that is works, what does not
>>> work is port customization.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>
>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Deepak Shetty <sh...@gmail.com>.
You might want to file a bug or patch and see if HTTPClient works- In 2.13
I see the code as always reading the port from URL rather than the host
header specified-
regards
deepak

Snippet from HTTPHC4Impl.java
if (! HTTPConstants.HEADER_CONTENT_LENGTH.equalsIgnoreCase(n)){
                        String v = header.getValue();
                        if (HTTPConstants.HEADER_HOST.equalsIgnoreCase(n)) {
                            int port = url.getPort();
                            v = v.replaceFirst(":\\d+$",""); // remove any
port specification // $NON-NLS-1$ $NON-NLS-2$
 if (port != -1) {
                                if (port == url.getDefaultPort()) {
                                    port = -1; // no need to specify the
port if it is the default
                                }
                            }

request.getParams().setParameter(ClientPNames.VIRTUAL_HOST, new HttpHost(v,
port));

On Fri, Jul 31, 2015 at 9:41 AM, Deepak Shetty <sh...@gmail.com> wrote:

> >I’m sure that I’m not a first person who tries to load-test ‘virtual
> server’ behind reverse/caching proxy and it is just a matter of time to
> >find the solution for this.
> We do have a reverse proxy for our app - and I either change my local
> applications ports to match the real application or I setup a dummy reverse
> proxy(because the reverse proxy has the URL rules for e.g. for SEO) that
> allows me to use the same port (and swap out Hosts) - if I remember
> correctly around Httpclient 3.x there wasn't a way to setup the port to be
> different and you could do this in the Sun JDK by setting a couple of sun
> specific headers if you were using the Sun implementation (but that would
> need JMeter code change)
> You probably need to see if this is possible in the latest versions of
> HTTPClient - if yes then probably JMeter can be enhanced.
>
> On Fri, Jul 31, 2015 at 9:05 AM, Aliaksei Ilkiu <al...@gmail.com> wrote:
>
>> Bob,
>> I have few hundred requests and rewrite each of them as such low-level
>> request is impractical.
>> HTTP Header Manager provides standard facility to configure custom header
>> Host.
>> Apparently there is undocumented behavior that modifies this header and
>> adds incorrect port.
>> I’m sure that I’m not a first person who tries to load-test ‘virtual
>> server’ behind reverse/caching proxy and it is just a matter of time to
>> find the solution for this.
>>
>> Aliaksei Ilkiu
>> alexmsu@gmail.com
>>
>>
>>
>> > On Jul 31, 2015, at 9:55 AM, Bob <b....@gmail.com> wrote:
>> >
>> > Try this plugin, it might help but not sure.
>> >
>> > http://jmeter-plugins.org/wiki/RawRequest/
>> >
>> > On 31/07/15 17:57, Aliaksei Ilkiu wrote:
>> >> Hello Bob,
>> >>
>> >> Thanks for you feedback. It is already done: my server runs on IP
>> 127.0.0.1 and port 9443.
>> >> These values are set in HTTP Request Defaults (in HTTP Request these
>> values are empty)
>> >> Externally my server is available via https://myhost.com
>> >> I'm running JMeter internally and want to keep it this way.
>> >> In order to emulate external traffic I need to pass Host header with
>> value 'myhost.com:443'.
>> >> If I define such header in HTTP Header Manager the value gets replaced
>> to 'myhost.com:9443'.
>> >> I'm asking how can I configure Host header correctly.
>> >> It was an old discussion about this
>> http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-td4295391.html
>> but it was only about customizing hostname and that is works, what does not
>> work is port customization.
>> >>
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> > For additional commands, e-mail: user-help@jmeter.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>>
>

Re: JMeter: how to override Host header

Posted by Deepak Shetty <sh...@gmail.com>.
>I’m sure that I’m not a first person who tries to load-test ‘virtual
server’ behind reverse/caching proxy and it is just a matter of time to
>find the solution for this.
We do have a reverse proxy for our app - and I either change my local
applications ports to match the real application or I setup a dummy reverse
proxy(because the reverse proxy has the URL rules for e.g. for SEO) that
allows me to use the same port (and swap out Hosts) - if I remember
correctly around Httpclient 3.x there wasn't a way to setup the port to be
different and you could do this in the Sun JDK by setting a couple of sun
specific headers if you were using the Sun implementation (but that would
need JMeter code change)
You probably need to see if this is possible in the latest versions of
HTTPClient - if yes then probably JMeter can be enhanced.

On Fri, Jul 31, 2015 at 9:05 AM, Aliaksei Ilkiu <al...@gmail.com> wrote:

> Bob,
> I have few hundred requests and rewrite each of them as such low-level
> request is impractical.
> HTTP Header Manager provides standard facility to configure custom header
> Host.
> Apparently there is undocumented behavior that modifies this header and
> adds incorrect port.
> I’m sure that I’m not a first person who tries to load-test ‘virtual
> server’ behind reverse/caching proxy and it is just a matter of time to
> find the solution for this.
>
> Aliaksei Ilkiu
> alexmsu@gmail.com
>
>
>
> > On Jul 31, 2015, at 9:55 AM, Bob <b....@gmail.com> wrote:
> >
> > Try this plugin, it might help but not sure.
> >
> > http://jmeter-plugins.org/wiki/RawRequest/
> >
> > On 31/07/15 17:57, Aliaksei Ilkiu wrote:
> >> Hello Bob,
> >>
> >> Thanks for you feedback. It is already done: my server runs on IP
> 127.0.0.1 and port 9443.
> >> These values are set in HTTP Request Defaults (in HTTP Request these
> values are empty)
> >> Externally my server is available via https://myhost.com
> >> I'm running JMeter internally and want to keep it this way.
> >> In order to emulate external traffic I need to pass Host header with
> value 'myhost.com:443'.
> >> If I define such header in HTTP Header Manager the value gets replaced
> to 'myhost.com:9443'.
> >> I'm asking how can I configure Host header correctly.
> >> It was an old discussion about this
> http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-td4295391.html
> but it was only about customizing hostname and that is works, what does not
> work is port customization.
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: JMeter: how to override Host header

Posted by Aliaksei Ilkiu <al...@gmail.com>.
Bob,
I have few hundred requests and rewrite each of them as such low-level request is impractical.
HTTP Header Manager provides standard facility to configure custom header Host. 
Apparently there is undocumented behavior that modifies this header and adds incorrect port.
I’m sure that I’m not a first person who tries to load-test ‘virtual server’ behind reverse/caching proxy and it is just a matter of time to find the solution for this.

Aliaksei Ilkiu
alexmsu@gmail.com



> On Jul 31, 2015, at 9:55 AM, Bob <b....@gmail.com> wrote:
> 
> Try this plugin, it might help but not sure.
> 
> http://jmeter-plugins.org/wiki/RawRequest/
> 
> On 31/07/15 17:57, Aliaksei Ilkiu wrote:
>> Hello Bob,
>> 
>> Thanks for you feedback. It is already done: my server runs on IP 127.0.0.1 and port 9443.
>> These values are set in HTTP Request Defaults (in HTTP Request these values are empty)
>> Externally my server is available via https://myhost.com
>> I'm running JMeter internally and want to keep it this way.
>> In order to emulate external traffic I need to pass Host header with value 'myhost.com:443'.
>> If I define such header in HTTP Header Manager the value gets replaced to 'myhost.com:9443'.
>> I'm asking how can I configure Host header correctly.
>> It was an old discussion about this http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-td4295391.html but it was only about customizing hostname and that is works, what does not work is port customization.
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Bob <b....@gmail.com>.
Try this plugin, it might help but not sure.

http://jmeter-plugins.org/wiki/RawRequest/

On 31/07/15 17:57, Aliaksei Ilkiu wrote:
> Hello Bob,
>
> Thanks for you feedback. It is already done: my server runs on IP 127.0.0.1 and port 9443.
> These values are set in HTTP Request Defaults (in HTTP Request these values are empty)
> Externally my server is available via https://myhost.com
> I'm running JMeter internally and want to keep it this way.
> In order to emulate external traffic I need to pass Host header with value 'myhost.com:443'.
> If I define such header in HTTP Header Manager the value gets replaced to 'myhost.com:9443'.
> I'm asking how can I configure Host header correctly.
> It was an old discussion about this http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-td4295391.html but it was only about customizing hostname and that is works, what does not work is port customization.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Aliaksei Ilkiu <al...@gmail.com>.
We have complex infrastructure: external load-balancer <-> reverse proxy <-> web server
In order to troubleshot performance issues I need to have ability to connect directly to each component and emulate requests

Aliaksei Ilkiu

> On Jul 31, 2015, at 10:07 AM, Deepak Shetty wrote:
> 
> Hi
> just a question - why not run your app on the same port and simply use
> hosts file so that the Jmeter machine sees myhost.com = 127.0.0.1 whenever
> it is running ?  - otherwise your scripts will have to explicitly deal with
> the redirects and absolute URLs that the application may use.
> regards
> deepak


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
just a question - why not run your app on the same port and simply use
hosts file so that the Jmeter machine sees myhost.com = 127.0.0.1 whenever
it is running ?  - otherwise your scripts will have to explicitly deal with
the redirects and absolute URLs that the application may use.
regards
deepak

On Fri, Jul 31, 2015 at 5:57 AM, Aliaksei Ilkiu <al...@gmail.com> wrote:

> Hello Bob,
>
> Thanks for you feedback. It is already done: my server runs on IP
> 127.0.0.1 and port 9443.
> These values are set in HTTP Request Defaults (in HTTP Request these
> values are empty)
> Externally my server is available via https://myhost.com
> I'm running JMeter internally and want to keep it this way.
> In order to emulate external traffic I need to pass Host header with value
> 'myhost.com:443'.
> If I define such header in HTTP Header Manager the value gets replaced to '
> myhost.com:9443'.
> I'm asking how can I configure Host header correctly.
> It was an old discussion about this
> http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-td4295391.html
> but it was only about customizing hostname and that is works, what does not
> work is port customization.
>
> --
> Best regards,
>  Aliaksei                            mailto:alexmsu@gmail.com
>
> Friday, July 31, 2015, 7:30:01 AM, you wrote:
>
> > Add "HTTP Request" and define any host, port you want. Here is
> > documentation
> >
> http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request
>
> > On 31/07/15 17:15, Aliaksei Ilkiu wrote:
> >> Hello Bob,
> >>
> >> I'm not sure how to pass header Host using HTTP Request Defaults. Can
> you share the example?
> >> In my HTTP Request Defaults I have
> >> <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
> >> <stringProp name="HTTPSampler.port">9443</stringProp>
> >>
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: JMeter: how to override Host header

Posted by Aliaksei Ilkiu <al...@gmail.com>.
Hello Bob,

Thanks for you feedback. It is already done: my server runs on IP 127.0.0.1 and port 9443.
These values are set in HTTP Request Defaults (in HTTP Request these values are empty)
Externally my server is available via https://myhost.com
I'm running JMeter internally and want to keep it this way.
In order to emulate external traffic I need to pass Host header with value 'myhost.com:443'.
If I define such header in HTTP Header Manager the value gets replaced to 'myhost.com:9443'.
I'm asking how can I configure Host header correctly.
It was an old discussion about this http://jmeter.512774.n5.nabble.com/How-to-override-Host-header-td4295391.html but it was only about customizing hostname and that is works, what does not work is port customization.

-- 
Best regards,
 Aliaksei                            mailto:alexmsu@gmail.com

Friday, July 31, 2015, 7:30:01 AM, you wrote:

> Add "HTTP Request" and define any host, port you want. Here is 
> documentation 
> http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request

> On 31/07/15 17:15, Aliaksei Ilkiu wrote:
>> Hello Bob,
>>
>> I'm not sure how to pass header Host using HTTP Request Defaults. Can you share the example?
>> In my HTTP Request Defaults I have
>> <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
>> <stringProp name="HTTPSampler.port">9443</stringProp>
>>


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Bob <b....@gmail.com>.
Add "HTTP Request" and define any host, port you want. Here is 
documentation 
http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request

On 31/07/15 17:15, Aliaksei Ilkiu wrote:
> Hello Bob,
>
> I'm not sure how to pass header Host using HTTP Request Defaults. Can you share the example?
> In my HTTP Request Defaults I have
> <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
> <stringProp name="HTTPSampler.port">9443</stringProp>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Aliaksei Ilkiu <al...@gmail.com>.
Hello Bob,

I'm not sure how to pass header Host using HTTP Request Defaults. Can you share the example?
In my HTTP Request Defaults I have 
<stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
<stringProp name="HTTPSampler.port">9443</stringProp>

-- 
Best regards,
 Aliaksei                            mailto:alexmsu@gmail.com

Friday, July 31, 2015, 7:10:21 AM, you wrote:

> Is it mandatory to use "HTTP Header Manager"? Why don't you use "HTTP 
> Request" sampler or "HTTP Request Defaults"?

> On 31/07/15 16:47, Aliaksei Ilkiu wrote:
>> It seams to me that overwriting Host header by adding it into HTTP Header Manager works only partially: port gets overwritten to actual port.
>> So how can I pass my value for port portion of Host header?
>>
>> Example:
>> In HTTP Header Manager I added
>> <stringProp name="Header.name">Host</stringProp>
>> <stringProp name="Header.value">myhost.com:443</stringProp>
>>
>> But I see in View Results Tree
>>
>> GET https://127.0.0.1:9443/test.html
>>
>> [no cookies]
>>
>> Request Headers:
>> Connection: keep-alive
>> Host: myhost.com:9443
>>
>> Tested with JMeter 2.13 r1665067
>>


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: JMeter: how to override Host header

Posted by Bob <b....@gmail.com>.
Is it mandatory to use "HTTP Header Manager"? Why don't you use "HTTP 
Request" sampler or "HTTP Request Defaults"?

On 31/07/15 16:47, Aliaksei Ilkiu wrote:
> It seams to me that overwriting Host header by adding it into HTTP Header Manager works only partially: port gets overwritten to actual port.
> So how can I pass my value for port portion of Host header?
>
> Example:
> In HTTP Header Manager I added
> <stringProp name="Header.name">Host</stringProp>
> <stringProp name="Header.value">myhost.com:443</stringProp>
>
> But I see in View Results Tree
>
> GET https://127.0.0.1:9443/test.html
>
> [no cookies]
>
> Request Headers:
> Connection: keep-alive
> Host: myhost.com:9443
>
> Tested with JMeter 2.13 r1665067
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org