2
0

CURLOPT_HTTP09_ALLOWED.3 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .\"
  23. .TH CURLOPT_HTTP09_ALLOWED 3 "17 Dec 2018" "libcurl 7.64.0" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_HTTP09 \- allow HTTP/0.9 response
  26. .SH SYNOPSIS
  27. #include <curl/curl.h>
  28. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP09_ALLOWED, long allowed);
  29. .SH DESCRIPTION
  30. Pass the long argument \fIallowed\fP set to 1L to allow HTTP/0.9 responses.
  31. A HTTP/0.9 response is a server response entirely without headers and only a
  32. body. You can connect to lots of random TCP services and still get a response
  33. that curl might consider to be HTTP/0.9!
  34. .SH DEFAULT
  35. curl allowed HTTP/0.9 responses by default before 7.66.0
  36. Since 7.66.0, libcurl requires this option set to 1L to allow HTTP/0.9
  37. responses.
  38. .SH PROTOCOLS
  39. HTTP
  40. .SH EXAMPLE
  41. .nf
  42. CURL *curl = curl_easy_init();
  43. if(curl) {
  44. CURLcode ret;
  45. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  46. curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L);
  47. ret = curl_easy_perform(curl);
  48. }
  49. .fi
  50. .SH AVAILABILITY
  51. Option added in 7.64.0, present along with HTTP.
  52. .SH RETURN VALUE
  53. Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
  54. .SH "SEE ALSO"
  55. .BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP_VERSION "(3), "