aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/filesystem_test.go
diff options
context:
space:
mode:
authorAlexey Sharov <www.pismeco@gmail.com>2018-10-01 19:39:39 +0800
committerAnton Evangelatov <anton.evangelatov@gmail.com>2018-10-01 19:39:39 +0800
commitdc5d643bb59812cda578fac941c2f1da316bc9d7 (patch)
tree7405f387672f0548eb4734a93581780c96cee7a9 /swarm/api/filesystem_test.go
parentb69942befeb9f1af55cad0f91953bdaea2ea3efb (diff)
downloaddexon-dc5d643bb59812cda578fac941c2f1da316bc9d7.tar
dexon-dc5d643bb59812cda578fac941c2f1da316bc9d7.tar.gz
dexon-dc5d643bb59812cda578fac941c2f1da316bc9d7.tar.bz2
dexon-dc5d643bb59812cda578fac941c2f1da316bc9d7.tar.lz
dexon-dc5d643bb59812cda578fac941c2f1da316bc9d7.tar.xz
dexon-dc5d643bb59812cda578fac941c2f1da316bc9d7.tar.zst
dexon-dc5d643bb59812cda578fac941c2f1da316bc9d7.zip
cmd/swarm, swarm: cross-platform Content-Type detection (#17782)
- Mime types generator (Standard "mime" package rely on system-settings, see mime.osInitMime) - Changed swarm/api.Upload: - simplify I/O throttling by semaphore primitive and use file name where possible - f.Close() must be called in Defer - otherwise panic or future added early return will cause leak of file descriptors - one error was suppressed
Diffstat (limited to 'swarm/api/filesystem_test.go')
-rw-r--r--swarm/api/filesystem_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/swarm/api/filesystem_test.go b/swarm/api/filesystem_test.go
index fe7527b1f..02f5bff65 100644
--- a/swarm/api/filesystem_test.go
+++ b/swarm/api/filesystem_test.go
@@ -60,7 +60,7 @@ func TestApiDirUpload0(t *testing.T) {
content = readPath(t, "testdata", "test0", "index.css")
resp = testGet(t, api, bzzhash, "index.css")
- exp = expResponse(content, "text/css", 0)
+ exp = expResponse(content, "text/css; charset=utf-8", 0)
checkResponse(t, resp, exp)
addr := storage.Address(common.Hex2Bytes(bzzhash))
@@ -140,7 +140,7 @@ func TestApiDirUploadModify(t *testing.T) {
content = readPath(t, "testdata", "test0", "index.css")
resp = testGet(t, api, bzzhash, "index.css")
- exp = expResponse(content, "text/css", 0)
+ exp = expResponse(content, "text/css; charset=utf-8", 0)
checkResponse(t, resp, exp)
_, _, _, _, err = api.Get(context.TODO(), nil, addr, "")