I am making a automatic php script witch seed a file with Get Right torrent specifications. But i have a problem while downloading the file from utorrent. I dont know where is the problem, maybe in the HTTP headers.
I am using this PHP script for the upload : http://www.asp-php.net/ressources/bouts … spx?id=700
I paste you two wireshark captures, the first is the direct transfert (linking directly to the file) and the other using the php script.
/========== Direct transfert ==========/
GET /seed/Paintball.avi HTTP/1.1
Host: mywebsite.net
User-Agent: BTWebClient/1830
Connection: keep-alive
Range: bytes=19922944-20971519
GET /seed/Paintball.avi HTTP/1.1
Host: mywebsite.net
User-Agent: BTWebClient/1830
Connection: keep-alive
Range: bytes=18874368-19922943
HTTP/1.1 206 Partial Content
Date: Sat, 08 Aug 2009 10:06:23 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch15
Last-Modified: Sat, 08 Aug 2009 09:59:20 GMT
ETag: "1fc8ceff-19af598-4709e68120e00"
Accept-Ranges: bytes
Content-Length: 1048576
Content-Range: bytes 19922944-20971519/26932632
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: video/x-msvideo
[ DATAS ]
/========== Transfert using PHP ==========/
GET /seed/07aa3ba7d90c0038c782f1532dca98cb/f56ac0f172794ad16d8574f5913d3714/Paintball.avi HTTP/1.1
Host: mywebsite.net
User-Agent: BTWebClient/1830
Connection: keep-alive
Range: bytes=22020096-23068671
GET /seed/07aa3ba7d90c0038c782f1532dca98cb/f56ac0f172794ad16d8574f5913d3714/Paintball.avi HTTP/1.1
Host: mywebsite.net
User-Agent: BTWebClient/1830
Connection: keep-alive
Range: bytes=5242880-6291455
HTTP/1.1 206 Partial Content
Date: Sat, 08 Aug 2009 09:45:48 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch15
X-Powered-By: PHP/5.2.0-8+etch15
Pragma: public
Expires: 0
Cache-Control: public
Content-Description: File Transfer
Content-Disposition: attachment; filename="Paintball.avi";
Content-Transfer-Encoding: binary
Content-Range: 22020096-23068671/26932632
Content-Length: 1048576
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: video/x-msvideo
[ DATAS ]
I would like to have more informations about debugging to make my script but i dont have many informations in the "Logger" tab in utorrent, just have this :
"Banned 11.11.11.11:8" (11.11.11.11 is my server's ip).
If someone can help me to understand what happened ?
PS : the script looks to be good (it work on download accelerators using HTTP RANGE).
Thanks you for your attention.
[SOLUTION, EDIT]
According to the Webseed BEP (http://www.bittorrent.org/beps/bep_0019.html) torrent client BAN if the piece of the file dont correspond to the hash in the .torrent but also if there are errors on HTTP headers (like for me).
So, the "Content-Range" Header response is ambiguous, we can have "Content-Range: 0-17/18" witch work with several softwares but the correct syntax is "Content-Range: bytes 0-17/18"
No comments:
Post a Comment