I simply cannot access url for my spring web applications anymore cause it always throws this error:
2020-10-05 15:18:02.599 INFO 13060 --- [nio-8083-exec-1] o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header
Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x020x000x010x000x010xfc0x030x030x06m0xb9$0xccs0xc9D\0xecJA0x950x810xafM(0x1b0xbf0xad0x0d}y-}0x97S0xe70xe8e0xe30xee]. HTTP method names must be tokens
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:418) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:260) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.37.jar:9.0.37]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.37.jar:9.0.37]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589) [tomcat-embed-core-9.0.37.jar:9.0.37]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.37.jar:9.0.37]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_261]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_261]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.37.jar:9.0.37]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_261]
I've tried to clean the browser history and cookies (using different browsers), I've tried to access it with http instead of https, I've tried to run several different projects (which used to work in the past). I don't know what else I could try to solve this error.
What could be causing it?
Controller:
@Controller
public class ProductController {
@Autowired
private ProductService productService;
@Autowired
public ProductController(ProductService productService) {
this.productService = productService;
}
@GetMapping("/products")
public ModelAndView products() {
ModelAndView mv = new ModelAndView();
List<Product> productList = (List<Product>) productService.getAllProducts();
mv.addObject("activeTabProducts", true);
mv.addObject("productList", productList);
return mv;
}
}
I don't know why, but it worked when I tried to access it from an anonymous tab