[Webkit-unassigned] [Bug 61862] EventSource should support CORS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 20 03:13:12 PDT 2011


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


Per-Erik Brodin <per-erik.brodin at ericsson.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |per-erik.brodin at ericsson.co
                   |                            |m




--- Comment #16 from Per-Erik Brodin <per-erik.brodin at ericsson.com>  2011-06-20 03:13:11 PST ---
(In reply to comment #13)
> (From update of attachment 97728 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=97728&action=review
> 
> > Source/WebCore/loader/CrossOriginAccessControl.cpp:52
> >      if (equalIgnoringCase(name, "accept")
> >          || equalIgnoringCase(name, "accept-language")
> > +        || equalIgnoringCase(name, "cache-control")
> >          || equalIgnoringCase(name, "content-language")
> > +        || equalIgnoringCase(name, "last-event-id")
> >          || equalIgnoringCase(name, "origin"))
> >          return true;
> 
> This list comes from the CORS spec.  It's not clear we should change it unilaterally.

Note that Last-Event-ID is in the simple request header list in the CORS spec, but it doesn't make sense to add only that since then a preflight request will be made anyway.

> 
> > Source/WebCore/page/EventSource.cpp:71
> > -    , m_origin(context->securityOrigin()->toString())
> > +    , m_origin(SecurityOrigin::createFromString(url)->toString())
> 
> I don't understand this part of the change.  Why don't the origin come from the context?

This is the origin set on the dispatched message events, "the origin of the event stream's URL" in the spec. I should probably rename this to m_eventStreamOrigin or similar. This was the same as the script's origin when only same origin requests were supported. I should drop 'fromString' as well since url is passed as a KURL to the constructor.

I agree that we shouldn't land anything until the questions on the spec(s) get answered.

-- 
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