Re: Unable to read the orginal url when host header is specified.
Anaurag, On 3/11/21 20: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' What do you think curl is sending to the server with the above command? The -vv suggests that it will dump everything out. What does the request line look like? 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? I think you will find that curl never sends the text "localhost:8443" to the server, so it's not possible for the server to read that from the request in any way. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to read the orginal url when host header is specified.
I am using 9.0.31 Get Outlook for Android<https://aka.ms/ghei36> From: Mark Thomas 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Unable to read the orginal url when host header is specified.
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? --- Thanks and Regards, Anurag Sharma.