Juliusz Chroboczek wrote:
>> I'd like to implement Transparent Content Negotiation as described in
>> RFC 2295. Is this a good idea?
> 
> I personally don't think so.  It's a lot of work (both the in-memory
> and on-disk caches are indexed by URL, so you'll need to do quite a
> bit of work on the data structures), and most negotiated resources are
> dynamic pages, so they won't be reused anyway.

I am hoping I could do it like this: If a resource negotiates, I would 
store a list of all its variants at its URL in the cache. For normal 
HTTP 1.1 negotiation, I would store each variant at an URL constructed 
by concatenating the original URL with a normalized version of the 
relevant Accept headers. For transparent content negotiation, every 
variant already has its own URL given by the Content-location header. 
So, for every request for a resource with content negotiation two 
objects would be involved.

I think I would have to do the following:
- Implement parsers for all relevant headers.
- Add datastructures to _Object and _HTTPRequest which store the 
information from these headers.
- When handling a request for a negotiating resource already in the 
cache, load the object of the variant and then decide how to continue.
- When handling server responses which contain a Vary header (or even a 
TCN header), the object for the index should be created or updated and 
the data should go into the object for the variant.

Although it is a lot of work, it doesn't sound overly complicated. I 
guess there are lot of things I am underestimating now?

> For your particular application -- you only need to write out the
> other
> instances, not to read them back into Polipo.  Why don't you just
> write out all downloaded instances a second time, straight into your
> git
> repository? 

I whish them to be served by polipo such that I can access former 
versions of resources with my webbrowser or any of my other applications 
that use http. That is, I want to stop polipo, check out an old version, 
start polipo in offline mode, and access the resources through polipo. 
Therefore, I need to read the instances back into Polipo.

Greetings
Urs


------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Polipo-users mailing list
Polipo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/polipo-users

Reply via email to