Esato

Forum > Sony Ericsson / Sony > GPRS, WAP, MMS and Email setup > C905: Customizing User-Agent: string?

Author C905: Customizing User-Agent: string?
Hlorri
C905 Silver
Joined: Mar 24, 2008
Posts: 13
PM
Posted: 2009-08-04 10:29
Reply with quoteEdit/Delete This PostPrint this post
Is there a way to customize the User-Agent: string that the phone browser (or, more to the point, Exchange ActiveSync) sends?

The issue that my debranded C905a fails with our Exchange 2007 OWA server at work, wheras my Nokia phones (currently N97), my coworkers' iPhones, etc all connect fine. Investigating further, I found that the issue is really dumb coding on Microsoft's part (or perhaps our own IT department, who knows), where they apparently use the User-Agent: header in the HTTP request to decide what content to serve.

Using the "wget" command line tool on my Mac and/or Linux box to simulate the different browsers, I get:


$ wget --no-check-certificate --user-agent='Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-3/10.2.012; Profile/MIDP-2.1 Configuration/CLDC-1.1; en-us) AppleWebKit/525 (KHTML, like Gecko) WicKed/7.1.12344' https://cbd.mail.lifetech.com/
HTTP request sent, awaiting response... 200 OK

$ wget --no-check-certificate --user-agent='SonyEricssonC905/R1EA Browser/NetFront/3.4 Profile/MIDP-2.1 Configuration/CLDC-1.1 JavaPlatform/JP-8.4.2' https://cbd.mail.lifetech.com/
HTTP request sent, awaiting response... 500 ( The server denied the specified Uniform Resource Locator (URL). Contact the server administrator. )


Yet further, I find that the magic word is "Mozilla":

$ wget --no-check-certificate --user-agent='Mozilla' https://cbd.mail.lifetech.com/
HTTP request sent, awaiting response... 200 OK

$ wget --no-check-certificate --user-agent='AnythingElse' https://cbd.mail.lifetech.com/
HTTP request sent, awaiting response... 500 ( The server denied the specified Uniform Resource Locator (URL). Contact the server administrator. )


Yes, I have already submitted a ticket to our IT help desk - but because our company recently outsourced IT support operations to an outside vendor, I don't expect much from them.

I have also tried setting up a HTTP proxy on my own Apache web server, using a combination of mod_rewrite, mod_proxy and mod_headers to intercept and change the "User-Agent:" header on the way from my phone to the OWA server; however I am still having some issues with reverse rewriting (where "https://" links don't get translated back to "http://" as they should.. long complex story).

So - the bottom line is: Is there a way to modify the User-Agent string on the phone itself? I tried using A2Uploader to browse through the filesystem on the phone, but could not find anything relevant....

Thanks in advance!
[ This Message was edited by: Hlorri on 2009-08-04 09:34 ]
EkoBonk
Model not set
Joined: Mar 19, 2010
Posts: 4
PM
Posted: 2010-08-08 01:45
Reply with quoteEdit/Delete This PostPrint this post
I am looking for an answer to this as well - did you ever figure out if it was possible?
EkoBonk
Model not set
Joined: Mar 19, 2010
Posts: 4
PM
Posted: 2010-08-08 01:49
Reply with quoteEdit/Delete This PostPrint this post
Forgot to add notification
Access the forum with a mobile phone via esato.mobi