https://bugzilla.wikimedia.org/show_bug.cgi?id=28884

--- Comment #2 from Ben Rimmington <[email protected]> 2011-05-08 18:12:06 
UTC ---
(In reply to comment #1)
> Web developers making Ajax requests (XHttpRequest) can't and don't have to
> touch the User-Agent. The browser environment in which you are in already has
> this set. If this is not the case, I'd say contact your browser vendor, not a
> bug.

>From the User-Agent policy [1]: "Do not copy a browser's user agent for your
bot, as bot-like behavior with a browser's user agent will be assumed
malicious."

The browser environment is UIWebView [6], which has Safari's default user agent
string -- it doesn't contain the required contact information, and it can't be
modified using UIWebView's public API.

> The User-Agent header must be sent, this policy is unlikely to change.
> If you prefer to send some kind of identification in environments where a
> User-Agent has already been set (eg. in a browser), you may use X-prefixed
> fields I guess.
> 
> ie.
> 
> X-Source: MyAwesome Gadget; Version/1.0; Contact/[email protected];

Sending an "X-Source" header field (or any other custom field) won't help, if
the Wikimedia servers automatically reject (403 Forbidden) the API request,
after looking at just the "User-Agent" header field.

The standard "From" header field [7] might be another option for identifying
the bot, because it isn't in the XMLHttpRequest::setRequestHeader() method's
exclusion list [3]. But this also requires a change to the User-Agent policy.

[1] <http://meta.wikimedia.org/wiki/User-Agent_policy>

[3] <http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader-method>

[6]
<http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/>

[7] <http://tools.ietf.org/html/rfc2616#section-14.22>

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to