Bug 23022

Summary: Fix multiple issues with appcache online whitelist handling
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore Misc.Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch darin: review+

Description Alexey Proskuryakov 2008-12-29 03:41:35 PST
Patch forthcoming.
Comment 1 Alexey Proskuryakov 2008-12-29 03:57:26 PST
Created attachment 26288 [details]
proposed patch
Comment 2 Darin Adler 2008-12-30 10:34:54 PST
Comment on attachment 26288 [details]
proposed patch

> +    unsigned whitelistSize = m_onlineWhitelist.size();
> +    for (unsigned i = 0; i < whitelistSize; ++i) {

We normally use size_t to iterate vectors.

> +        unsigned whitelistSize = onlineWhitelist.size();
> +        for (unsigned i = 0; i < whitelistSize; ++i) {

Ditto.

For scaling, with large whitelists, it seems we might want to come up with a hash function so we can use a hashed set rather than a vector.

> +# This should work normally.
> +counter.php?uncached
> \ No newline at end of file

Can we add a newline?

r=me
Comment 3 Alexey Proskuryakov 2008-12-30 10:57:52 PST
(In reply to comment #2)
> For scaling, with large whitelists, it seems we might want to come up with a
> hash function so we can use a hashed set rather than a vector.

I'm not aware of any way to use a hash function for prefix matching. We could use a tree though.

But I doubt that whitelists will be very large.

> > +# This should work normally.
> > +counter.php?uncached
> > \ No newline at end of file
> 
> Can we add a newline?

I didn't add it intentionally - I wanted to have a test for parsing such a manifest.
Comment 4 Alexey Proskuryakov 2009-01-02 03:13:04 PST
Committed revision 39548.