401 = unauthenticated. 403 = unauthorized
On 25 Aug 2013 12:27, "Michaël Gallego" <notifications@github.com> wrote:

> In tests/ZfrRestTest/Mvc/CorsListenerTest.php:
>
> > +        $this->corsListener->onCors($this->event);
> > +
> > +        $this->assertNotEquals(204, $this->event->getResponse()->getStatusCode());
> > +    }
> > +
> > +    public function testIfAccessControlRequestMethodIsNotInRequest()
> > +    {
> > +        $request = new HttpRequest();
> > +        $request->setMethod('options');
> > +        $request->getHeaders()->addHeaderLine('Origin', 'origin-header');
> > +
> > +        $this->event->setRequest($request);
> > +
> > +        $this->corsListener->onCors($this->event);
> > +
> > +        $this->assertNotEquals(204, $this->event->getResponse()->getStatusCode());
>
> I think 401 is a great choice. Once again, please refer on the internet if
> there is a widely used convention for that.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/zf-fr/zfr-rest/pull/82/files#r5968031>
> .
>