Bug 48397

Summary: WebKit2 shouldn't try to send an empty user agent
Product: WebKit Reporter: Brian Weinstein <bweinstein>
Component: WebKit2Assignee: Brian Weinstein <bweinstein>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
[PATCH] Fix
bweinstein: commit-queue-
[PATCH] Fix with test aroben: review+, bweinstein: commit-queue-

Description Brian Weinstein 2010-10-26 21:45:22 PDT
WebKit2 shouldn't try to send an empty user agent. In WebKit2/WebProcess/WebPage/WebPage.cpp, when we are returning the user agent, we return the custom one if it is not null, however, this should be if it is not empty, because we don't want to return an empty string for the user agent.
Comment 1 Brian Weinstein 2010-10-26 21:47:00 PDT
Created attachment 71981 [details]
[PATCH] Fix
Comment 2 Brian Weinstein 2010-10-26 22:10:56 PDT
(In reply to comment #1)
> Created an attachment (id=71981) [details]
> [PATCH] Fix

Will send out a new patch with a better explanation and a test.
Comment 3 Brian Weinstein 2010-10-26 23:40:50 PDT
Created attachment 71986 [details]
[PATCH] Fix with test
Comment 4 WebKit Review Bot 2010-10-26 23:43:02 PDT
Attachment 71986 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKitTools/TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKitTools/TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp:28:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Brian Weinstein 2010-10-27 09:56:15 PDT
Landed in r70658.
Comment 6 WebKit Review Bot 2010-10-27 14:03:34 PDT
http://trac.webkit.org/changeset/70658 might have broken GTK Linux 32-bit Debug
Comment 7 WebKit Review Bot 2010-10-27 14:03:42 PDT
http://trac.webkit.org/changeset/70659 might have broken GTK Linux 32-bit Debug