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

HTTP Head Request not working #98

Closed
bytefreak opened this issue Oct 10, 2013 · 1 comment
Closed

HTTP Head Request not working #98

bytefreak opened this issue Oct 10, 2013 · 1 comment

Comments

@bytefreak
Copy link
Contributor

Hi,

i have an issue sending http head requests. these will hang indefinitely, because there is no default timeout set. i found the solution: if you want to send a head request with curl, you need to set CURLOPT_NOBODY to true.

so i changed:

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);
if ($this->method==HTTP::HEAD) {
curl_setopt($ch, CURLOPT_NOBODY, true);
}

@nategood
Copy link
Owner

thanks! for future reference, please use explicit === checks :-).

@nategood nategood closed this as completed Dec 9, 2013
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

2 participants