Include a Server
HTTP response header with details of StoRM-WebDAV
#78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
The
Server
HTTP response header allows the server software to provide the client with information about itself in a somewhat standardised fashion.We would like the client to know the version of the server, along with some identifier that describes a specific instance of that server. The latter is to allow the client to identify whether the server has been restarted.
Modification:
Include an additional Servlet Filter that includes the
Server
HTTP response header. The header value includes the StoRM-WebDAV version and an instance identifier.The StoRM version is taken from the
Implementation-Version
attribute from the StoRM-WebDAV jar's MANIFEST file, which (in turn) is derived from the version in maven pom.xml file.The instance identifier is calculated based on the start time of StoRM WebDAV (in milliseconds) truncated to yield 24-bits of entropy.
Result:
StoRM WebDAV HTTP responses now have a
Server
header that describes the StoRM-WebDAV version and provides a simple instance ID.