Skip to content

Commit 8585dd4

Browse files
committed
fix(server): WriteHeader
1 parent dde9aed commit 8585dd4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

config/server/flags.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88
)
99

1010
const (
11-
hostAddrUsage = "address and port to run server"
11+
hostAddrUsage = "base URL of target address"
1212
logLevellUsage = "log level"
1313
storeIntervalUsage = "store interval in seconds (zero for sync)"
14-
fileStoragePathUsage = "file storage path"
14+
fileStoragePathUsage = "path to persistent file storage"
1515
restoreUsage = "load data from storage"
16-
databaseDSNUsage = "DB connection address"
17-
secretKeyUsage = "encryption key"
16+
databaseDSNUsage = "connection string to database"
17+
secretKeyUsage = "sha256 key for hashing"
1818
)
1919

2020
const (

internal/server/gzip/gzip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (c *compressWriter) Write(p []byte) (int, error) {
3636
}
3737

3838
func (c *compressWriter) WriteHeader(statusCode int) {
39-
if statusCode < 300 && c.compressibleContent() {
39+
if c.compressibleContent() {
4040
c.w.Header().Set("Content-Encoding", "gzip")
4141
}
4242
c.w.WriteHeader(statusCode)

0 commit comments

Comments
 (0)