Open thenbe opened 10 months ago
Thanks for the report. This is supposed to happen infrequently. Will fix.
Still happening. Very annoying testing a proxy server getting an extra request on every request.
Still happening on the latest version (3.2.2). While having a periodic update check may be useful, perhaps there could be an option in the config file to disable it entirely? Either way, the additional request on every invocation makes it significantly harder to use for testing a proxy setup. Any solution would be appreciated.
I tried to reproduce but without success. Can, everyone in this thread, post the debug output so that we can establish the common factor?
I can reproduce this still on 3.2.2
. @Ousret To help you reproduce this, can you share what method you're using to detect the request? (I mentioned a couple of example methods in my original post)
@Ousret running mitmproxy listening on port 8080.
Running HTTPS_PROXY=http://localhost:8080 https --verify=no get example.com
once results in
Running the same command twice results in
No matter what kind of request I make with HTTPie, it always fires off a check to packages.httpie.io
every time.
Getting the debug output:
Hopefully this is useful.
Found the origin of this situation. A fix is available in https://github.com/httpie/cli/pull/1531
To preview it, run the following pip install "git+https://github.com/Ousret/HTTPie.git@feature-tryout-niquests" -U
Can you test the patch and report back? If it solved your issue or not.
@Ousret well, it's certainly different.
It seems that HTTPie is still issuing the requests, but now doesn't trust the proxy's cert (even with --verify=no
).
HTTPie initially set verif=False (v3.x) for fetching latest versions information from the server, the given PR let it (cert verif) by default. If you don't use mitmproxy and the request succeed, it will stop doing it. Nonetheless, I applied an additional measure that (i) consider a failure sufficient to stop trying (ii) forward the verify argument to it.
You can try to install the patch again, it should be OK now.
Yup, seems to work!
I tested various orderings of using proxy/not using proxy (in a Docker container so different tests did not influence each other) and it no longer does the update check every time. Thank you for the hard work!
Now just have to wait for #1531 to land...
A request is fired to
packages.httpie.io
on every invocation ofhttp
. Not sure if this related to update notifications (#1136). If so, then it seems overkill to check for updates on every single invocation.You can see and/or block this request using something like opensnitch (linux) or littlesnitch (mac).
Checklist
Minimal reproduction code and steps
http example.com
opensnitch
/littlesnitch
(links above) to view request topackages.httpie.io
http example.com
opensnitch
/littlesnitch
(links above) to view request topackages.httpie.io
Current result
Unnecessary/excessive requests to
packages.httpie.io
. …Expected result
No unnecessary/excessive requests to
packages.httpie.io
. …Debug output
Please re-run the command with
--debug
, then copy the entire command & output and paste both below:Additional information, screenshots, or code examples
…