I am trying to identify a specific web service assembly number (REST and SOAP interfaces) using HTTP in response to messages.
Just to be clear, I am not trying to control which version of the application is used by the client, since this is handled by the traffic manager and the service registry (it has also been discussed a lot), I only want to be able to debug later which version was used or used, for example, to check that the traffic manager is serving the correct version.
I looked at the HTTP specification for a long time and cannot decide between using Pragma
Pragma: application-version=1.0.0-SNAPSHOT
using the optional Server header
Server: Apache-Coyote/1.1 Server: MyService-1.0.0-SNAPSHOT
using Via
Via: MyService-1.0.0-SNAPSHOT
or customer header
X-ApplicationVersion: 1.0.0-SNAPSHOT
In my opinion, using Via or Server semantically incorrect, but using the X- header carries the risk of refusing a proxy, but Pragma has no restrictions and, therefore, is more difficult to parse if you want to use it programmatically.
I also have the feeling that multiple Server headers will not be respected, but there is no way to specify multiple values ββwith the container used (JBoss).
Is there a precedent for this?
Anyone have any tips?
Should I just shut up and use it?
James source share