Przeglądaj źródła

fix: add JavaDoc warning to avoid using ResponseWriter for directories (#12324)

* fix: add JavaDoc warning to avoid using ResponseWriter for directories

Cherry-picked from: https://github.com/vaadin/flow/pull/11112
tags/8.14.0.alpha1
Anna Koskinen 2 lat temu
rodzic
commit
ba02350206
No account linked to committer's email address

+ 7
- 0
server/src/main/java/com/vaadin/server/VaadinServlet.java Wyświetl plik

/** /**
* Writes the contents of the given resourceUrl in the response. Can be * Writes the contents of the given resourceUrl in the response. Can be
* overridden to add/modify response headers and similar. * overridden to add/modify response headers and similar.
* <p>
* WARNING: note that this should not be used for a {@code resourceUrl} that
* represents a directory! For security reasons, the directory contents
* should not be ever written into the {@code response}, and the
* implementation which is used for setting the content length relies on
* {@link URLConnection#getContentLength()} method which returns incorrect
* values for directories.
* *
* @param request * @param request
* The request for the resource * The request for the resource

Ładowanie…
Anuluj
Zapisz