Creating HttpResponse

When creating an HTTP response manually, how can I get ServerandETag

     * HTTP/1.1 200 OK
     * Date: Mon, 23 Apr 2012 23:44:52 GMT
     * Server: Apache/2.2.3 (Red Hat)                  <-----
     * Last-Modified: Fri, 16 Sep 2005 18:08:50 GMT
     * ETag: "421142-2f-400e77c517080"                 <-----
     * Accept-Ranges: bytes
     * Content-Length: 47
     * Content-Type: text/plain
     * Connection: close
+3
source share
2 answers

A “server” is what your HTTP server wants to name or identify. That is, "Zumgto Surver 4.5".

An “ETag” identifies a “version” of a particular item, since your server can reasonably say “this ETag matches the current version”, you can send almost everything. That is, "v3345" or the hash of the element ... Completely optional if you do not support the "If-None-Match" header in requests.

+3
source

. sever, . eTag . . .

Server: Program/version (O/S)
ETag:  "Timestamp"
+2

All Articles