|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
General Gnutella Development Discussion For general discussion about Gnutella development. |
| LinkBack | Thread Tools | Display Modes |
| |||
bad request Hello, I'm still getting Bad Request of my Get querry and I have no idear what's wrong. My Get querry looks like this: GET /get/584/Sex%20Pistols%20-%20Pretty%20Vacant.mp3 HTTP/1.1 User-Agent: Gnutella/0.6 Host:12.34.5.67:7474 Connection: Keep-Alive Range: bytes=0- Most of the time it works fine, but somtimes I get 400 Bad Request, so there is mayby somthing wrong. And how are the exactly rules for URLEncoding i'm still not sure what to make with space '+' or '%20' ? Thank You thp |
| ||||
Do the failures still occur when you escape spaces with "+"? Which programming language do you use?
__________________ -> put this banner into your own signature! <- -- Erst im Spiel lebt der Mensch. Nur ludantaj homoj vivas. GnuFU.net - Gnutella For Users Draketo.de - Shortstories, Poems, Music and strange Ideas. |
| |||
Hello, The failures still occurs when i escape spaces with "+" or with "%20" it seems it makes no differences. I use java as programming language. at first i tried the java URLEncoder(String, String), but i'm not sure if this is the right thing so i made my own but i don't know the exact rules for Gnutella encoding is there a list somwhere? The java encoder escapes spaces with "+". Thank you very much thp |
| ||||
The Gnutella specification is at GDF - LimeWire Downloading is described at File Transfer - LimeWire (but it might be outdated, see below) which points to RFC 2616 (HTTP 1.1) http://www.ietf.org/rfc/rfc2616.txt But since changing the escaping doesn't change the result, it doesn't look like that's the reason. Maybe a look into the Phex source can help you: https://phex.svn.sourceforge.net/svn...eDownload.java ... damn, I see it: You don't request by sha1 URN. IIRC, the URI in the get request should be like Code: /uri-res/N2R?urn:sha1:GIVPHMUG6LZQPTKJ6ELMQDXBN7BZS354 Arne
__________________ -> put this banner into your own signature! <- -- Erst im Spiel lebt der Mensch. Nur ludantaj homoj vivas. GnuFU.net - Gnutella For Users Draketo.de - Shortstories, Poems, Music and strange Ideas. |
| |||
Hello arne_bab, This seems right, but i don't know how to ad or replace this in my get request can you please show me a complet example. I made a few experiments but did not find the solution. Thank you very much thp |
| ||||
GET /uri-res/N2R?urn:sha1:GIVPHMUG6LZQPTKJ6ELMQDXBN7BZS354 HTTP/1.1 User-Agent: Your Client! Host:12.34.5.67:7474 Connection: Keep-Alive Range: bytes=0- For this you have to have the sha1 hash of the file in Base32, UPPERCASE, but it comes in every query reply, so you should already have received it before you request anything.
__________________ -> put this banner into your own signature! <- -- Erst im Spiel lebt der Mensch. Nur ludantaj homoj vivas. GnuFU.net - Gnutella For Users Draketo.de - Shortstories, Poems, Music and strange Ideas. |
| ||||
I'm glad to hear that! Since Phex still has code to handle the /get/ style requests (as it seems others have, too), I think it wasn't completely replaced, but it is completely obsolete, as requesting by sha1 is the only way to be sure that you get the right file. Since you likely will want to implement the DownloadMesh and Partial Filesharing, you'll need to use that anyway What you definitely need is a correct Vendor String. Without that you'll get disconnected quickly. Good luck with your client! (btw: can I find it somewhere? and is it free software?)
__________________ -> put this banner into your own signature! <- -- Erst im Spiel lebt der Mensch. Nur ludantaj homoj vivas. GnuFU.net - Gnutella For Users Draketo.de - Shortstories, Poems, Music and strange Ideas. |
| |
LinkBacks (?)
LinkBack to this Thread: https://www.gnutellaforums.com/general-gnutella-development-discussion/93586-bad-request.html | ||||
Posted By | For | Type | Date | |
SocialBookmark ~Aoi-Sora~: ??: sharing | This thread | Refback | June 8th, 2011 06:08 PM |