Comment 2 for bug 113993

Revision history for this message
James Henstridge (jamesh) wrote : Re: Librarian files uploaded with addFile() can not be read from the librarian til the transaction is committed

From talking with Andrew on IRC, it looks like it'd be easier to add a second backend port served by another twisted.web class, rather than trying to rejig the upload protocol to handle a download verb too.

This second one could handle requests as simple as:

    C: GET /$content_id HTTP/1.1
    C:
    S: 200 Ok HTTP/1.1
    S: Content-Type: application/octet-stream
    S: Content-Length: xxx
    S:
    S: ...

It can then look up the content ID directly in its store and serve it. As no alias ID is involved, the server can not know what the mime type is, so I've used "application/octet-stream" above.