vaadin / vaadin-connect

A Vaadin Labs experiment with a secure stateless communication framework
https://vaadin.com/labs/vaadin-connect
Apache License 2.0
18 stars 5 forks source link

404 returned by frontend interceptor for valid routes #349

Open Artur- opened 5 years ago

Artur- commented 5 years ago

Using the current master of base-connect-starter and requesting http://localhost:8080/foo returns the page but uses 404 as the response code.

Seems like VaadinFrontendInterceptor tries to handle this at https://github.com/vaadin/vaadin-connect/blob/master/vaadin-frontend-server/src/main/java/com/vaadin/frontend/server/VaadinFrontendInterceptor.java#L94 but at that point the response is already committed so setting the response code has no effect.

Setting the response code to OK before dispatching the request forward instead of after seems to fix the issue