| Issue 342: | Change the user agent of URL Fetch API | |
| 72 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
I can't change the default user agent of 'URL Fetch API '
result = urlfetch.fetch(u,headers = {'User-Agent': "Mozilla/5.0
..."},allow_truncated=True )
But the User Agent is :
AppEngine-Google; (+http://code.google.com/appengine)
Thanks,
Marc.
|
||||||||||||
,
May 14, 2008
Why do you want your application to lie about the user agent? |
|||||||||||||
,
May 15, 2008
It's not for lie, but for identify the application (here Mozilla is a bad exemple). It probably would be a good idea for Google to include the name of the application in the user agent request header. For exemple, like this: AppEngine-Google; (+http://application-name.appspot.com) |
|||||||||||||
,
May 20, 2008
Some websites check the user agent and return different results or no results depending on the user agent. To support these websites, applications should be allowed to override the user agent. However, to prevent harvest-bots, "AppEngine- Google; (+http://application-name.appspot.com)" should be appended to the end of the user agent. |
|||||||||||||
,
May 27, 2008
Google websites "check the user agent and return different results or no results depending on the user agent". I am reading from the "Web Pages" optional service in Google Apps. From the dev server it correctly returns me a normal web page. When I uploaded the application I discovered that the retrieval returned a much simpler HTML document with a DTD of "//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd". I am stumped. I cannot continue with this design unless I can retrieve the HTML created from Google Web Pages. |
|||||||||||||
,
Jun 29, 2008
This is also a problem for applications that want to mash up results from sites that cloak their XML based on the User-Agent. Many sites will transparently apply an XSL to the XML if the User-Agent is not in a list of supported (i.e. modern) browsers; this makes it impossible to use App Engine to retrieve these pages. I agree that adding an AppEngine suffix would be appropriate. Also, this behavior is different on the Dev Server, which is confusing and misleading for developers; the behavior should be harmonized. |
|||||||||||||
,
Jun 30, 2008
I agree. This problem makes my application almost impossible to implement because the website I am fetching automatically applies the XSL if it doesn't detect a modern browser. This makes what should be an easy task of parsing an XML file needlessly difficult. I am seriously considering other hosting options because of this. |
|||||||||||||
,
Aug 17, 2008
Currently, Google App Engine doesn't allow various headers to be set: ACCEPT_ENCODING, Outbound request headers: CONTENT_LENGTH, DATE, HOST, REFERER, USER_AGENT, VARY, VIA, X_FORWARDED_FOR Response headers: CONTENT_ENCODING, CONTENT_LENGTH, DATE, SERVER, TRANSFER_ENCODING Allowing an application to modify the user agent is a feature request
Labels: -Type-Defect Type-Feature
|
|||||||||||||
,
Sep 25, 2008
(No comment was entered for this change.)
Status: Acknowledged
|
|||||||||||||
,
Oct 06, 2008
(No comment was entered for this change.)
Labels: Component-Urlfetch
|
|||||||||||||
,
Nov 17, 2008
Is allowing an application to modify the "user agent" a feature request? I would find this tremendously valuable -- What might be the timing on this? |
|||||||||||||
,
Dec 31, 2008
Agree we need this. I would ask what security concern there is in spoofing user-agent....all modern browsers allow this capability. I need this feature because i want to get the apple-touch-icon link element from a website when it's available....most sites will only include this html element when the user-agent is MobileSafari (e.g. google.com and apple.com) |
|||||||||||||
,
Apr 23, 2009
We've implemented this and it's now live. :) http://googleappengine.blogspot.com/2009/04/sdk-version-121-released.html Setting a User-Agent of 'Foo Bar' will result in urlfetch sending the following User- Agent: Foo Bar AppEngine-Google; (+http://code.google.com/appengine) |
|||||||||||||
,
Apr 28, 2009
(No comment was entered for this change.)
Status: Fixed
|
|||||||||||||
|
|
|||||||||||||