Merge lp:~alecu/ubuntu-sso-client/and-post into lp:ubuntu-sso-client
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Alejandro J. Cura on 2012-01-19 | ||||
| Approved revision: | 843 | ||||
| Merged at revision: | 835 | ||||
| Proposed branch: | lp:~alecu/ubuntu-sso-client/and-post | ||||
| Merge into: | lp:ubuntu-sso-client | ||||
| Diff against target: |
869 lines (+530/-59) 9 files modified
ubuntu_sso/utils/webclient/common.py (+43/-7) ubuntu_sso/utils/webclient/libsoup.py (+6/-4) ubuntu_sso/utils/webclient/qtnetwork.py (+7/-5) ubuntu_sso/utils/webclient/restful.py (+13/-5) ubuntu_sso/utils/webclient/tests/test_restful.py (+38/-27) ubuntu_sso/utils/webclient/tests/test_timestamp.py (+140/-0) ubuntu_sso/utils/webclient/tests/test_webclient.py (+128/-1) ubuntu_sso/utils/webclient/timestamp.py (+74/-0) ubuntu_sso/utils/webclient/txweb.py (+81/-10) |
||||
| To merge this branch: | bzr merge lp:~alecu/ubuntu-sso-client/and-post | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Natalia Bidart | Approve on 2012-01-18 | ||
| Manuel de la Peña (community) | 2012-01-17 | Approve on 2012-01-18 | |
|
Review via email:
|
|||
Commit Message
Restfulclient calls are now POST; response.headers are now case-insensitive dicts; OAuth timestamp sync with the server (LP: #916034)
Description of the Change
Restfulclient calls are now POST; response.headers are now case-insensitive dicts; OAuth timestamp sync with the server (LP: #916034)
| Alejandro J. Cura (alecu) wrote : | # |
> The header dictionary looks very similar to the InsensitiveDict found in
> twisted.
The HeaderDict is slightly different from the twisted InsensitiveDict in that the former is a specialization of defaultdict from the stdlib.
The thing is that *we could* simulate a defaultdict from the code in each webclient, by checking for existence of the element and creating it just before using it. But I think the code would be repeated but slightly different in each webclient, so I think it looks better this way.
- 842. By Alejandro J. Cura on 2012-01-18
-
change the assert to assertEqual
| Natalia Bidart (nataliabidart) wrote : | # |
Can headers be in "any" language? I was wondering since lowering a string may collide two different words in some languages. I know Turkish has several i's with unexpected upper/lower values.
Also, I think we need to call self.content.
| Alejandro J. Cura (alecu) wrote : | # |
> Can headers be in "any" language? I was wondering since lowering a string may
> collide two different words in some languages. I know Turkish has several i's
> with unexpected upper/lower values.
The "name" of the headers must be ASCII according to the http spec, so it's not an issue in this case.
> Also, I think we need to call self.content.
> StringProtocol).
I don't think it's necessary to do .close() on StringIO objects, since the resources used by them are freed as soon as the objects are collected.
| Natalia Bidart (nataliabidart) wrote : | # |
Looks good!
One tiny note: copyright for timestamp checker files is 2011, perhaps we should make that 2012?
- 843. By Alejandro J. Cura on 2012-01-19
-
fix copyright date on files

The header dictionary looks very similar to the InsensitiveDict found in twisted. python. util. Can we reuse the twisted implementation?