Closed mmckegg closed 6 years ago
Actually, my new theory is that it is the content-length header causing the problems. I'm guessing that with secret blobs, the hash size will not be matching the content-length. We will probably have to disable this header when secret blobs are being used.
Yes it is the content-type. Found a typo in multiblob-http that is causing this to be appended when it shouldn't. See https://github.com/dominictarr/multiblob-http/pull/3
@dominictarr can you take a look and merge?
fixed, sorry for leaving the bug in!
btw, it is possible for the client to request a content type, and to set a file name (needed for download from browser) https://github.com/dominictarr/multiblob-http#caching--headers
I am in the process of updating patchwork to use ssb-ws for blobs (instead of the old server ripped out of Patchwork v2 that it has been running for a while) so that I can get secret blobs working.
However, I'm noticing that some images are not loading inline (however do load in a browser when navigated to directly). Upon further inspection, it seems that the headers provided by ssb-ws do not include acontent-type
and for some reason this sometimes causes the images to not always load load.It might even be a mac specific thing? It seems that SVGs don't load and neither do the secret blobs, but most others do.Anyway, this is easily fixed by supplying acontent-type
header. The old patchwork did this using pull-identify-filetype.I suggest we try doing the same here! Will give this a go and send a PR if it works.cc @dominictarr