Titanium

[TIMOB-596] allow user agent to be overriden in XHR setRequestHeader

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:53:38.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.1.0
ComponentsiOS
Labelsios, iphone, xhr
ReporterJeff Haynie
AssigneeJeff Haynie
Created2011-04-15T02:32:43.000+0000
Updated2011-04-17T01:53:38.000+0000

Description

allow the request header "User-Agent" to be custom in XHR setRequestHeader since some webservices need specific customization.

Comments

  1. Jeff Haynie 2011-04-15

    (from [52bd16ae00ee86a3de10ccb5444529e14a6489fb]) fix user-agent override issue in XHR. [#596 state:resolved] http://github.com/appcelerator/titanium_mobile/commit/52bd16ae00ee86a3de10ccb5444529e14a6489fb"> http://github.com/appcelerator/titanium_mobile/commit/52bd16ae00ee8...

  2. Sherwin Terunez 2011-04-15

    XHR setRequestHeader in titanium mobile is not yet overridable.

    c.setRequestHeader("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)");
    c.open('GET', url);
    c.send();

    125.xx.xx.12 http://www.xxx.com">www.xxx.com - [14/May/2010:12:12:48 +0400] "GET / HTTP/1.1" 200 18653 "-" "Appcelerator Titanium/1.2.0 (iPhone Simulator/3.1; iPhone OS; en_US;)"
    125.xx.xx.12 http://www.xxx.com">www.xxx.com - [14/May/2010:12:14:52 +0400] "GET / HTTP/1.1" 200 18653 "-" "Appcelerator Titanium/1.2.0 (iPhone Simulator/3.1; iPhone OS; en_US;)"

JSON Source