Tagged Questions
1
vote
2answers
2k views
Using curl to request URL that redirects to relative URL with anchor tag
I'm using curl to request a URL that redirects to a different URL using a Location: line like:
Location:/path/to/resource#name
As I understand it, that line in the redirect response is invalid per ...
1
vote
1answer
305 views
Using curl to make a HEAD request with a hard timeout
I'd like to use curl to send a HTTP HEAD request to a URL to verify that it is working correctly (server is up and sends a successful response). At the end, I need the final HTTP response code ...
0
votes
1answer
907 views
retrieve file size from HTTP headers without downloading the file with CURL (no HEAD)
What i want to do is knowa file size and not download it.
I've tried it with HEAD but the server doesn't respond
curl_setopt($curl, CURLOPT_NOBODY, true);
if i quit this , it will , but it will ...
5
votes
2answers
4k views
Difference between `curl -I` and `curl -X HEAD`
I was watching the funny server type from http://www.reddit.com with curl -I http://www.reddit.com when I guessed that curl -X HEAD http://www.reddit.com would do the same. But, in fact, it doesn't.
...