Fix a few problems with artifacts resource.

* Streaming was broken, generating badfun on a chunk.
* Content-type needs to be a string in the callback.