aboutsummaryrefslogtreecommitdiff
path: root/lib/memfs/memfs_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-12-19 01:33:12 +0700
committerShulhan <ms@kilabit.info>2021-12-19 02:13:57 +0700
commitba9c2ea6bd2a3c39f20fe7b2cc702e7fd4c99c44 (patch)
treeb7f3db4fd854c186ed15da8dff7c8e8961b5ecc5 /lib/memfs/memfs_test.go
parent9b8841034d7f4b6f92078f6dc682bd010fb37e72 (diff)
downloadpakakeh.go-ba9c2ea6bd2a3c39f20fe7b2cc702e7fd4c99c44.tar.xz
lib/memfs: remove field ContentEncoding from EmbedOptions and Node
The original idea for option ContentEncoding in EmbedOptions and Node is to save spaces, compressing the content on disk on embedding and doing transport, when the MemFS instance is used to serve the (embedded) contents of file system. This option turns out break the HTTP content negotiation [1] of accept-encoding header, if the HTTP server does not handle it properly, which default Go HTTP server does not. In order to prevent this issue in the future, for anyone who use the memfs for serving static HTTP contents, we remove the options and store the embedded content as is and let the HTTP server handle how the compression by itself. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation
Diffstat (limited to 'lib/memfs/memfs_test.go')
0 files changed, 0 insertions, 0 deletions