I have checkout spring-boot-http-3-jetty and run. It's working as expected[http-3(h3) from 2nd request] furthermore, I want to test it with POST request with body so, I have added the following thymeleaf dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
To handle form request added Controller
package com.example.demo;
import java.io.IOException;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import jakarta.servlet.ServletRequest;
@Controller
public class UploadController {
@GetMapping("/upload")
public String displayUploadForm(ServletRequest request, Model model) throws IOException {
System.out.println("displayUploadForm:" + request.getProtocol());
model.addAttribute("message", "hello from upload controller...");
return "uploadForm";
}
@PostMapping("/handleUpload")
public String handleFileUpload(@RequestParam("file") MultipartFile file, Model model) {
model.addAttribute("message", "You successfully uploaded " + file.getOriginalFilename() + "!");
return "uploadForm";
}
}
Added thymeleaf template
<html>
<body>
<div th:if="${message}">
<h2 th:text="${message}"/>
</div>
<div>
<form method="POST" enctype="multipart/form-data" action="/handleUpload">
<table>
<tr><td>File to upload:</td><td><input type="file" name="file" /></td></tr>
<tr><td></td><td><input type="submit" value="Upload" /></td></tr>
</table>
</form>
</div>
</body>
</html>
While hitting https://demo.local:9002/upload It shows form like and getting response header
alt-svc h3=":9002"; ma=86400; persist=1
But after submitting form getting below error

I have import certificate in firefox.
Also with RestController GET request working with http-3 after initial request served with (http-2 & response header alt-svc h3=":9002"; ma=86400; persist=1
also notice sometime its working http-2 for consecutive request.
Note:
- checking with latest firefox
- java version 19 on windows os
Its there any other config need to check to work with http-3(h3)?
Thanks in advance :-)


