registry team mailing list archive
-
registry team
-
Mailing list archive
-
Message #22970
[Bug 655207] Re: make swift work with webob 1.0
So I sent a note over to Sergey Schetinin on bitbucket
When convenience properties are setup on the request class, (e.g.
content_length) - environ_getter used to map the setter of the property
such that if you set an environ value to None it will delete that key.
In this commit:
http://bitbucket.org/ianb/webob/changeset/b2b85d81c8f6#chg-webob/descriptors.py
environ_getter was refactored and that functionality was removed. As a
result the following code behaves differently in webob 0.9.8 and webob
1.0
>>> from webob import Request
>>> req = Request.blank('')
>>> req.content_length = None
>>> req.headers.has_key('content-length')
False
^ True in webob 1.0
Response objects haven't changed
>>> from webob import Response
>>> res = Response()
>>> res.content_length = None
>>> res.headers.has_key('content-length')
False
^ False in webob 1.0 & 0.9.8
I was hoping Sergey could clarify the intended behavior here. I don't
really understand why response/request objects use different data
structures for headers... (ResponseHeaders & header_getter vs.
EnvironHeaders & environ_getter)
Since the behavior changed, it seems like I could file a bug and submit
a test/patch for environ_getter? But the commit message seems to
indicate that this change was intended, so I thought I'd check with
Sergey first...
--
make swift work with webob 1.0
https://bugs.launchpad.net/bugs/655207
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack Object Storage (swift).
References