summary refs log tree commit diff stats
path: root/post_test.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-03-16 14:49:06 -0400
committerBen Morrison <ben@gbmor.dev>2020-03-16 14:49:06 -0400
commit3bb022fb6f5c6d273e2787e10a28e821c88734d7 (patch)
tree052b3bda7febfd801206deb0db3cfeff23032731 /post_test.go
parent23d4356931c90d83913ca483cb0ec42bcc357f58 (diff)
downloadgetwtxt-0.4.11.tar.gz
eliminated panic when serving requests from empty registry v0.4.11
when generating an etag from a query that returns no results,
indexing into the byte slice caused that thread to panic.

now checking for a nil byte slice or a small byte slice in
handlers.go:46:getEtag()

on nil byte slice, return empty string for etag. on small
byte slice, don't truncate it, but return the whole thing.
Diffstat (limited to 'post_test.go')
0 files changed, 0 insertions, 0 deletions