Leon-Schwandt commented on PR #709:
URL: https://github.com/apache/tomcat/pull/709#issuecomment-4273812989
Do you mean something like that?
```java
@SpringBootApplication
@RestController
public class MyApplication {
@Value("classpath:static/index.html")
private Resource htmlFile;
static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
@GetMapping("/")
public String helloWorld() {
return "Hello World!";
}
@EventListener
public void onServerInitialized(WebServerInitializedEvent event) throws
IOException {
final String html = htmlFile.getContentAsString(UTF_8);
// @formatter:off
final String httpResponse = "HTTP/1.1 200 \r\n" +
"Content-Type: text/html;charset=UTF-8\r\n" +
"Connection: close\r\n" +
"\r\n" +
html;
// @formatter:on
TLSClientHelloExtractor.USE_TLS_RESPONSE =
httpResponse.getBytes(UTF_8);
}
}
```
<img width="1076" height="795" alt="image"
src="https://github.com/user-attachments/assets/821b6719-4cfa-48fd-b97d-85a1497fc342"
/>
This is just a (intentionally brief) example, but it wouldn't require any
changes to Tomcat's source code. If this is what you meant, perhaps this option
could be documented somewhere or posted as a note so that other users are
informed about it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]