diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-06-24 23:34:51 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-06-24 23:34:51 +0200 |
commit | f87a3d736f3200029c8bed3ab4dad50f9680be7a (patch) | |
tree | 7db1fde8016a6f576d7cba006365f461aaee00d0 /docs/libcurl | |
parent | bf5218c85eba8d13c6c40a8047b8018b4ff5f1ed (diff) | |
parent | f44b803f1605edcfc4058b1a818c44552f0affec (diff) | |
download | curl-http2-push.tar.gz |
Merge branch 'master' into http2-pushhttp2-push
Diffstat (limited to 'docs/libcurl')
-rw-r--r-- | docs/libcurl/curl_easy_cleanup.3 | 7 | ||||
-rw-r--r-- | docs/libcurl/curl_easy_duphandle.3 | 6 | ||||
-rw-r--r-- | docs/libcurl/curl_easy_setopt.3 | 4 | ||||
-rw-r--r-- | docs/libcurl/curl_multi_info_read.3 | 3 | ||||
-rw-r--r-- | docs/libcurl/libcurl-errors.3 | 4 | ||||
-rw-r--r-- | docs/libcurl/libcurl-multi.3 | 2 | ||||
-rw-r--r-- | docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 | 26 |
7 files changed, 39 insertions, 13 deletions
diff --git a/docs/libcurl/curl_easy_cleanup.3 b/docs/libcurl/curl_easy_cleanup.3 index 403bfd35a..e8cd55095 100644 --- a/docs/libcurl/curl_easy_cleanup.3 +++ b/docs/libcurl/curl_easy_cleanup.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -63,5 +63,6 @@ if(curl) { } .fi .SH "SEE ALSO" -.BR curl_easy_init "(3), " - +.BR curl_easy_init "(3), " curl_easy_duphandle "(3), " +.BR curl_easy_reset "(3), " +.BR curl_multi_cleanup "(3), " curl_multi_remove_handle "(3) " diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3 index 080723a1b..34cba58c4 100644 --- a/docs/libcurl/curl_easy_duphandle.3 +++ b/docs/libcurl/curl_easy_duphandle.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -47,4 +47,6 @@ in a synchronous way, the input handle may not be in use when cloned. If this function returns NULL, something went wrong and no valid handle was returned. .SH "SEE ALSO" -.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)" +.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_reset "(3)," +.BR curl_global_init "(3)" + diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 4e5b8dec1..a9a6230f2 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -50,6 +50,8 @@ really \fICURLOPT_POSTFIELDS(3)\fP, but the alternative that copies the string \fICURLOPT_COPYPOSTFIELDS(3)\fP has some usage characteristics you need to read up on. +The order in which the options are set does not matter. + Before version 7.17.0, strings were not copied. Instead the user was forced keep them available until libcurl no longer needed them. @@ -291,6 +293,8 @@ Disable Content decoding. See \fICURLOPT_HTTP_CONTENT_DECODING(3)\fP Disable Transfer decoding. See \fICURLOPT_HTTP_TRANSFER_DECODING(3)\fP .IP CURLOPT_EXPECT_100_TIMEOUT_MS 100-continue timeout. See \fICURLOPT_EXPECT_100_TIMEOUT_MS(3)\fP +.IP CURLOPT_PIPEWAIT +Wait on connection to pipeline on it. See \fICURLOPT_PIPEWAIT(3)\fP .SH SMTP OPTIONS .IP CURLOPT_MAIL_FROM Address of the sender. See \fICURLOPT_MAIL_FROM(3)\fP diff --git a/docs/libcurl/curl_multi_info_read.3 b/docs/libcurl/curl_multi_info_read.3 index bdf89863f..03be341b2 100644 --- a/docs/libcurl/curl_multi_info_read.3 +++ b/docs/libcurl/curl_multi_info_read.3 @@ -69,6 +69,7 @@ that just completed. At this point, there are no other \fBmsg\fP types defined. .SH EXAMPLE +.nf struct CURLMsg *m; /* call curl_multi_perform or curl_multi_socket_action first, then loop @@ -84,7 +85,7 @@ do { curl_easy_cleanup(e); } } while(m); - +.fi .SH "RETURN VALUE" A pointer to a filled-in struct, or NULL if it failed or ran out of structs. It also writes the number of messages left in the queue (after this diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3 index 07091b5e5..3828996f8 100644 --- a/docs/libcurl/libcurl-errors.3 +++ b/docs/libcurl/libcurl-errors.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -74,7 +74,7 @@ After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned. .IP "CURLE_FTP_ACCEPT_TIMEOUT (12)" During an active FTP session while waiting for the server to connect, the -\fICURLOPT_ACCEPTTIMOUT_MS(3)\fP (or the internal default) timeout expired. +\fICURLOPT_ACCEPTTIMEOUT_MS(3)\fP (or the internal default) timeout expired. .IP "CURLE_FTP_WEIRD_PASV_REPLY (13)" libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed. diff --git a/docs/libcurl/libcurl-multi.3 b/docs/libcurl/libcurl-multi.3 index 770d4a561..f77c366a2 100644 --- a/docs/libcurl/libcurl-multi.3 +++ b/docs/libcurl/libcurl-multi.3 @@ -136,7 +136,7 @@ normal multi interface. Then you also set two callbacks with the CURLMOPT_SOCKETFUNCTION and CURLMOPT_TIMERFUNCTION options to \fIcurl_multi_setopt(3)\fP. They are two callback functions that libcurl will call with information about what sockets to wait for, and for what activity, -and what the curret timeout time is - if that expires libcurl should be +and what the current timeout time is - if that expires libcurl should be notified. The multi_socket API is designed to inform your application about which diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 index 577202cfc..2d4dc2350 100644 --- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 +++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 @@ -51,15 +51,33 @@ All .nf curl = curl_easy_init(); if(curl) { - char error[CURL_ERROR_SIZE] + CURLcode res; + char errbuf[CURL_ERROR_SIZE]; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* provide a buffer to store errors in */ - curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error); + curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errbuf); - /* Perform the request */ - curl_easy_perform(curl); + /* set the error buffer as empty before performing a request */ + errbuf[0] = 0; + + /* perform the request */ + res = curl_easy_perform(curl); + + /* if the request did not complete correctly, show the error + information. if no detailed error information was written to errbuf + show the more generic information from curl_easy_strerror instead. + */ + if(res != CURLE_OK) { + size_t len = strlen(errbuf); + fprintf(stderr, "\\nlibcurl: (%d) ", res); + if(len) + fprintf(stderr, "%s%s", errbuf, + ((errbuf[len - 1] != '\\n') ? "\\n" : "")); + else + fprintf(stderr, "%s\\n", curl_easy_strerror(res)); + } } .fi .SH AVAILABILITY |