Commit graph

6 commits

Author SHA1 Message Date
Brian Coca
42d91951cf Merge pull request #537 from zitterbacke/patch-2
fix uri modul for JSON-escape quotation marks
should fix #121
2015-03-19 09:12:29 -04:00
Dan Rue
c2f731e5bd Do not mark "skipped" when changed is false
When using the "creates" option with the uri module, set changed
to False if the file already exists. This behavior is consistent with
other modules which use "creates", such as command and shell.
2015-02-17 15:19:22 -06:00
zitterbacke
22e1b26bea fix uri modul for JSON-escape quotation marks
consider the following response body (content) of a REST/JSON webservice containing escaped quotation marks:

```json
{ "key": "\"works\"" }
```

decoding this string not as raw will lose the backslash as JSON escape. later json.loads will fail to parse.

Inspired by [this thread](https://groups.google.com/forum/#!topic/ansible-project/kymtiloDme4) on the mailing list and the following python shell code:

```python
import json
string=r'{ "key": "\"works\"" }'
json.loads(string)
json.loads(string.decode('raw_unicode_escape'))
json.loads(string.decode('unicode_escape'))
```
2014-12-17 20:09:44 +01:00
Toshio Kuratomi
9c6826e928 Add text/json as a mimetype to try deserializing
Fixes #503
2014-12-16 13:55:08 -08:00
Toshio Kuratomi
6317d3a988 Move from md5 to sha1 to work on FIPS-140 enabled systems 2014-11-06 21:25:55 -08:00
Michael DeHaan
0be8798858 Renames. 2014-11-04 17:29:56 -05:00
Renamed from network/uri.py (Browse further)