RE: Getting wrong value calling request.getScheme()
Yes ... Thanks. -Original Message- From: Mark Thomas Sent: Wednesday, January 24, 2024 5:39 PM To: users@tomcat.apache.org Subject: Re: Getting wrong value calling request.getScheme() On 24/01/2024 15:48, joan.balagu...@ventusproxy.com wrote: > Any help would be really appreciated. Configuration error. Someone has done the equivalent of Or possibly a mis-configured RemoteIpFilter (or Valve). Or similar. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Getting wrong value calling request.getScheme()
On 24/01/2024 15:48, joan.balagu...@ventusproxy.com wrote: Any help would be really appreciated. Configuration error. Someone has done the equivalent of Or possibly a mis-configured RemoteIpFilter (or Valve). Or similar. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Getting wrong value calling request.getScheme()
Hello, Tomcat 10.1.18 with jakarta servlet 6, embedded in our app using jdk17. I have the following class: public Url(jakarta.servlet.http.HttpServletRequest request){ System.out.println("this.scheme = '" + request.getScheme() + "'"); System.out.println("this.protocol = '" + request.getProtocol() + "'"); System.out.println("this.requestURL = '" + request.getRequestURL() + "'"); } This method prints: this.scheme = 'HTTP/1.1' this.protocol = 'HTTP/1.1' this.requestURL = 'HTTP/1.1://127.0.0.1/derbysoft/multipleavailability' I tried with a couple of jdk17 (openJDK and Zulu) and the result is the same. Not sure if this a bug or a change in the servlet specification, but it seems not to be this: https://jakarta.ee/specifications/servlet/6.0/apidocs/jakarta.servlet/jakart a/servlet/servletrequest#getScheme() String getScheme() Returns the name of the scheme used to make this request, for example, http, https, or ftp. Different schemes have different rules for constructing URLs, as noted in RFC 1738. Returns: a String containing the name of the scheme used to make this request Any help would be really appreciated. Thanks, Joan.