Ecash and HTTP

One of the tricks with paying for http requests is that you screw up the protocol. Normal http requests are a simple request/response pair, and that’s it — you ask for a page, and you get given it. Worse, the protocol is optimised for that: if you want to do more than just send a request, you usually have to open additional connections for each, which has a significant overhead.

The easiest way to work around this, is probably to make the protocol for requesting a webpage be to send a HEAD request, which will confirm the webpage exists and that you don’t have a current cached copy and can also tell you how much it costs to download, and then send a GET request with the appropriate ecoin as a header. With HTTP/1.1 you can, I believe, make persistant connections to make this possible. I think this is also optimally efficient, and involves minimal changes to the protocol. (There’s even a “Payment required” error code, how convenient)

Leave a Reply