You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "tobiasbaum (via GitHub)" <gi...@apache.org> on 2026/04/17 15:16:07 UTC

Re: [PR] Adds the possibility to change the USE_TLS_RESPONSE HTTP response [tomcat]

tobiasbaum commented on PR #709:
URL: https://github.com/apache/tomcat/pull/709#issuecomment-4269213763

   I would like to see this feature added to Tomcat. Does anyone know the reason why it has not been merged, yet?
   
   Some background on my use case: 
   
   When I have a secure (https) connector listening on some port (say 8080) and I accidentally call it without TLS (e.g., http://localhost:8080/ instead of https://localhost:8080/), I get an error response as follows:
   Bad Request
   This combination of host and port requires TLS.
   
   For non-technical users, this error response is not ideal. Therefore, I would like to be able to configure this response. Ideally in my case, the response would be a redirect that changes the protocol from http to https and leaves the remaining url the same. But serving a custom static HTML response would be sufficient, too (as I could then, e.g., implement the redirect in JavaScript or provide a user-friendly explanation). Also, in my case, configuration via code would be sufficient as I run Tomcat embedded as a library.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org