Fixing etag issue with load tests (#4777)

This commit is contained in:
Corey Hulen
2016-12-13 12:10:28 -05:00
committed by Harrison Healey
parent 6db2cc821d
commit 1b6b69fa87
+1
View File
@@ -117,6 +117,7 @@ func InitApi() {
func HandleEtag(etag string, w http.ResponseWriter, r *http.Request) bool {
if et := r.Header.Get(model.HEADER_ETAG_CLIENT); len(etag) > 0 {
if et == etag {
w.Header().Set(model.HEADER_ETAG_SERVER, etag)
w.WriteHeader(http.StatusNotModified)
return true
}