You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frank Taffelt <Fr...@interface-projects.de> on 2016/06/28 15:02:42 UTC
wrong request.getServerPort value reported on upgraded HTTP/2
connector ?
Calling the method request.getServerPort() returns 80 on http/2 upgraded requests for the https connector. I would expect that this method should return 443 in these calls.
My current workarround is to disable the APR Listener as this results in correct value for the https connector. So is this a bug?
so here is my config:
Tomcat: 8.5.3
OS: Win7 (64bit)
tcnative: 1.2.7
Java Version: 1.8.0_92-b14
parts from my server.xml:
* active APR Listener
* connector:
<!-- https connector on 443 -->
<Connector port="443"
scheme="https"
secure="true"
SSLEnabled="true"
>
<!-- upgrade if possible when APR is active-->
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig
ciphers="HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!kRSA"
protocols="+SSLv2Hello,+TLSv1,+TLSv1.1,+TLSv1.2">
<Certificate certificateKeystoreFile="${tomcat.ssl.keystore.file}"
certificateKeystorePassword="${tomcat.ssl.keystore.pass}"
certificateKeystoreType="${tomcat.ssl.keystore.type}"
certificateKeyAlias="tomcat"
type="RSA" />
</SSLHostConfig>
</Connector>
Thanks,
Frank
RE: AW: wrong request.getServerPort value reported on upgraded
HTTP/2 connector ?
Posted by Frank Taffelt <Fr...@interface-projects.de>.
that was fast. thanks.
Frank
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Wednesday, June 29, 2016 3:41 PM
To: Tomcat Users List
Subject: Re: AW: wrong request.getServerPort value reported on upgraded HTTP/2 connector ?
On 29/06/2016 09:49, Mark Thomas wrote:
> On 29/06/2016 07:50, Frank Taffelt wrote:
>> i have no other connectors than the one on port 443.
>
> I can reproduce this. I'll look at getting this fixed for the next release.
Fixed. The fix will be in 9.0.0.M9 onwards and 8.5.4 onwards.
Mark
>
> Mark
>
>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Gesendet: Dienstag, 28. Juni 2016 17:56
>> An: Tomcat Users List
>> Betreff: Re: wrong request.getServerPort value reported on upgraded HTTP/2 connector ?
>>
>> Frank,
>>
>> On 6/28/16 11:02 AM, Frank Taffelt wrote:
>>> Calling the method request.getServerPort() returns 80 on http/2
>>> upgraded requests for the https connector. I would expect that this
>>> method should return 443 in these calls. My current workarround is
>>> to disable the APR Listener as this results in correct value for the
>>> https connector. So is this a bug?
>>
>> Definitely seems like a bug. You have no other connectors defined other than the one on port 443?
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: wrong request.getServerPort value reported on upgraded HTTP/2
connector ?
Posted by Mark Thomas <ma...@apache.org>.
On 29/06/2016 09:49, Mark Thomas wrote:
> On 29/06/2016 07:50, Frank Taffelt wrote:
>> i have no other connectors than the one on port 443.
>
> I can reproduce this. I'll look at getting this fixed for the next release.
Fixed. The fix will be in 9.0.0.M9 onwards and 8.5.4 onwards.
Mark
>
> Mark
>
>
>>
>> -----Urspr�ngliche Nachricht-----
>> Von: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Gesendet: Dienstag, 28. Juni 2016 17:56
>> An: Tomcat Users List
>> Betreff: Re: wrong request.getServerPort value reported on upgraded HTTP/2 connector ?
>>
>> Frank,
>>
>> On 6/28/16 11:02 AM, Frank Taffelt wrote:
>>> Calling the method request.getServerPort() returns 80 on http/2
>>> upgraded requests for the https connector. I would expect that this
>>> method should return 443 in these calls. My current workarround is to
>>> disable the APR Listener as this results in correct value for the
>>> https connector. So is this a bug?
>>
>> Definitely seems like a bug. You have no other connectors defined other than the one on port 443?
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: wrong request.getServerPort value reported on upgraded HTTP/2
connector ?
Posted by Mark Thomas <ma...@homeinbox.net>.
On 29/06/2016 07:50, Frank Taffelt wrote:
> i have no other connectors than the one on port 443.
I can reproduce this. I'll look at getting this fixed for the next release.
Mark
>
> -----Urspr�ngliche Nachricht-----
> Von: Christopher Schultz [mailto:chris@christopherschultz.net]
> Gesendet: Dienstag, 28. Juni 2016 17:56
> An: Tomcat Users List
> Betreff: Re: wrong request.getServerPort value reported on upgraded HTTP/2 connector ?
>
> Frank,
>
> On 6/28/16 11:02 AM, Frank Taffelt wrote:
>> Calling the method request.getServerPort() returns 80 on http/2
>> upgraded requests for the https connector. I would expect that this
>> method should return 443 in these calls. My current workarround is to
>> disable the APR Listener as this results in correct value for the
>> https connector. So is this a bug?
>
> Definitely seems like a bug. You have no other connectors defined other than the one on port 443?
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
AW: wrong request.getServerPort value reported on upgraded HTTP/2
connector ?
Posted by Frank Taffelt <Fr...@interface-projects.de>.
i have no other connectors than the one on port 443.
-----Ursprüngliche Nachricht-----
Von: Christopher Schultz [mailto:chris@christopherschultz.net]
Gesendet: Dienstag, 28. Juni 2016 17:56
An: Tomcat Users List
Betreff: Re: wrong request.getServerPort value reported on upgraded HTTP/2 connector ?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Frank,
On 6/28/16 11:02 AM, Frank Taffelt wrote:
> Calling the method request.getServerPort() returns 80 on http/2
> upgraded requests for the https connector. I would expect that this
> method should return 443 in these calls. My current workarround is to
> disable the APR Listener as this results in correct value for the
> https connector. So is this a bug?
Definitely seems like a bug. You have no other connectors defined other than the one on port 443?
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJXcp4aAAoJEBzwKT+lPKRYfwgP/isAFGcsIB0XcgY/SCzVYdas
WO0gBJmDl8IiDG7ALYQ+XZqvCaZZbQRvLZ5se6gx9UGbnpKqTV27j51kSEKb9txE
sat8y7JmYlwrnTrxu6vDgPYHODYs+tI7ilYC02YSBth9v9E6I14egEV7bEv5H0F4
zYavdyO8jUFDFnv/tqllPfu0vm58BSHZnGHJcnSLU3hqijJOcS1edEq+jzj/xAJr
GtMi8ehI2RMSGq5nizl5Yc3zuc3jlsvilpPSc3ygqJfNltKBKDnNivUPWONF4ozS
Ibl6o1Rs8hs132xZka1OPI3+BlTc9HkQgHU3jvrQlfkWzNjv6ogM6Q5B76Jgv65T
li65XFLmw9x6SdUWn93S4FIQIJs/rYoJyX53ZwSlHiONFZh2C4KlDCzQPJ6iMt5z
UdQeUHCHZ2xZURmScSpVAOkyGog6V84kHtaDVPgD8+umNBqA+ujy7abDb6ZdKDuC
Yke6RssFatQmWBGJkp3JORPOIq1C1sNh64Gd1hz8U17kHK0zmffYis5aqeFPxUxr
2jEz1VAbsZULDclpWi2JW4TKezVrOykmQ4Dmgz//OOKeXW1XCwtaigK/c3XSv95D
cm3tpaGUsdhLUM75YaK/H1sLKwVyav6rubYrXWmKvTOPgO4sd3DlXFbW5T7NT+CR
ikuriVBWliBg8rb61KlH
=b+VE
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: wrong request.getServerPort value reported on upgraded HTTP/2
connector ?
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Frank,
On 6/28/16 11:02 AM, Frank Taffelt wrote:
> Calling the method request.getServerPort() returns 80 on http/2
> upgraded requests for the https connector. I would expect that
> this method should return 443 in these calls. My current
> workarround is to disable the APR Listener as this results in
> correct value for the https connector. So is this a bug?
Definitely seems like a bug. You have no other connectors defined other
than the one on port 443?
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJXcp4aAAoJEBzwKT+lPKRYfwgP/isAFGcsIB0XcgY/SCzVYdas
WO0gBJmDl8IiDG7ALYQ+XZqvCaZZbQRvLZ5se6gx9UGbnpKqTV27j51kSEKb9txE
sat8y7JmYlwrnTrxu6vDgPYHODYs+tI7ilYC02YSBth9v9E6I14egEV7bEv5H0F4
zYavdyO8jUFDFnv/tqllPfu0vm58BSHZnGHJcnSLU3hqijJOcS1edEq+jzj/xAJr
GtMi8ehI2RMSGq5nizl5Yc3zuc3jlsvilpPSc3ygqJfNltKBKDnNivUPWONF4ozS
Ibl6o1Rs8hs132xZka1OPI3+BlTc9HkQgHU3jvrQlfkWzNjv6ogM6Q5B76Jgv65T
li65XFLmw9x6SdUWn93S4FIQIJs/rYoJyX53ZwSlHiONFZh2C4KlDCzQPJ6iMt5z
UdQeUHCHZ2xZURmScSpVAOkyGog6V84kHtaDVPgD8+umNBqA+ujy7abDb6ZdKDuC
Yke6RssFatQmWBGJkp3JORPOIq1C1sNh64Gd1hz8U17kHK0zmffYis5aqeFPxUxr
2jEz1VAbsZULDclpWi2JW4TKezVrOykmQ4Dmgz//OOKeXW1XCwtaigK/c3XSv95D
cm3tpaGUsdhLUM75YaK/H1sLKwVyav6rubYrXWmKvTOPgO4sd3DlXFbW5T7NT+CR
ikuriVBWliBg8rb61KlH
=b+VE
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org