RESOLVED FIXED 126810
[Win] Application name in user agent string is truncated.
https://bugs.webkit.org/show_bug.cgi?id=126810
Summary [Win] Application name in user agent string is truncated.
peavo
Reported 2014-01-11 01:03:01 PST
The application name part of the user agent string is cut off after the first letter. We need to make the application name string 8 bit.
Attachments
Patch (1.38 KB, patch)
2014-01-11 01:08 PST, peavo
no flags
Patch (1.38 KB, patch)
2014-01-11 01:47 PST, peavo
no flags
Patch (1.32 KB, patch)
2014-01-11 13:20 PST, peavo
no flags
Patch (1.37 KB, patch)
2014-01-13 07:52 PST, peavo
no flags
peavo
Comment 1 2014-01-11 01:08:57 PST
peavo
Comment 2 2014-01-11 01:47:57 PST
Anders Carlsson
Comment 3 2014-01-11 08:07:09 PST
Comment on attachment 220925 [details] Patch This won't work if the application name contains 16-bit characters. Maybe something in the network layer is wrong?
Brent Fulgham
Comment 4 2014-01-11 09:40:39 PST
Comment on attachment 220925 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220925&action=review > Source/WebKit/win/WebView.cpp:3186 > + m_applicationName = String::make8BitFrom16BitSource(applicationName16.characters16(), applicationName16.length()); Maybe this should just be applicationName16.utf8().data().
peavo
Comment 5 2014-01-11 13:20:23 PST
peavo
Comment 6 2014-01-11 13:21:18 PST
(In reply to comment #4) > (From update of attachment 220925 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=220925&action=review > > > Source/WebKit/win/WebView.cpp:3186 > > + m_applicationName = String::make8BitFrom16BitSource(applicationName16.characters16(), applicationName16.length()); > > Maybe this should just be applicationName16.utf8().data(). Thanks for looking into this, guys :) Updated patch according to comments.
Anders Carlsson
Comment 7 2014-01-11 16:51:09 PST
Comment on attachment 220945 [details] Patch I don't think this is quite right either. m_applicationName is already Unicode encoded.
peavo
Comment 8 2014-01-13 07:52:31 PST
peavo
Comment 9 2014-01-14 07:05:05 PST
(In reply to comment #8) > Created an attachment (id=221042) [details] > Patch Updated patch, the root of the problem seems to be a missing 8-bit check in the string concatenation.
WebKit Commit Bot
Comment 10 2014-01-14 10:38:12 PST
Comment on attachment 221042 [details] Patch Clearing flags on attachment: 221042 Committed r161983: <http://trac.webkit.org/changeset/161983>
WebKit Commit Bot
Comment 11 2014-01-14 10:38:15 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.