You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2021/03/12 07:27:00 UTC
Re: Unable to read the orginal url when host header is specified.
On 12/03/2021 01:50, Anurag Sharma wrote:
>
> My code is running on local host and i am hitting one of my urls as below
>
> curl -k -vv --http1.1 "https://localhost:8443/versa/login" -H 'Host: google.com'
>
> Now i m a trying to read the url in my code using following
>
> StringBuffer url = httpServletRequest.getRequestURL();
>
> The value is always as follows whether the protocal HTTP/1.1 or HTTP/2
> https://google.com/versa/login
>
> how to read the original url here?
Tomcat version?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Unable to read the orginal url when host header is specified.
Posted by Anurag Sharma <an...@versa-networks.com>.
I am using 9.0.31
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: Mark Thomas <ma...@apache.org>
Sent: Thursday, March 11, 2021, 11:27 PM
To: users@tomcat.apache.org
Subject: Re: Unable to read the orginal url when host header is specified.
On 12/03/2021 01:50, Anurag Sharma wrote:
>
> My code is running on local host and i am hitting one of my urls as below
>
> curl -k -vv --http1.1 "https://localhost:8443/versa/login" -H 'Host: google.com'
>
> Now i m a trying to read the url in my code using following
>
> StringBuffer url = httpServletRequest.getRequestURL();
>
> The value is always as follows whether the protocal HTTP/1.1 or HTTP/2
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoogle.com%2Fversa%2Flogin&data=04%7C01%7Canurags%40versa-networks.com%7C8e4a356cdc8648af3dea08d8e5284124%7Cd39a23bd897c45f1a3f5c5213b673627%7C0%7C0%7C637511308345816627%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JIFrpVVF8e2YLZYZZbVnjYGp7VzNuxPb3POsUR5c1h8%3D&reserved=0
>
> how to read the original url here?
Tomcat version?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org