[Openstack] Keystone API

Tomasz Paszkowski ss7pro at gmail.com
Thu Jun 21 19:33:41 UTC 2012


bingo :-) You're great !

On Thu, Jun 21, 2012 at 8:34 PM, Dolph Mathews <dolph.mathews at gmail.com> wrote:
> If you let webob calculate the Content-Length by itself it won't resort to
> adding a Transfer-Encoding header:
>
> https://review.openstack.org/#/c/8818
>
> On Thu, Jun 21, 2012 at 12:54 PM, Tomasz Paszkowski <ss7pro at gmail.com>
> wrote:
>>
>> I have created bug report:
>>
>> https://bugs.launchpad.net/keystone/+bug/1016171
>>
>>
>>
>> On Thu, Jun 21, 2012 at 6:57 PM, Tomasz Paszkowski <ss7pro at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I'am working on enhancing keystone PublicAPI to support CORS.
>> > Everything seem to work well except that Keystone is formatting
>> > responses with Transfer-Encoding: chunked which isn't accepted for
>> > OPTIONS query by browsers (chrome, firefox). Does anyone knows how to
>> > force keystone API to use plain format ? My CorsController is as
>> > follows:
>> >
>> >
>> > class CorsController(wsgi.Application):
>> >    def __init__(self):
>> >        super(CorsController, self).__init__()
>> >    def get_options(self, context):
>> >        headers = [('Access-Control-Allow-Headers',
>> > 'origin,content-type,accept,x-auth-token')]
>> >        headers.append(('Access-Control-Allow-Methods', 'POST'))
>> >        headers.append(('Access-Control-Allow-Origin',
>> > 'https://178.239.138.10:8433'))
>> >        headers.append(('Access-Control-Max-Age', '60'))
>> >        headers.append(('Content-Length', '0'))
>> >        return wsgi.render_response(status=(200, 'OK'),
>> >                                    headers=headers)
>> >
>> >
>> > Sample request:
>> >
>> >  echo -e 'OPTIONS /v2.0/tokens HTTP/1.1\r\n' | nc 10.76.0.119 5000
>> > HTTP/1.1 200 OK
>> > Access-Control-Allow-Headers: origin,content-type,accept,x-auth-token
>> > Access-Control-Allow-Methods: POST
>> > Access-Control-Allow-Origin: https://10.76.0.119:8433
>> > Access-Control-Max-Age: 60
>> > Date: Thu, 21 Jun 2012 16:52:33 GMT
>> > Transfer-Encoding: chunked
>> >
>> >
>> >
>> >
>> > --
>> > Tomasz Paszkowski
>> > SS7, Asterisk, SAN, Datacenter, Cloud Computing
>> > +48500166299
>>
>>
>>
>> --
>> Tomasz Paszkowski
>> SS7, Asterisk, SAN, Datacenter, Cloud Computing
>> +48500166299
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack at lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>
>



-- 
Tomasz Paszkowski
SS7, Asterisk, SAN, Datacenter, Cloud Computing
+48500166299




More information about the Openstack mailing list