[p2p-hackers] Tighter HTTP and P2P integration??

Charles Iliya Krempeaux supercanadian at gmail.com
Thu Feb 16 06:39:31 UTC 2006


Hello,

On 2/15/06, Charles Iliya Krempeaux <supercanadian at gmail.com> wrote:

[...]

> So right now my thinking is something like the following example.
> (Please argue if you disagree.)
>
> Client:
>
>     GET /some/file HTTP/1.1
>     Host: example.com
>     X-If-No-Alternate: ## PUT STUFF HERE ABOUT WHAT I CAN ACCEPT ##
>
>
> Server:
>
>     HTTP/1.1 204 No Content
>     Link: <http://example.com/go/get/it/there>; rel="alternate"
>     Link: <http://example.net/it.torrent#movie.mpeg>; rel="alternate";
>     Link: <http://192.0.2.44:6346/get/INDEX/NAME>; rel="alternate", class="gnutella"

I suppose if the "Link" header is being used to return information,
this could be generalized to make this "conditional get" be a way to
probe for "Link" data.

So, instead of using "X-If-No-Alternate" it could be "X-If-No-Link"
(and then specify what relation or other meta data you want).

For example, I could get a blogs RSS feed with:

    X-If-No-Link: rel="alternate"; type="application/rss+xml"

Although the exact notation may need to be different since using the
"=" sign may not be enough.  (For example, "rel" is a space separated
list.  And "type" is a content type, not a MIME type... and we're
really trying to match a MIME type.)  Maybe using CSS selector style
notation.  And in that case, the above example would be:

    X-If-No-Link: [rel~="alternate"][type="application/rss+xml"]

(The "~=" operator is like "element of".)

But anways, back to the original example, it might then be:

Client:

    GET /some/file HTTP/1.1
    Host: example.com
    X-If-No-Link: [rel~="alternate"][href^="http:"][class~="gnutella"]
    X-If-No-Link: [rel~="alternate"][type="application/x-bittorrent"]


Server:

    HTTP/1.1 204 No Content
    Link: <http://192.0.2.44:6346/get/INDEX/movie.mpeg>;
rel="alternate"; class="gnutella"
    Link: <http://192.0.7.28:6342/get/INDEX/movie.mpeg>;
rel="alternate"; class="gnutella"
    Link: <http://example.net/it.torrent#movie.mpeg>; rel="alternate";


Which says, don't give me any content if I can get this over gnutella
or bittorrent.  (And give me links to those.)

(The syntax for "X-If-No-Link" probably needs to be improved though,
to make it more inline with the syntax of other HTTP headers.)


Comments?  Suggestions?


[...]


See ya

--
    Charles Iliya Krempeaux, B.Sc.

    charles @ reptile.ca
    supercanadian @ gmail.com

    developer weblog: http://ChangeLog.ca/
___________________________________________________________________________
 Make Television                                http://maketelevision.com/



More information about the P2p-hackers mailing list