REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
https://bugs.webkit.org/show_bug.cgi?id=47753
<rdar://problem/8558242>
        
Reviewed by Sam Weinig.

WebCore: 

r69850 switched over to a different way of concatenating WebCore strings, but ran into an issue
where some Windows calls were returning null terminated strings, and this breaks the new
method of concatenation.
        
GetLocaleInfo returns a null-terminated string, but WebCore strings are non-null terminated,
so once we create our WebCore string, we want to trim off the null terminating character before
we return the localeInfo.

Test: fast/dom/navigator-userAgent.html

* platform/win/Language.cpp:
(WebCore::localeInfo):

WebKit/win: 

VerQueryValue returns a null terminated string, but we need to strip off the null terminating character
when we turn it into a WebCore string, or else concatenation using this string will break.

* WebView.cpp:

LayoutTests: 

Add a test to make sure that the user agent has some important parts, and is fully formed.
This test tests that the user agent has Mozilla, AppleWebKit, and KHML, like Gecko. If the
user agent has all of these components, the string concatenation worked correctly, and this
bug is fixed.

* fast/dom/navigator-userAgent-expected.txt: Added.
* fast/dom/navigator-userAgent.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed