From: Nate <we...@pr...> - 2001-04-03 18:09:24
|
Hi, Here's a patch I did to make the GET request proper. And some info on servant IDs, and I will try to get to patching the "Server:" soon. I am a little short on time right now. Watch out for line wrapping from the mailer! The file is downloads.c @@ -624,8 +626,12 @@ /* Send the HTTP Request */ - if (d->skip) g_snprintf(dl_tmp, sizeof(dl_tmp), "GET /get/%i/%s HTTP/1.0\r\nConnection: Keep-Alive\r\nRange: bytes=%u-\r\n\r\n", d->record_index, d->file_name, d->skip); - else g_snprintf(dl_tmp, sizeof(dl_tmp), "GET /get/%i/%s HTTP/1.0\r\nConnection: Keep-Alive\r\n\r\n", d->record_index, d->file_name); + if (d->skip) g_snprintf(dl_tmp, sizeof(dl_tmp), + "GET /get/%i/%s HTTP/1.0\r\nConnection: Keep-Alive\r\nRange: bytes=%u-\r\nUser-Agent: Gtk-Gnutella %d.%d\r\n\r\n", + d->record_index, d->file_name, d->skip, GTA_VERSION, GTA_SUBVERSION); + else g_snprintf(dl_tmp, sizeof(dl_tmp), + "GET /get/%i/%s HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Gtk-Gnutella %d.%d\r\n\r\n", + d->record_index, d->file_name, GTA_VERSION, GTA_SUBVERSION); if (write(d->socket->file_desc, dl_tmp, strlen(dl_tmp)) < 0) { -end patch- The following was posted to the "gdf" list: For QueryHit packets: const UInt32 kGnutType = 'GNUT'; const UInt32 kGtkGnutellaType = 'GTKG'; const UInt32 kNapShareType = 'NAPS'; Expect this in responses and GET requests (examples): Server: Gnut 01.20 User-Agent: Gtk-Gnutella 0.13 User-Agent: NapShare 0.20 Server: NapShare 0.20 All these clients have the ability to share files, are recently updated, and the developers can be contacted about compatibility problems. NapShare is based on the Gnut and Gtk-Gnutella source code for compatibility. I ask this so that these clients are not "blocked" from access like browsers and older Gnutella clients. -------- You may want to check out this mail list, the BearShare and Limewire programmers are there. It has a archive. http://groups.yahoo.com/group/the_gdf |