circle-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[circle] Evil plan


From: Paul Harrison
Subject: [circle] Evil plan
Date: Thu, 29 May 2003 04:28:38 +1000 (EST)

Hi all,

I've been thinking about Thomas's http interface, and have come up with an
evil plan. What i want is to be able to use circle instead of http utterly
transparently. So i'm thinking, make circled into a simple proxy server
that just passes through requests it can't handle, but downloads files off
circle if possible. There are a few different adbuster proxies in the
vaults of parnassus we could use as prototypes.

The question is how does circle work out what file to download? We could
use circle-file: urls (not sure if these would be passed through to the
proxy from the browser), or urls munged as i proposed in an earlier post
(but this is ugly). However, there is a better way :-). Http has a header
called Content-MD5. This isn't normally enabled, and apache's
implementation of it is broken (recomputes the md5 every time). However
the protocol already exists, which is nice.

If we can get the web server to emit content-md5 headers, circled can ask
for the headers, extract the md5 and begin downloading (falling back to
normal http if the file isn't on the circle network).

Ok, here's the trick: it's possible to make apache emit custom header
lines by sticking a few lines in the .htaccess for the directory,
so we do something like this (see also attached script):

<Files Circle-0.35.pyw>
  Header add Content-MD5: tWbhlYdKCNgO6NZeQndj+g==
</Files>

Simple!

Paul

IM: pfh on thecircle.org.au
Email: address@hidden
There is no conspiracy.

Attachment: make_htaccess.py
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]