Ryan Kaldari rkaldari@wikimedia.org wrote:
No, he's using IE8 and it does send his User Agent header: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C)
Are there any other reasons why someone would be rejected from the API? Getting imageinfo doesn't require a token, so I'm at a loss as to what is going on. [...]
It seems to be related to the User-Agent header:
| [tim@passepartout ~]$ wget --user-agent="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C)" 'http://en.wikipedia.org/w/api.php?action=query&format=xml&titles=Fil...' | --2011-07-03 19:28:45-- http://en.wikipedia.org/w/api.php?action=query&format=xml&titles=Fil... | Resolving en.wikipedia.org... 91.198.174.232 | Connecting to en.wikipedia.org|91.198.174.232|:80... connected. | HTTP request sent, awaiting response... 403 Forbidden | 2011-07-03 19:28:45 ERROR 403: Forbidden.
| [tim@passepartout ~]$ wget --user-agent="abc" 'http://en.wikipedia.org/w/api.php?action=query&format=xml&titles=Fil... 19:28:47-- http://en.wikipedia.org/w/api.php?action=query&format=xml&titles=Fil... | Resolving en.wikipedia.org... 91.198.174.232 | Connecting to en.wikipedia.org|91.198.174.232|:80... connected. | HTTP request sent, awaiting response... 200 OK | Length: 295 [text/xml] | Saving to: `api.php?action=query&format=xml&titles=File:Trophy.png&prop=imageinfo'
| 100%[===================================================================================================================>] 295 --.-K/s in 0.001s
| 2011-07-03 19:28:48 (386 KB/s) - `api.php?action=query&format=xml&titles=File:Trophy.png&prop=imageinfo' saved [295/295]
| [tim@passepartout ~]$
Tim