Adding Etag to user profile pictures. (#4926)

Этот коммит содержится в:
Christopher Speller
2017-01-03 09:56:30 -05:00
коммит произвёл enahum
родитель 42e04d92c4
Коммит 4bca74d5c1
2 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@@ -712,7 +712,15 @@ func TestUserCreateImage(t *testing.T) {
Client.Login(user.Email, "passwd1")
Client.DoApiGet("/users/"+user.Id+"/image", "", "")
if resp, err := Client.DoApiGet("/users/"+user.Id+"/image", "", ""); err != nil {
t.Fatal(err)
} else {
etag := resp.Header.Get(model.HEADER_ETAG_SERVER)
resp2, _ := Client.DoApiGet("/users/"+user.Id+"/image", "", etag)
if resp2.StatusCode != 304 {
t.Fatal("Should have hit etag")
}
}
if utils.Cfg.FileSettings.DriverName == model.IMAGE_DRIVER_S3 {
endpoint := utils.Cfg.FileSettings.AmazonS3Endpoint