herenow/go-crate

Crate does not close connections when errors occur interacting with blobs

Closed this issue · 0 comments

It seems that Crate misbehaves when errors occur when interacting with blobs. For example, given the following sequence of actions:

Request Expected Reponse Actual Response
GET http://localhost:4200/_blobs/myblob/abc 200 200
GET http://localhost:4200/_blobs/myblob/def 404 404
GET http://localhost:4200/_blobs/myblob/abc 200 404
GET http://localhost:4200/_blobs/myblob/abc 200 200

Its as though the previous failed response is "cached". Turns out, if the header Connection: close is set, everything works as expected. A bug is being filed against the Crate project. In the meantime, this issue is being opened so a PR can be submitted to work around it.