Re: File downloading

[email protected] Wed, 12 Aug 2009 18:33:05 +0000 (UTC)
Newsgroups gmane.network.gnutella.devel
Organization Home, Grenoble, France
Message-ID <[email protected]>
Quoting rik_saunderson <[email protected]> from ml.gnutella.dev-forum:
:I am trying to understand modern implementations of the gnutella protocol, and
:I'm having problems understanding newer methods of file downloading.

You got it correctly.  The hardest part is getting the HTTP/1.1 protocol
correctly.  Don't forget that HTTP/1.1 implies support for persistent
connections and chunked transfer encoding.  Don't forget to output the
proper Content-Length headers on your 200 replies and Content-Range on
your 206 replies.

You need to be HTTP/1.1 compliant plus handle all the Gnutella-specific
headers with their proper semantics (e.g. X-Alt, X-NAlt, X-Hostname, etc...).

:Observing file transfer in Wireshark, I sometimes don't see any of the above.  I do see:
:GET /client_startup, which is presumably a message sent by the client on startup.
:GET /p.xml where p.xml is an xml file 

No idea what the above is.  It does not look like a Gnutella transfer to me.

:My question is, have I interpreted the last two correctly, and are there other
:ways of downloading files that I haven't been able to find?

There is only ONE way to download files: through HTTP/1.1.  After that, you
have several URN structures to handle to map the requested resource.  Note that
a magnet: is a URI, and therefore cannot be used to download directly.  It
needs interpretation to find the proper URLs to request.

I'm sure you realize this is going to be a huge implementation effort to
get something robust.  There's a lot of plumber work to do before you can
even start getting something useful done.

Raphael