Bug 48397 - WebKit2 shouldn't try to send an empty user agent
Summary: WebKit2 shouldn't try to send an empty user agent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Brian Weinstein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 21:45 PDT by Brian Weinstein
Modified: 2010-10-27 14:03 PDT (History)
4 users (show)

See Also:


Attachments
[PATCH] Fix (1.15 KB, patch)
2010-10-26 21:47 PDT, Brian Weinstein
bweinstein: commit-queue-
Details | Formatted Diff | Diff
[PATCH] Fix with test (9.25 KB, patch)
2010-10-26 23:40 PDT, Brian Weinstein
aroben: review+
bweinstein: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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