Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for non-existent image results in OK 200 and bootstrap page in V22 #12965

Closed
anssit opened this issue Feb 9, 2022 · 5 comments
Closed
Labels

Comments

@anssit
Copy link
Contributor

anssit commented Feb 9, 2022

Description of the bug

While testing #10965 in V23, discovered that in the default (JavaScript) bootstrap mode, requesting a non-existent image results in OK 200 response code and the bootstrap index.html returned as a result.

Expected behavior

Error code 404, behaviour as described in #10965.

Minimal reproducible example

To reproduce, add an image to some view in the application. Set image's resource name to something that will not be found from static resources.

    Image image = new Image("not_found.jpeg", "alt");
    add(image);

Versions

Vaadin: 22.0.4
Flow: 9.0.4
Java: Oracle Corporation 16.0.1
OS: x86_64 Mac OS X 11.5
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36

@Artur-
Copy link
Member

Artur- commented Feb 9, 2022

With 23 beta 1, I get

GET http://localhost:8080/not_found.jpeg 404

@anssit anssit changed the title Request for non-existent image results in OK 200 and bootstrap page in V23 Request for non-existent image results in OK 200 and bootstrap page in V2 Feb 9, 2022
@anssit anssit changed the title Request for non-existent image results in OK 200 and bootstrap page in V2 Request for non-existent image results in OK 200 and bootstrap page in V22 Feb 9, 2022
@anssit
Copy link
Contributor Author

anssit commented Feb 9, 2022

You are absolutely right. By mistake I tested this with V22 and assumed it is the same for V23. It is fixed for V23 in #12571. Changed the title accordingly.

@Artur-
Copy link
Member

Artur- commented Feb 9, 2022

So it is fine to close this?

@anssit
Copy link
Contributor Author

anssit commented Feb 9, 2022

We decided in the team to cherry-pick #12571 to V22. We'll keep this issue open until the CP has been merged.

@anssit
Copy link
Contributor Author

anssit commented Feb 10, 2022

#12571 cherry picked in #12969, closing this issue.

@anssit anssit closed this as completed Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants