<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g2.doxu.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Painlord2k</id>
	<title>Gnutella2 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://g2.doxu.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Painlord2k"/>
	<link rel="alternate" type="text/html" href="https://g2.doxu.org/wiki/Special:Contributions/Painlord2k"/>
	<updated>2026-05-28T08:59:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://g2.doxu.org/index.php?title=Partial_File_Sharing_Protocol&amp;diff=1903</id>
		<title>Partial File Sharing Protocol</title>
		<link rel="alternate" type="text/html" href="https://g2.doxu.org/index.php?title=Partial_File_Sharing_Protocol&amp;diff=1903"/>
		<updated>2005-09-07T18:09:53Z</updated>

		<summary type="html">&lt;p&gt;Painlord2k: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Source - [http://www.the-gdf.org/wiki/index.php?title=Partial_File_Sharing_Protocol]&lt;br /&gt;
&lt;br /&gt;
Partial File Sharing Protocol Version (PFSP) 1.0&amp;lt;br&amp;gt;&lt;br /&gt;
Tor Klingberg &amp;amp;lt;tor.klingberg@gmx.net&amp;amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
August 2002&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Introduction'''&lt;br /&gt;
&lt;br /&gt;
This is a protocol for sharing partial files on the Gnutella network. A&lt;br /&gt;
partial file is a file that a host has only downloaded parts of. Partial &lt;br /&gt;
File Sharing allows files to spread faster over the Gnutella network.&lt;br /&gt;
Here, the server is the host that is providing the file, and client is the&lt;br /&gt;
host that requests the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Partial File Transfer ==&lt;br /&gt;
&lt;br /&gt;
The server allows HTTP requests for partial files, at URIs chosen by the&lt;br /&gt;
server. They can for example be assigned a file index and shared at&lt;br /&gt;
&amp;quot;/get/index/filename&amp;quot;, or simply at &amp;quot;/partials/filename&amp;quot;. If requests &lt;br /&gt;
by URN are supported, the best way is probably to share only at &lt;br /&gt;
&amp;quot;uri-res/N2R?urn:sha1:HASH_OF_COMPLETE_FILE&amp;quot;. Servers should make sure &lt;br /&gt;
that the URI to a partial file does not become invalid when the file is &lt;br /&gt;
completed.&lt;br /&gt;
&lt;br /&gt;
Only partial requests (with a ''Range'' header) are accepted.&lt;br /&gt;
&lt;br /&gt;
The X-Available-Ranges header is used by the server to inform the client&lt;br /&gt;
about what ranges are available. Note that a 2xx or 503 response without &lt;br /&gt;
an X-Available-Ranges header means the complete file is available. The&lt;br /&gt;
format is as follows:&lt;br /&gt;
&lt;br /&gt;
X-Available-Ranges: bytes 0-10,20-30&lt;br /&gt;
&lt;br /&gt;
The client requests the range it wants using the ''Range'' header.&lt;br /&gt;
&lt;br /&gt;
Range: bytes=0-&lt;br /&gt;
means the client wants any ranges the server can provide.&lt;br /&gt;
&lt;br /&gt;
The server then provides the range it wants to upload using a 206 Partial&lt;br /&gt;
Content response. This allows the server to upload different ranges to&lt;br /&gt;
different hosts, and save bandwidth by allowing them to get the other parts&lt;br /&gt;
from each other. The server can decide to upload any range inside the&lt;br /&gt;
requested range. This means that the client cannot be sure that the first&lt;br /&gt;
byte in the response is first requested byte.&lt;br /&gt;
&lt;br /&gt;
The 206 response contains a Content-Range header on the form&lt;br /&gt;
&lt;br /&gt;
Content-Range: bytes &amp;amp;lt;start&amp;amp;gt;-&amp;amp;lt;end&amp;amp;gt;/&amp;amp;lt;total_size&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;amp;lt;total_size&amp;amp;gt; is the size of the '''complete''' file.&lt;br /&gt;
&lt;br /&gt;
If the server is unable to provide any part of the requested range, it&lt;br /&gt;
returns a &amp;quot;503 Requested Range Not Available&amp;quot; (the Reason Phrase is just my&lt;br /&gt;
recommendation). If the client continues to request the same range, the&lt;br /&gt;
server may send a 404 to make a PFSP unaware client stop retrying.&lt;br /&gt;
The X-Available-Ranges header will tell a PFSP enabled client what ranges it&lt;br /&gt;
can request.&lt;br /&gt;
&lt;br /&gt;
If the client provides an &amp;quot;Accept:&amp;quot; header with &amp;quot;multipart/byteranges&amp;quot; in&lt;br /&gt;
it, the server may respond with multiple ranges at once. The client may send&lt;br /&gt;
multiple ranges in the Range: header if it sends an ''Accept'' header with&lt;br /&gt;
multipart/byteranges in the same header set. This is standard HTTP/1.1&lt;br /&gt;
stuff, but I doubt that Gnutella servents will support it. If you do not&lt;br /&gt;
want multipart support, just ignore it and everything will work fine.&lt;br /&gt;
&lt;br /&gt;
You should, however, be aware that there can be multiple ranges specified in&lt;br /&gt;
one &amp;quot;Range:&amp;quot; header. Servents are then allowed to choose any range within&lt;br /&gt;
the specified ranges, or simply read the first range only.&lt;br /&gt;
&lt;br /&gt;
== Tree Hashes ==&lt;br /&gt;
&lt;br /&gt;
Tree hashes are not absolutely required for Partial File Sharing, so you&lt;br /&gt;
don't have to implement this part at first. TigerTree can be implemented&lt;br /&gt;
if/when corrupt files become a problem. The reason that it is in this&lt;br /&gt;
document is because Partial File Sharing might cause corrupt files to spread&lt;br /&gt;
faster.&lt;br /&gt;
&lt;br /&gt;
TigerTree hashes are computed using a 1024 byte base size. It is then up to&lt;br /&gt;
each vendor to decide how many sub-hashes to actually store. Storing (and&lt;br /&gt;
advertising) the top 10 levels of the tree might be good decision. It would&lt;br /&gt;
allow a resolution of about 2 MB on a 1 GB file, and requires only about&lt;br /&gt;
25 kB of hash data per file.&lt;br /&gt;
&lt;br /&gt;
The tree is provided as specified in the '''T'''ree '''H'''ash '''EX'''change format ([http://www.open-content.net/specs/draft-jchapweske-thex-01.html THEX]).&lt;br /&gt;
It basically says that the hash tree is provided as a long stream of binary&lt;br /&gt;
data starting with the root hash, then the two hashes it is computed from,&lt;br /&gt;
and so on.&lt;br /&gt;
&lt;br /&gt;
To inform the client about where the hash tree can be retrieved the server&lt;br /&gt;
includes an X-Thex-URI header on this form&lt;br /&gt;
&lt;br /&gt;
X-Thex-URI: &amp;amp;lt;URI&amp;amp;gt; ; &amp;amp;lt;ROOT&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;URI&amp;gt; is any valid URI. It can be to an uri-res translator, and can even&lt;br /&gt;
point to another host. The client can then retrieve desired parts of the&lt;br /&gt;
hash tree by doing range requests for the specified URI.&lt;br /&gt;
&lt;br /&gt;
The THEX data is shared as if it was a partial file. If a client requests a&lt;br /&gt;
subrange of the THEX data that the server does not store, and is not willing&lt;br /&gt;
to calculate on the fly, the server uses the same routines as if it was a&lt;br /&gt;
partial file where the requested range is not available.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;ROOT&amp;amp;gt; is the root TigerTree hash in base32 (RFC 3548) encoding.&lt;br /&gt;
&lt;br /&gt;
== How to find the location of partial files ==&lt;br /&gt;
&lt;br /&gt;
This protocol does not affect Gnutella messages in any way. The only&lt;br /&gt;
available mean of spreading the location of a partial file is through the&lt;br /&gt;
download mesh in X-Gnutella-Alternate-Location headers. I think this should&lt;br /&gt;
work very well. Since those who share a partial file are also downloading&lt;br /&gt;
the same file, they will be able to send alt-loc headers to other hosts&lt;br /&gt;
sharing the full file.&lt;br /&gt;
&lt;br /&gt;
Spreading partial files in the download mesh will cause servents that do&lt;br /&gt;
not support partial file sharing to receive addresses to partial sources. I&lt;br /&gt;
don't think that is a problem. The worst thing that can happen is that they&lt;br /&gt;
won't be able to use those sources.&lt;br /&gt;
&lt;br /&gt;
When requesting a file for download, the client must include an alt-loc &lt;br /&gt;
header pointing to its locally shared partial file, if there is not a good &lt;br /&gt;
reason not to do so in the particular case. If the client is firewalled&lt;br /&gt;
(and push proxy URIs are not available) that is a reason. Clients should &lt;br /&gt;
do this even if the download has not started yet. Since it takes a while &lt;br /&gt;
for alt-locs to spread, the download is likely to have started when &lt;br /&gt;
someone else get the alt-loc. If not, a few failed download requests is &lt;br /&gt;
not a big problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sample negotiation ==&lt;br /&gt;
&lt;br /&gt;
Here is a sample negotiation. I don't think it will look exactly like this,&lt;br /&gt;
but it should show the headers in action. Clients might want to request a&lt;br /&gt;
small range first, to get the list of available ranges. There are some&lt;br /&gt;
linebreakes in long headers below.&lt;br /&gt;
&lt;br /&gt;
Client:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /uri-res/N2R?urn:sha1:QLFYWY2RI5WZCTEP6MJKR5CAFGP7FQ5X HTTP/1.1&lt;br /&gt;
User-Agent: FooBar/1.0&lt;br /&gt;
Host: 192.0.2.65:6346&lt;br /&gt;
Connection: Keep-Alive&lt;br /&gt;
Range: bytes=73826-&lt;br /&gt;
X-Gnutella-Content-URN: urn:sha1:QLFYWY2RI5WZCTEP6MJKR5CAFGP7FQ5X&lt;br /&gt;
X-Alt: 192.0.2.99:6348, 192.0.2.199, 192.0.2.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 206 Partial Content&lt;br /&gt;
Server: FooBar/1.0&lt;br /&gt;
Content-Type: audio/mpeg&lt;br /&gt;
Content-Range: bytes 73826-285749/533273&lt;br /&gt;
Content-Length: 211924&lt;br /&gt;
Connection: Keep-Alive&lt;br /&gt;
X-Available-Ranges: bytes 0-285749,425926-488271&lt;br /&gt;
X-Gnutella-Content-URN: urn:sha1:QLFYWY2RI5WZCTEP6MJKR5CAFGP7FQ5X&lt;br /&gt;
X-Thex-URI: &lt;br /&gt;
  /uri-res/N2X?urn:sha1:QLFYWY2RI5WZCTEP6MJKR5CAFGP7FQ5X;VEKXTRSJPTZJLY2IKG5FQ2TCXK26SECFPP4DX7I&lt;br /&gt;
X-Gnutella-Alternate-Location: &amp;amp;lt;list of alt-locs&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;211924 bytes of data&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;N2X&amp;quot; above is an example. Someone should comment on what should be used.&lt;br /&gt;
Since the URI is provided in the X-Thex-URI header, each vendor can chose&lt;br /&gt;
how to provide the THEX data.&lt;/div&gt;</summary>
		<author><name>Painlord2k</name></author>
	</entry>
	<entry>
		<id>https://g2.doxu.org/index.php?title=Client_for_Downloading&amp;diff=1662</id>
		<title>Client for Downloading</title>
		<link rel="alternate" type="text/html" href="https://g2.doxu.org/index.php?title=Client_for_Downloading&amp;diff=1662"/>
		<updated>2005-09-07T18:06:50Z</updated>

		<summary type="html">&lt;p&gt;Painlord2k: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is not a core part of the Gnutella2 architecture, and is discussed in depth elsewhere.&lt;br /&gt;
&lt;br /&gt;
Filetransfer is basically the same as in the original Gnutella protocol. See the documentation [http://www.the-gdf.org/wiki/index.php?title=File_Transfer_%28was:_Requesting_a_download%29 here]&lt;br /&gt;
&lt;br /&gt;
Source - [[http://www.the-gdf.org/wiki/index.php?title=File_Transfer_%28was:_Requesting_a_download%29]] version of 2005/08/22&lt;br /&gt;
Original Source - [[http://rfc-gnutella.sourceforge.net/src/rfc-0_6-draft.html Latest draft]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.8.1 Normal File Transfer'''&lt;br /&gt;
&lt;br /&gt;
Once a servent receives a QueryHit message, it may initiate the &lt;br /&gt;
direct download of one of the files described by the message's Result&lt;br /&gt;
Set. Files are downloaded out-of-network i.e. a direct connection &lt;br /&gt;
between the source and target servent is established in order to &lt;br /&gt;
perform the data transfer. File data is never transferred over the &lt;br /&gt;
Gnutella network.&lt;br /&gt;
&lt;br /&gt;
The file download protocol is HTTP. It is RECOMMENDED to use HTTP 1.1&lt;br /&gt;
(RFC 2616), but HTTP 1.0 (RFC 1945) can be used instead. The full &lt;br /&gt;
specifications are available in those RFCs. The following includes &lt;br /&gt;
only the basic things. The following examples assumes that HTTP 1.1 &lt;br /&gt;
is used. &lt;br /&gt;
&lt;br /&gt;
The servent initiating the download sends a request string on the &lt;br /&gt;
following form to the target server:&lt;br /&gt;
&lt;br /&gt;
    GET /get/&amp;lt;File Index&amp;gt;/&amp;lt;File Name&amp;gt; HTTP/1.1&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    User-Agent: Gnutella&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Host: 123.123.123.123:6346&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Connection: Keep-Alive&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Range: bytes=0-&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    &amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;File Index&amp;gt; and &amp;lt;File Name&amp;gt; are one of the File Index/File &lt;br /&gt;
Name pairs from a QueryHit message's Result Set. For example, if the &lt;br /&gt;
Result Set from a QueryHit message contained the entry&lt;br /&gt;
&lt;br /&gt;
    File Index: 2468&lt;br /&gt;
    File Size: 4356789&lt;br /&gt;
    File Name: Foobar.mp3&lt;br /&gt;
&lt;br /&gt;
then a download request for the file described by this entry would be&lt;br /&gt;
initiated as follows:&lt;br /&gt;
&lt;br /&gt;
    GET /get/2468/Foobar.mp3 HTTP/1.1&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    User-Agent: Gnutella&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Host: 123.123.123.123:6346&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Connection: Keep-Alive&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Range: bytes=0-&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    &amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Servents MUST encode the filename in GET requests according to the &lt;br /&gt;
standard URL/URI encoding rules. Servents MUST accept URL-encoded GET&lt;br /&gt;
requests. Since some old servents do not support encoding, servents&lt;br /&gt;
SHOULD accept non-encoded requests and MAY try a non-encoded requests&lt;br /&gt;
if a 404 Not Found error is returned for the initial request. &lt;br /&gt;
&lt;br /&gt;
The Host header is required by HTTP 1.1 and specifies what address &lt;br /&gt;
you have connected to. It is usually not used by the receiving &lt;br /&gt;
servent, but its presence is required by the protocol.&lt;br /&gt;
&lt;br /&gt;
The allowable values of the User-Agent string are defined by the HTTP&lt;br /&gt;
standard. Servent developers cannot make any assumptions about the &lt;br /&gt;
value here. The use of 'Gnutella' is for illustration purposes only. &lt;br /&gt;
&lt;br /&gt;
The server receiving this download request responds with HTTP 1.1 &lt;br /&gt;
compliant headers such as&lt;br /&gt;
&lt;br /&gt;
    HTTP/1.1 200 OK&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Server: Gnutella&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Content-type: application/binary&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Content-length: 4356789&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    &amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file data then follows and should be read up to, and including, &lt;br /&gt;
the number of bytes specified in the Content-length provided in the &lt;br /&gt;
server's HTTP response.&lt;br /&gt;
&lt;br /&gt;
Note: Servents SHOULD use HTTP version 1.1 for file transfer, but &lt;br /&gt;
some support only HTTP version 1.0. Servents MUST accept incoming &lt;br /&gt;
HTTP/1.0 requests, and SHOULD retry with HTTP/1.0 if the remote host&lt;br /&gt;
is not HTTP/1.1 compliant.&lt;br /&gt;
&lt;br /&gt;
Though it is strongly RECOMMENDED to have full HTTP/1.1 &lt;br /&gt;
support, some servents do not. The most important features for &lt;br /&gt;
Gnutella, range requests and Persistent Connections MUST be &lt;br /&gt;
supported. Some old servents, however, do not.&lt;br /&gt;
&lt;br /&gt;
Range requests are on the form&lt;br /&gt;
&lt;br /&gt;
    GET /get/2468/Foobar.mp3 HTTP/1.1&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    User-Agent: Gnutella&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Host: 123.123.123.123:6346&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Connection: Keep-Alive&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Range: bytes=4932766-5066083&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    &amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the Range header does not have to specify both start and &lt;br /&gt;
end positions. The response is on the form&lt;br /&gt;
&lt;br /&gt;
    HTTP/1.1 206 Partial Content&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Server: Gnutella&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Content-Type: audio/mpeg&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Content-Length: 133318&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    Content-Range: bytes 4932766-5066083/5332732&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    &amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Connection header tells the remote host if the connection should &lt;br /&gt;
be closed when the transfer is finished or not. &amp;quot;Connection: close&amp;quot; &lt;br /&gt;
means that the connection MUST be closed after the transfer. &lt;br /&gt;
&amp;quot;Connection: Keep-Alive&amp;quot; or no Connection header means the connection&lt;br /&gt;
MUST be kept open. The client MAY then issue another request for &lt;br /&gt;
another range or another file. The request MAY be sent before the &lt;br /&gt;
previous transfer is finished. Persistent Connections is described in&lt;br /&gt;
section 8.1 of RFC 2616. &lt;br /&gt;
&lt;br /&gt;
Headers unknown to the servent MUST be quietly ignored.&lt;br /&gt;
&lt;br /&gt;
Servents SHOULD NOT attempt to download multiple files from the same &lt;br /&gt;
source at once. Files SHOULD be locally queued instead.&lt;br /&gt;
&lt;br /&gt;
Servents are also RECOMMENDED to use and understand the HTTP extension&lt;br /&gt;
described in HUGE. (see Appendix 1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.8.2 Firewalled servents'''&lt;br /&gt;
&lt;br /&gt;
[TODO: rewrite this]&lt;br /&gt;
&lt;br /&gt;
It is not always possible to establish a direct connection to a &lt;br /&gt;
Gnutella servent in an attempt to initiate a file download. The &lt;br /&gt;
servent may, for example, be behind a firewall that does not permit&lt;br /&gt;
incoming connections to its Gnutella port. If a direct connection &lt;br /&gt;
cannot be established, the servent attempting the file download may &lt;br /&gt;
request that the servent sharing the file &amp;quot;push&amp;quot; the file instead. A &lt;br /&gt;
servent can request a file push by routing a Push request back to the&lt;br /&gt;
servent that sent the QueryHit message describing the target file.&lt;br /&gt;
The servent that is the target of the Push request (identified by the&lt;br /&gt;
Servent Identifier field of the Push message) SHOULD, upon receipt&lt;br /&gt;
of the Push message, attempt to establish a new TCP/IP connection &lt;br /&gt;
to the requesting servent (identified by the IP Address and Port &lt;br /&gt;
fields of the Push message). If this direct connection cannot be &lt;br /&gt;
established, then it is likely that the servent that issued the Push &lt;br /&gt;
request is itself behind a firewall. In this case, file transfer &lt;br /&gt;
cannot take place by the means of what is described in this document.&lt;br /&gt;
&lt;br /&gt;
'''2.8.2.1 Usage of Push Messages'''&lt;br /&gt;
&lt;br /&gt;
A servent may send a Push message if it receives a QueryHit &lt;br /&gt;
message from a servent that doesn't support incoming connections. &lt;br /&gt;
This might occur when the servent sending the QueryHit message is &lt;br /&gt;
behind a firewall (see the QueryHit EQHD in &lt;br /&gt;
2.4 Standard Message Arhitecture).  When a servent receives a Push&lt;br /&gt;
message, it SHOULD act upon the push request if and only if the&lt;br /&gt;
servent_Identifier field contains the value of its servent identifier.&lt;br /&gt;
The Message_Id field in the Message Header of the Push message SHOULD&lt;br /&gt;
not contain the same value as that of the associated QueryHit message,&lt;br /&gt;
but SHOULD contain a new value generated by the servent's Message_Id&lt;br /&gt;
generation algorithm.&lt;br /&gt;
&lt;br /&gt;
Push messages are forwarded back to the originator of the Query Hits &lt;br /&gt;
message using the Servent Identifier value.  This means multiple Push&lt;br /&gt;
messages can have the same Servent Identifier.  Push messages MUST &lt;br /&gt;
only be considered as duplicates if the Message ID in the header is &lt;br /&gt;
the same.  Since Push messages are not broadcasted, duplicate &lt;br /&gt;
messages should be very rare.&lt;br /&gt;
&lt;br /&gt;
'''2.8.2.2 - Pushing the file to the downloader'''&lt;br /&gt;
&lt;br /&gt;
If a direct connection can be established from the firewalled servent&lt;br /&gt;
to the servent that initiated the Push request, the firewalled &lt;br /&gt;
servent should immediately send the following:&lt;br /&gt;
&lt;br /&gt;
    GIV &amp;lt;File Index&amp;gt;:&amp;lt;Servent Identifier&amp;gt;/&amp;lt;File Name&amp;gt;&amp;lt;lf&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;File Index&amp;gt; and &amp;lt;Servent Identifier&amp;gt; are the values of the &lt;br /&gt;
File Index and Servent Identifier fields respectively from the Push &lt;br /&gt;
request received, and &amp;lt;File Name&amp;gt; is the name of the file in the &lt;br /&gt;
local file table whose file index number is &amp;lt;File Index&amp;gt;. The File &lt;br /&gt;
Name MAY be url/uri encoded. The servent that receives the GIV (the&lt;br /&gt;
servent that wants to receive a file) SHOULD ignore the File Index &lt;br /&gt;
and File Name, and request the file it wants to download. The &lt;br /&gt;
servent that sent the GIV MUST allow the client to request any &lt;br /&gt;
file, and not just the one specified in the Push message.  The GET &lt;br /&gt;
request and the remainder of the file download process is identical &lt;br /&gt;
to that described in the section 4.1 (Normal File Transfer) above.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;Servent Identifier&amp;gt; is formatted as hexadecimal, and must&lt;br /&gt;
be read case-insensitively.  For instance:&lt;br /&gt;
&lt;br /&gt;
    GIV 36:809BC12168A1852CFF5D7A785833F600/Foo.txt&amp;lt;lf&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
    GIV 124:d51dff817f895598ff0065537c09d503/Bar.html&amp;lt;lf&amp;gt;&amp;lt;lf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the TCP connection is lost during a Push initiated file transfer, &lt;br /&gt;
it is strongly RECOMMENDED that the servent who initiated the TCP &lt;br /&gt;
connection (the servent providing the file) attempt to re-connect. &lt;br /&gt;
That is important, since the servent receiving the file might not be&lt;br /&gt;
able to get another Push message to the servent providing the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.8.3 Busy Servents'''&lt;br /&gt;
&lt;br /&gt;
Servents whose upload bandwidth is already saturated with transfers &lt;br /&gt;
MAY reject a download request by returning the 503 response code. &lt;br /&gt;
Servents MAY simply have a fixed number of available upload slots, &lt;br /&gt;
but SHOULD use a system that utilizes upload bandwidth better. &lt;br /&gt;
Allowing new downloads as long as 20% of total upload bandwidth is &lt;br /&gt;
unused is one possibility.&lt;br /&gt;
&lt;br /&gt;
Busy servents receiving a Push message SHOULD connect to the host &lt;br /&gt;
requesting a push, and return the 503 Busy code when the remote host &lt;br /&gt;
has requested the file. &lt;br /&gt;
&lt;br /&gt;
Servents MAY try requesting a download again when the servent &lt;br /&gt;
providing the file returns the busy code, but MUST not do so more &lt;br /&gt;
often than once per minute and file source. That means a Servent &lt;br /&gt;
MUST NOT open new connections to a remote host more than once per &lt;br /&gt;
minute. Servents SHOULD prevent other servents breaking the above &lt;br /&gt;
rule from increasing their chanses to downlaoad a file. This can for &lt;br /&gt;
example be archived by refusing any connection attempts from a &lt;br /&gt;
particular host if a download request has been denies less than 50 &lt;br /&gt;
seconds ago, or by adding hosts that request too often to a ban list.&lt;br /&gt;
&lt;br /&gt;
Servents MAY use queuing systems to allow downloaders to stand in &lt;br /&gt;
queue to download a file, see 4.5 Active Queuing Extension.&lt;br /&gt;
&lt;br /&gt;
If a transfer is interrupted, the serving servent SHOULD keep the &lt;br /&gt;
allocated slot/bandwidth reserved for at least one minute. The &lt;br /&gt;
downloader would then be allowed to reconnect and resume the &lt;br /&gt;
transfer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.8.4 Sharing'''&lt;br /&gt;
&lt;br /&gt;
Servents that are able to download files MUST also be able to share &lt;br /&gt;
files with others. Servents SHOULD encourage users to share files.&lt;br /&gt;
&lt;br /&gt;
Servents SHOULD attempt to prevent programs that are not able to &lt;br /&gt;
share files from downloading files. This means that servent SHOULD &lt;br /&gt;
not allow uploads to web browsers and download accelerators. The &lt;br /&gt;
User-Agent http header tells what program the remote host is running.&lt;br /&gt;
Many servents return a html page instead, telling the user how &lt;br /&gt;
Gnutella works, and where to get a servent.&lt;br /&gt;
&lt;br /&gt;
Servents MUST NOT give precedence to other users using the same &lt;br /&gt;
servent. They MUST answer Query messages and accept file download&lt;br /&gt;
requests using the same rules for all servents. Servents MAY,&lt;br /&gt;
however, attempt to block servents that do not follow the rules in &lt;br /&gt;
this protocol in way that seriously hurts others experience of the&lt;br /&gt;
Gnutella network.&lt;br /&gt;
&lt;br /&gt;
Servents SHOULD, by default, share the directory where downloaded &lt;br /&gt;
files are placed. Servents SHOULD also share new downloaded files &lt;br /&gt;
without waiting for the servent to be restarted. Servents SHOULD &lt;br /&gt;
avoid changing the index numbers of shared files.&lt;br /&gt;
&lt;br /&gt;
Servents MUST NOT share partially downloaded (incomplete) files as if&lt;br /&gt;
they were complete. This is often prevented by using a separate &lt;br /&gt;
directory for incomplete downloads. When the download finishes, the &lt;br /&gt;
file is moved to the downloads directory (that SHOULD be shared). &lt;br /&gt;
Partial files MAY be shared but it SHOULD be in a way that makes&lt;br /&gt;
it clear to other servents that the file is incomplete.&lt;br /&gt;
&lt;br /&gt;
The transfer of partial files is described in the&lt;br /&gt;
[[Partial File Sharing Protocol]] (PFSP).&lt;/div&gt;</summary>
		<author><name>Painlord2k</name></author>
	</entry>
</feed>