I am trying to find the value of the HTTP protocol that curl is using in a particular PHP application. I haven't been able to find a documented default for this.
Following a code snippet from this useful stackoverflow post (default-curl-option-values) I was able to print out the values of the curl options just before doing the curl_exec.
The result was CURLOPT_HTTP_VERSION = 84. However the three constants that we can use to set this are:
CURL_HTTP_VERSION_NONE = 0
CURL_HTTP_VERSION_1_0 = 1
CURL_HTTP_VERSION_1_1 = 2
Therefore the question is: What does a value of 84 imply? I am not seeing how the above constants can translate to 84 in some kind of bit combination? I could try this posted alternate way of seeing what curl is doing but I am still curious about how to read the option value.
CURL_HTTP_VERSION isn't a variable you set, it's a parameter you supply to curl_setopt() to tell it which option you're setting. So 84 is just the number of this option, and its value is meaningless (except to the internals of curl_setopt().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With