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

GET requests on github API and raw links return bad host (status code: 0) #59

Closed
IngCr3at1on opened this issue Nov 6, 2015 · 11 comments

Comments

@IngCr3at1on
Copy link

This includes the example in the readme documentation.

@whoshuu
Copy link
Collaborator

whoshuu commented Nov 7, 2015

Just tried the example in the readme documentation again, and it works just fine. Can you give me a minimal snippet of the request that's bugging out for you?

@nabijaczleweli
Copy link
Contributor

@IngCr3at1on OS, curl version?

@IngCr3at1on
Copy link
Author

@whoshuu will have to get that later. @nabijaczleweli this occurs in Arch Linux with curl 7.45

@vitorhnn
Copy link

I'm having the same issue, but I found out that it happens only if you don't use your system's libcurl and it's just https requests, http works fine. I'm also on Arch Linux with curl 7.45 and OpenSSL 1.0.2.d

@IngCr3at1on
Copy link
Author

@vitorhnn aye I've noticed it only seems to happen on https also, I forgot to note that in the initial issue (since all github api and raw links are handled over https I didn't feel this was necessary). I have the same version of OpenSSL also.

As for a snippet of the request it's literally the same one as the example that I was playing with.

@vitorhnn can you elaborate on what you mean by "don't use your system's libcurl"; more specifically was there something you were able to do to make it work?

@whoshuu
Copy link
Collaborator

whoshuu commented Nov 16, 2015

@vitorhnn, I think the issue you're seeing is related to #31, which has yet to be implemented when building the included curl library. It makes sense that your system curl works just fine, since it's correctly using OpenSSL from your system as well. When #31 is implemented, let's circle back on this issue and see if it's resolved.

@whoshuu
Copy link
Collaborator

whoshuu commented Nov 16, 2015

@IngCr3at1on, there's an option to either use your system's libcurl or the included one. The option is USE_SYSTEM_CURL (found here) and by default it's OFF. You can turn it on by setting an environment variable (ie, export USE_SYSTEM_CURL=ON), or setting a CMake definition cmake -DUSE_SYSTEM_CURL=ON .. && make.

Additionally, the option should be exposed in the CMake gui if that's what you're using to configure your project.

@vitorhnn
Copy link

@IngCr3at1on, set USE_SYSTEM_CURL to ON on your CMakeLists.txt, like here

@IngCr3at1on
Copy link
Author

Alright @whoshuu and @vitorhnn I'll try that out. Assuming it works I'll close this being that #31 already exists. Thanks.

@nabijaczleweli
Copy link
Contributor

@IngCr3at1on And?

@COM8
Copy link
Member

COM8 commented Jun 17, 2020

Closing this, since it does not seem to be relevant any more.

@COM8 COM8 closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants