You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2015/07/31 21:25:12 UTC

[Bug 58201] New: Usage of port from host header in http sampler inconsistent

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

            Bug ID: 58201
           Summary: Usage of port from host header in http sampler
                    inconsistent
           Product: JMeter
           Version: 2.13
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: felix.schumacher@internetallee.de

Created attachment 32949
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32949&action=edit
Don't strip port from http Host header in httpclient 3 and use port from header
in httpclient 4

The port numbers in a user defined http Host header differ by client
implementations in http sampler.

* httpclient 4 will replace the port number with the port number extracted from
the sampler
* httpclient 3 will remove the port number entirely
* javaclient will leave the port number untouched

This behaviour is inconsistent and the httpclient behaviour is probably not
wanted by the users (see http://jmeter.markmail.org/thread/457kefpz4cmtlqvd)

The implementation was updated in response to bug #51775. In my tests the
attached patch does not exhibit the described double port number when using a
proxy and specifying the host header explicitly. Maybe the httpclient
implementations where changed in between.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58201] Usage of port from host header in http sampler inconsistent

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58201

--- Comment #1 from Milamber <mi...@apache.org> ---

The patch works with HC4 but not for HC3. The removing of the replaceFirst in
HC3 come back the double port in headers Host key when you record a script
(when the URL uses a port different of 80)

Probably the HC3 has need the method getPortFromHostHeader() like the HC4.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58201] Usage of port from host header in http sampler inconsistent

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58201

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Felix Schumacher <fe...@internetallee.de> ---
As I haven't found a way to make httpclient 3 correctly, I have only committed
the changes for httpclient 4.

That will not make all samplers behave consistently, but it will allow
httpclient to behave similar to the java sampler and let the user specify a
port number.

In my eyes httpclient 3 still shows the wrong behaviour, but can't be changed.

Date: Sun Aug 23 09:39:19 2015
New Revision: 1697158

URL: http://svn.apache.org/r1697158
Log:
Use the port from a given host header, if available.

Bugzilla Id: 58201

Modified:
   
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/xdocs/changes.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58201] Usage of port from host header in http sampler inconsistent

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58201

--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
OK, now I see the double port with httpclient 3.x. Strange that it only shows
on our internal proxy. When I use a proxy setup in http sampler it doesn't show
up.

-- 
You are receiving this mail because:
You are the assignee for the bug.