Bug 54379 - Add basic parser for Content Security Policy
Summary: Add basic parser for Content Security Policy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 53572
  Show dependency treegraph
 
Reported: 2011-02-14 01:21 PST by Adam Barth
Modified: 2011-02-14 12:48 PST (History)
3 users (show)

See Also:


Attachments
Patch (7.43 KB, patch)
2011-02-14 01:27 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (7.32 KB, patch)
2011-02-14 01:38 PST, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-02-14 01:21:24 PST
Add basic parser for Content Security Policy
Comment 1 Adam Barth 2011-02-14 01:27:09 PST
Created attachment 82296 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-02-14 01:36:37 PST
Comment on attachment 82296 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=82296&action=review

LGTM. I look forward to seeing this testable in the next patch. :)

> Source/WebCore/page/ContentSecurityPolicy.cpp:117
> +            m_directives.append(CSPDirective(String(name), String(value)));

You should explain why you use this method for creating strings, since you say it does only 2 mallocs instead of 4.  Seems like a useful comment.
Comment 3 Adam Barth 2011-02-14 01:38:39 PST
Created attachment 82297 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2011-02-14 05:14:20 PST
Comment on attachment 82297 [details]
Patch for landing

Rejecting attachment 82297 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-4', 'apply-..." exit_code: 1

Last 500 characters of output:
rks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
    result = func(*args)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_http.py", line 756, in https_open
    return self.do_open(conn_factory, req)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_http.py", line 706, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 60] Operation timed out>

Full output: http://queues.webkit.org/results/7913501
Comment 5 Eric Seidel (no email) 2011-02-14 09:42:51 PST
Comment on attachment 82297 [details]
Patch for landing

We should probably catch and ignore URLError in certain cases.
Comment 6 WebKit Commit Bot 2011-02-14 12:48:27 PST
Comment on attachment 82297 [details]
Patch for landing

Clearing flags on attachment: 82297

Committed r78497: <http://trac.webkit.org/changeset/78497>
Comment 7 WebKit Commit Bot 2011-02-14 12:48:32 PST
All reviewed patches have been landed.  Closing bug.