Last modified: 2014-02-12 15:14:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60651, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58651 - Don't use fake user agent
Don't use fake user agent
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GWToolset (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-18 17:47 UTC by Sam Reed (reedy)
Modified: 2014-02-12 15:14 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2013-12-18 17:47:19 UTC
GWToolset should really use a proper user-agent, not some copy paste that is very much not what is doing the request.

I'm not sure there's much need for it to be configurable either, but that's another story

public static $http_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1';

For example, ForeignAPIRequest uses:

	public static function getUserAgent() {
		return Http::userAgent() . " ForeignAPIRepo/" . self::VERSION;
	}

And for Squid purging:

$request[] = "User-Agent: " . Http::userAgent() . ' ' . __CLASS__;

Try something like: Http::userAgent() . " GWToolset/0.0.1-dev";

Though you might want to add a constant for the GWToolset version and re-use this here and in the loader file
Comment 1 Gerrit Notification Bot 2013-12-24 16:47:12 UTC
Change 103561 had a related patch set uploaded by Dan-nl:
adding a more appropriate user-agent

https://gerrit.wikimedia.org/r/103561
Comment 2 Gerrit Notification Bot 2013-12-27 20:08:45 UTC
Change 103561 merged by jenkins-bot:
adding a more appropriate user-agent

https://gerrit.wikimedia.org/r/103561
Comment 3 dan 2014-01-08 20:40:47 UTC
sam,

the patch has been merged into the master branch and deployed to Commons.

please close this ticket if you’re satisfied with the results. if not, please
indicate what else needs to be addressed.
Comment 4 Andre Klapper 2014-02-12 15:14:44 UTC
No feedback - Closing as per comment 3.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links