summaryrefslogtreecommitdiffstats
path: root/api/api.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-12-13 09:10:28 -0800
committerHarrison Healey <harrisonmhealey@gmail.com>2016-12-13 12:10:28 -0500
commit1b6b69fa8717990bf304f3d7c423934ecfb16f12 (patch)
tree0e93b7c7796c95513f6cb7a2bd6ff741c04b17b2 /api/api.go
parent6db2cc821d9fbe2da875100d2e5ad90ed0f58c05 (diff)
downloadchat-1b6b69fa8717990bf304f3d7c423934ecfb16f12.tar.gz
chat-1b6b69fa8717990bf304f3d7c423934ecfb16f12.tar.bz2
chat-1b6b69fa8717990bf304f3d7c423934ecfb16f12.zip
Fixing etag issue with load tests (#4777)
Diffstat (limited to 'api/api.go')
-rw-r--r--api/api.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/api.go b/api/api.go
index 10dfaa7d5..926edfe34 100644
--- a/api/api.go
+++ b/api/api.go
@@ -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
}