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

URL including /http/ will throw error : Connection is being rejected #543

Closed
coolshijun opened this issue Mar 9, 2020 · 14 comments
Closed
Labels

Comments

@coolshijun
Copy link

  • VSCode Version: 1.42.1
  • OS Version: macOS 10.15.3
  • REST Client Version: 0.23.2

Steps to Reproduce:

  1. Accessing https://localhost/data/http will be successful
  2. But if you append more like https://localhost/data/http/config, this will throw below error.

Connection is being rejected. The service isn’t running on the server, or incorrect proxy settings in vscode, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:443.

@Huachao
Copy link
Owner

Huachao commented Mar 9, 2020

@coolshijun sounds strange, did you use some reverse proxy to reject specific path? And does it work with cURL

@coolshijun
Copy link
Author

no, just local docker image, and as I described, the parent path can be accessed and if you have 'http/anything', it will throw this error, so I don't think it's related to environment.

@Huachao
Copy link
Owner

Huachao commented Mar 10, 2020

@coolshijun what's your hosted web server for your web app and your web framework?

@coolshijun
Copy link
Author

just flask and connexion rest api, it's easy to reproduce, if you have any api like http://localhost/user/12345, and you can use http://localhost/user/12345/http to test, it will give you error message like user doen't exist, but at least the request is sent to the server to process, but if you have http://localhost/user/12345/http/test, this will trigger the error and the request never reach the server.

@Huachao
Copy link
Owner

Huachao commented Mar 10, 2020

@coolshijun can you work with cURL?

@coolshijun
Copy link
Author

yes, same url can be accessed by cURL and postman even it will throw server error, but at least the request is sent to server, but use REST Client, the request is NOT sent to server at all.

@Huachao
Copy link
Owner

Huachao commented Mar 10, 2020

@coolshijun could you please paste the curl command details with -v option in curl and help me to investigate? Thanks in advance.

@coolshijun
Copy link
Author

ok, I misunderstood your question, I use "copy request as cURL" to see the details
for the working url like http://localhost/user/12345/http, you will see
curl --request GET
--url 'http://localhost/user/12345/http' \

bur for the call like http://localhost/user/12345/http/test, you will get empty url like

curl --request GET
--url '' \

So the transformation is going to be empty, I believe that's the reason for rejection.

@Huachao
Copy link
Owner

Huachao commented Mar 10, 2020

@coolshijun nice catch, I have fixed the issue and will be published in the next release. The root cause is that the url contains http word which causes parse error.

@Huachao Huachao closed this as completed Mar 10, 2020
@Huachao Huachao added the bug label Mar 10, 2020
@coolshijun
Copy link
Author

cool, thanks for quick response!!!

@Huachao
Copy link
Owner

Huachao commented Mar 13, 2020

@coolshijun as you wished. Thanks for your email
rest-client-0.23.2.vsix.txt

@coolshijun
Copy link
Author

Excellent! Thank you very much!

@Huachao
Copy link
Owner

Huachao commented Jun 12, 2020

@coolshijun you can try this in the latest version 0.24.0

@coolshijun
Copy link
Author

Great! Thanks for keeping me posted.

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