This forum has been archived. All content is frozen. Please use KDE Discuss instead.

User-agent

Tags: None
(comma "," separated)
imported4-Anonymous
Registered Member
Posts
329
Karma
0

User-agent

Wed Oct 12, 2005 8:37 pm
I made a patch to send the user-agent to picky trackers.


Index: libtorrent/httptracker.cpp
===================================================================
--- libtorrent/httptracker.cpp (revision 467610)
+++ libtorrent/httptracker.cpp (working copy)
@@ -27,6 +27,9 @@
#include "torrentcontrol.h"
#include "bdecoder.h"
#include "peermanager.h"
+#include <config.h>


namespace bt
@@ -161,8 +164,11 @@

void HTTPTracker::doRequest(const QString & host,const QString & path,Uint16 p)
{
- QHttpRequestHeader header( "GET",path);
- header.setValue( "Host",host );
+ QHttpRequestHeader header( "GET", path );
+ header.setValue( "Host", host );
+#ifdef HAVE_CONFIG_H
+ header.setValue( "User-Agent", "KTorrent-"VERSION );
+#endif

http->setHost(host,p);
cid = http->request(header);
George
Moderator
Posts
5421
Karma
1

Thu Oct 13, 2005 8:04 am
I allready made the same change last evening (well, except for the version number)

But thanks anyway !


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]