[Webkit-unassigned] [Bug 32160] Web Inspector: Allow retrieval of all transmitted cookies

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 4 12:16:51 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32160


Pavel Feldman <pfeldman at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #44318|review?                     |review-
               Flag|                            |




--- Comment #3 from Pavel Feldman <pfeldman at chromium.org>  2009-12-04 12:16:51 PST ---
(From update of attachment 44318)
> +        for (var c = 0; c < allCookies.length; ++c) {

c is a strange index name.

> +            for (var id in WebInspector.resources) {
> +                var resource = WebInspector.resources[id];
> +                var match = resource.documentURL.match(WebInspector.URLRegExp);

You don't need to do matching numCookeis x numResources times. It is easier to
go though resources and store their domains into a set first (numResources
steps), then you can get all cookies for given frame within numCookies x
numDomains steps.

>  
> +WebInspector.Cookies.cookieMatchesResourceURL = function(cookie, resourceURL)
> +{

I don't see this method used.

> +
> +WebInspector.Cookies.cookieDomainMatchesResourceDomain = function(cookieDomain, resourceDomain)
> +{
> +    if (cookieDomain.charAt(0) !== '.')
> +        return resourceDomain === cookieDomain;
> +    return !!resourceDomain.match(new RegExp("^([^\\.]+\\.)?" + cookieDomain.substring(1).escapeForRegExp() + "$"), "i");

A test for this would be nice. You need to do a inspector test that would match
a bunch of URLs against given domain on the frontend side.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list