Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaping querystring is not working #106

Closed
afm-sayem opened this issue Jan 25, 2017 · 1 comment
Closed

Escaping querystring is not working #106

afm-sayem opened this issue Jan 25, 2017 · 1 comment
Labels

Comments

@afm-sayem
Copy link

I have colon (:) in my query string and escaping the colon is not working as expected. The query works in httpie.

debug output:

http://localhost:3000/games> get 'where[id\:gt]:=2'
HTTPie 0.9.9
Requests 2.13.0
Pygments 2.2.0
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609]
/usr/bin/python
Linux 4.4.0-59-generic

<Environment {
    "colors": 256, 
    "config": {
        "__meta__": {
            "about": "u'HTTPie configuration file'", 
            "help": "u'https://github.com/jkbrzt/httpie#config'", 
            "httpie": "u'0.9.4'"
        }, 
        "default_options": "[]"
    }, 
    "config_dir": "/home/kishan/.httpie", 
    "is_windows": false, 
    "stderr": "<open file '<stderr>', mode 'w' at 0x7fac21dbb1e0>", 
    "stderr_isatty": true, 
    "stdin": "<open file '<stdin>', mode 'r' at 0x7fac21dbb0c0>", 
    "stdin_encoding": "UTF-8", 
    "stdin_isatty": true, 
    "stdout": "<http_prompt.output.Printer object at 0x7fac1b3ce790>", 
    "stdout_encoding": "utf8", 
    "stdout_isatty": true
}>

>>> requests.request(**{
    "allow_redirects": false, 
    "auth": "None", 
    "cert": "None", 
    "data": {}, 
    "files": {}, 
    "headers": {
        "User-Agent": "HTTPie/0.9.9", 
        "where[id": "gt]:=2"
    }, 
    "method": "u'get'", 
    "params": {}, 
    "proxies": {}, 
    "stream": true, 
    "timeout": 30, 
    "url": "u'http://localhost:3000/games'", 
    "verify": true
})


http: error: ConnectionError: ('Connection aborted.', BadStatusLine("''",)) while doing GET request to URL: http://localhost:3000/games
('Connection aborted.', BadStatusLine("''",))
@eliangcs eliangcs added the bug label Jan 26, 2017
eliangcs added a commit that referenced this issue Feb 14, 2017
Fix #106: Escaping separators in parameter name
@eliangcs
Copy link
Contributor

Fixed in v0.9.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants