GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/4743
[FLINK-7727] [REST] Improve error logging in StaticFileServerHandlers
## What is the purpose of the change
This PR improves the logging of errors in the StateFileServerHandlers
## Brief change log
* separate checks for file existence and path pointing to a file
* failed file existence returns `404 Not Found`
* pointing to a directory returns `405 Method Not Allowed`
* add a debug logging message to each check
* re-order checks, so that we first check whether the path points into the
root directory before checking if it exists, to not leak information about
resources the user may not access
## Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 7727
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4743.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4743
----
commit 3255c3043d475c8cde3cd251fc6d1340c5943292
Author: zentol <[email protected]>
Date: 2017-09-28T12:21:12Z
[FLINK-7727] [REST] Improve error logging in StaticFileServerHandlers
----
---