Mercurial > hg > octave-jordi
diff libinterp/dldfcn/urlwrite.cc @ 15324:af54273243fd
urlwrite.cc: Ensure the default HTTP request method is reset to GET
* urlwrite.cc (curl_handle::curl_handle): Ensure the default HTTP
request method is reset to GET.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Fri, 07 Sep 2012 00:33:28 -0400 (2012-09-07) |
parents | 9f9a7ae2d263 |
children | 81fe6665ed3c |
line wrap: on
line diff
--- a/libinterp/dldfcn/urlwrite.cc +++ b/libinterp/dldfcn/urlwrite.cc @@ -200,6 +200,11 @@ setopt (CURLOPT_NOBODY, 0); + // Restore the default HTTP request method to GET after setting + // NOBODY to true and back to false. This is needed for backward + // compatibility with versions of libcurl < 7.18.2. + setopt (CURLOPT_HTTPGET, 1); + // Don't need to store the parameters here as we can't change // the URL after the handle is created std::string query_string = form_query_string (param);