Bug 9189 - [S60] Reindeer does not send any User-agent HTTP header
Summary: [S60] Reindeer does not send any User-agent HTTP header
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 312.x
Hardware: S60 Emulator S60 3rd edition
: P2 Normal
Assignee: Bradley Morrison
URL: http://waplabdc.nokia-boston.com/brow...
Keywords: PlatformOnly
Depends on:
Blocks: 9068
  Show dependency treegraph
 
Reported: 2006-05-31 08:19 PDT by Franklin Davis
Modified: 2007-02-19 17:06 PST (History)
1 user (show)

See Also:


Attachments
Return static User agent string if __BROWSER_SDK (3.87 KB, patch)
2006-10-05 16:17 PDT, Bradley Morrison
zalan: review-
Details | Formatted Diff | Diff
Removed BrowserVersion.h include (17.42 KB, patch)
2006-10-06 10:35 PDT, Bradley Morrison
zalan: review-
Details | Formatted Diff | Diff
Correct patch this time :) (3.44 KB, patch)
2006-10-09 07:44 PDT, Bradley Morrison
zalan: review-
Details | Formatted Diff | Diff
Updated static UA string to 3.1 (2.62 KB, patch)
2006-10-11 11:07 PDT, Bradley Morrison
zalan: review-
Details | Formatted Diff | Diff
bah! (2.62 KB, patch)
2006-10-11 14:36 PDT, Bradley Morrison
zalan: review+
Details | Formatted Diff | Diff
Value of KHttpUserAgentString depends on __BROWSER_SDK (1.31 KB, patch)
2006-10-13 14:14 PDT, Bradley Morrison
Sachin.Padma: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Franklin Davis 2006-05-31 08:19:36 PDT
Reindeer browser should send a reasonable HTTP header to allow AJAX features and other proper content formatting by sites. Suggestion:

Mozilla/5.0 (SymbianOS/9.1; U; [en]; Series60/3.0 Reindeer/2006-05-31) AppleWebKit/413 (KHTML, like Gecko) Safari/413

where Reindeer/xxxx is some unique version identifier, either the build date or some other version number.
Comment 1 Krishna 2006-06-02 10:04:12 PDT
Reproducible on the S60 webkit, displays nothing.
Not reproducible on the Safari TOT. 
Safari displays the following user-agent header: 
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Safari/417.9.2"

Added "PlatformOnly" to keywords field.
Comment 2 Franklin Davis 2006-10-02 11:48:15 PDT
Would also be good to send other HTTP headers compatible with full browser. See http://discussion.forum.nokia.com/forum/showthread.php?t=90610&highlight=HTTP+headers+browser


I suggest we send the same headers as 3.1, but for User-Agent I suggest:
Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaReindeerEmulator/1.0; Profile/MIDP-2.0 Configuration/CLDC-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413
Comment 3 Bradley Morrison 2006-10-03 08:15:02 PDT
Adding S60 prefix to synopsis
Comment 4 Bradley Morrison 2006-10-03 08:15:14 PDT
Adding S60 prefix to synopsis
Comment 5 Bradley Morrison 2006-10-05 16:17:09 PDT
Created attachment 10936 [details]
Return static User agent string if __BROWSER_SDK

Please note I have updated to hardcoded UserAgentString to mention *Reindeer*, so this means if the UserAgentString is found in the central repository this value will be returned even if __BROWSER_SDK is not specified.

Not sure if this is a problem but the patch can be updated if so.
Comment 6 Bradley Morrison 2006-10-05 16:18:24 PDT
Comment on attachment 10936 [details]
Return static User agent string if __BROWSER_SDK

Please also see previous comment about updated value of KHttpUserAgentString. I put *@nokia.com instead of *gmail.com in the review request
Comment 7 Bradley Morrison 2006-10-05 16:19:49 PDT
(In reply to comment #5)
> Please note I have updated to hardcoded UserAgentString to mention *Reindeer*,
> so this means if the UserAgentString is found in the central repository this
> value will be returned even if __BROWSER_SDK is not specified.

s/if the UserAgentString is found in the central repository/if the UserAgentString is NOT found in the central repository/

It's late, I'm going home. ;-)
 

Comment 8 zalan 2006-10-06 07:04:46 PDT
Comment on attachment 10936 [details]
Return static User agent string if __BROWSER_SDK

1. please use #if _browser_sdk in webkitcontrol.cpp to separate sdk and rdn functionality.
2. do we really need to include browserversion.h?
Comment 9 Bradley Morrison 2006-10-06 10:35:33 PDT
Created attachment 10948 [details]
Removed BrowserVersion.h include
Comment 10 Bradley Morrison 2006-10-06 10:39:26 PDT
(In reply to comment #8)
> (From update of attachment 10936 [details] [edit])
> 1. please use #if _browser_sdk in webkitcontrol.cpp to separate sdk and rdn
> functionality.

You mean:
-            // come up with a hardcoded UA string
-            iUserAgent = KHttpUserAgentString().AllocL();
+            // return hardcoded string
+            iUserAgent = HBufC::NewL( KHttpUserAgentString().Length() );
+            iUserAgent->Des().Copy( KHttpUserAgentString );

?

Since KHttpUserAgentString is now always 8 bits, this needs to happen regardless of whether __BROWSER_SDK is set.

> 2. do we really need to include browserversion.h?

Ahh, nope, removed and patch updated.

Comment 11 zalan 2006-10-06 18:18:42 PDT
Comment on attachment 10948 [details]
Removed BrowserVersion.h include

wrong patch file. (the patch is about webuilogger)
Comment 12 Bradley Morrison 2006-10-09 07:44:33 PDT
Created attachment 10993 [details]
Correct patch this time :)

Correct patch this time :) I will probably send this to spadma for a 2nd opinion as he is available now.
Comment 13 zalan 2006-10-10 15:03:15 PDT
Comment on attachment 10993 [details]
Correct patch this time :)

go back to 3.0 ua string. sending yet another (and very much different) is confusing.
Comment 14 Bradley Morrison 2006-10-11 11:07:52 PDT
Created attachment 11033 [details]
Updated static UA string to 3.1

Also reworked patch a little so that static uastring not declared with _LIT8. does a conversion via HBufC8 in CHttpTransaction::AddRequestHeadersL instead.
Comment 15 zalan 2006-10-11 14:03:57 PDT
Comment on attachment 11033 [details]
Updated static UA string to 3.1

push uastring to the cleanupstack by calling NewLC instead.
(cleanupstack gets out of sync and crashes in this patch)
Comment 16 Bradley Morrison 2006-10-11 14:36:34 PDT
Created attachment 11039 [details]
bah!

Patch calls HBufC::NewLC not HBufC::NewL now. I have to admit, good catch. But anyway ..... arrrrrghhhh! :P
Comment 17 zalan 2006-10-11 18:47:52 PDT
Comment on attachment 11039 [details]
bah!

what a great patch!
r=me
Comment 18 zalan 2006-10-11 18:49:07 PDT
r17001
Comment 19 Bradley Morrison 2006-10-13 14:10:58 PDT
Sachin would prefer that the UA string is not different if not found in the cenrep.
Comment 20 Bradley Morrison 2006-10-13 14:14:15 PDT
Created attachment 11080 [details]
Value of KHttpUserAgentString depends on __BROWSER_SDK
Comment 21 Sachin Padma 2006-10-27 13:02:10 PDT
Comment on attachment 11080 [details]
Value of KHttpUserAgentString depends on __BROWSER_SDK

r=me
Comment 22 Bradley Morrison 2007-01-23 11:42:30 PST
The UA string is correct, I'm setting this to resolved.
Comment 23 Krishna 2007-01-25 18:50:45 PST
TSW ID:  KPOY-6UMP8F 
Comment 24 Krishna 2007-02-19 17:06:34 PST
Closed