- also update two URLs outside of docs/examples
- fix spelling of filename persistant.c
- fix three long lines that started failing checksrc.pl

Closes https://github.com/curl/curl/pull/3036
This commit is contained in:
Viktor Szakats 2018-09-23 09:20:26 +00:00
Родитель c42849bb48
Коммит efc696a2e0
36 изменённых файлов: 114 добавлений и 113 удалений

Просмотреть файл

@ -3352,7 +3352,7 @@ fi
dnl Let's hope this split URL remains working: dnl Let's hope this split URL remains working:
dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \ dnl https://www15.software.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
dnl genprogc/thread_quick_ref.htm dnl genprogc/thread_quick_ref.htm

2
docs/examples/.gitignore поставляемый
Просмотреть файл

@ -46,7 +46,7 @@ multi-double
multi-formadd multi-formadd
multi-post multi-post
multi-single multi-single
persistant persistent
pop3-dele pop3-dele
pop3-list pop3-list
pop3-multi pop3-multi

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -35,54 +35,53 @@
#include <curl/multi.h> #include <curl/multi.h>
static const char *urls[] = { static const char *urls[] = {
"http://www.microsoft.com", "https://www.microsoft.com",
"http://www.opensource.org", "https://opensource.org",
"http://www.google.com", "https://www.google.com",
"http://www.yahoo.com", "https://www.yahoo.com",
"http://www.ibm.com", "https://www.ibm.com",
"http://www.mysql.com", "https://www.mysql.com",
"http://www.oracle.com", "https://www.oracle.com",
"http://www.ripe.net", "https://www.ripe.net",
"http://www.iana.org", "https://www.iana.org",
"http://www.amazon.com", "https://www.amazon.com",
"http://www.netcraft.com", "https://www.netcraft.com",
"http://www.heise.de", "https://www.heise.de",
"http://www.chip.de", "https://www.chip.de",
"http://www.ca.com", "https://www.ca.com",
"http://www.cnet.com", "https://www.cnet.com",
"http://www.news.com", "https://www.mozilla.org",
"http://www.cnn.com", "https://www.cnn.com",
"http://www.wikipedia.org", "https://www.wikipedia.org",
"http://www.dell.com", "https://www.dell.com",
"http://www.hp.com", "https://www.hp.com",
"http://www.cert.org", "https://www.cert.org",
"http://www.mit.edu", "https://www.mit.edu",
"http://www.nist.gov", "https://www.nist.gov",
"http://www.ebay.com", "https://www.ebay.com",
"http://www.playstation.com", "https://www.playstation.com",
"http://www.uefa.com", "https://www.uefa.com",
"http://www.ieee.org", "https://www.ieee.org",
"http://www.apple.com", "https://www.apple.com",
"http://www.symantec.com", "https://www.symantec.com",
"http://www.zdnet.com", "https://www.zdnet.com",
"http://www.fujitsu.com", "https://www.fujitsu.com/global/",
"http://www.supermicro.com", "https://www.supermicro.com",
"http://www.hotmail.com", "https://www.hotmail.com",
"http://www.ecma.com", "https://www.ietf.org",
"http://www.bbc.co.uk", "https://www.bbc.co.uk",
"http://news.google.com", "https://news.google.com",
"http://www.foxnews.com", "https://www.foxnews.com",
"http://www.msn.com", "https://www.msn.com",
"http://www.wired.com", "https://www.wired.com",
"http://www.sky.com", "https://www.sky.com",
"http://www.usatoday.com", "https://www.usatoday.com",
"http://www.cbs.com", "https://www.cbs.com",
"http://www.nbc.com", "https://www.nbc.com/",
"http://slashdot.org", "https://slashdot.org",
"http://www.bloglines.com", "https://www.informationweek.com",
"http://www.techweb.com", "https://apache.org",
"http://www.newslink.org", "https://www.un.org",
"http://www.un.org",
}; };
#define MAX 10 /* number of simultaneous transfers */ #define MAX 10 /* number of simultaneous transfers */

Просмотреть файл

@ -24,7 +24,7 @@
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput \ fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput \
https multi-app multi-debugcallback multi-double multi-post multi-single \ https multi-app multi-debugcallback multi-double multi-post multi-single \
persistant post-callback postit2 sepheaders simple simplepost simplessl \ persistent post-callback postit2 sepheaders simple simplepost simplessl \
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \ sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
smtp-mail smtp-mime smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn \ smtp-mail smtp-mime smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn \
rtsp externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl \ rtsp externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl \
@ -38,9 +38,9 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
# These examples require external dependencies that may not be commonly # These examples require external dependencies that may not be commonly
# available on POSIX systems, so don't bother attempting to compile them here. # available on POSIX systems, so don't bother attempting to compile them here.
COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \ COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \
ghiper.c hiperfifo.c htmltidy.c multithread.c opensslthreadlock.c \ ghiper.c hiperfifo.c htmltidy.c multithread.c opensslthreadlock.c \
sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \
multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c \ multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c \
threaded-shared-conn.c crawler.c ephiperfifo.c threaded-shared-conn.c crawler.c ephiperfifo.c

Просмотреть файл

@ -3,7 +3,7 @@
## Makefile for building curl.nlm (NetWare version - gnu make) ## Makefile for building curl.nlm (NetWare version - gnu make)
## Use: make -f Makefile.netware ## Use: make -f Makefile.netware
## ##
## Comments to: Guenter Knauf http://www.gknw.net/phpbb ## Comments to: Guenter Knauf
# #
################################################################# #################################################################

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -71,7 +71,7 @@ main(void)
if(curl) { if(curl) {
char nline[256]; char nline[256];
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/"); curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */ curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */
res = curl_easy_perform(curl); res = curl_easy_perform(curl);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -140,7 +140,7 @@ int main(void)
/* example.com is redirected, so we tell libcurl to follow redirection */ /* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
/* Check for errors */ /* Check for errors */
if(res != CURLE_OK) if(res != CURLE_OK)

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -33,7 +33,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/"); curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
if(CURLE_OK == res) { if(CURLE_OK == res) {

Просмотреть файл

@ -73,7 +73,7 @@ int main(void)
curl_handle = curl_easy_init(); curl_handle = curl_easy_init();
/* specify URL to get */ /* specify URL to get */
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.example.com/"); curl_easy_setopt(curl_handle, CURLOPT_URL, "https://www.example.com/");
/* send all data to this function */ /* send all data to this function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -35,7 +35,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* example.com is redirected, figure out the redirection! */ /* example.com is redirected, figure out the redirection! */

Просмотреть файл

@ -26,7 +26,7 @@
* </DESC> * </DESC>
*/ */
/* /*
* The HTML parser is found at http://code.google.com/p/htmlstreamparser/ * The HTML parser is found at https://github.com/arjunc77/htmlstreamparser
*/ */
#include <stdio.h> #include <stdio.h>

Просмотреть файл

@ -24,7 +24,7 @@
* </DESC> * </DESC>
*/ */
/* /*
* LibTidy => http://tidy.sourceforge.net * LibTidy => https://www.html-tidy.org/
*/ */
#include <stdio.h> #include <stdio.h>

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -59,7 +59,7 @@ int main(void)
handles[i] = curl_easy_init(); handles[i] = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */ /* set the options (I left out a few, you'll get the point anyway) */
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://example.com"); curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "https://example.com");
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com"); curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L); curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -136,7 +136,7 @@ int main(void)
http_handle = curl_easy_init(); http_handle = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */ /* set the options (I left out a few, you'll get the point anyway) */
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/"); curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace); curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L); curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -48,7 +48,7 @@ int main(void)
http_handle2 = curl_easy_init(); http_handle2 = curl_easy_init();
/* set options */ /* set options */
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/"); curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
/* set options */ /* set options */
curl_easy_setopt(http_handle2, CURLOPT_URL, "http://localhost/"); curl_easy_setopt(http_handle2, CURLOPT_URL, "http://localhost/");

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -73,7 +73,7 @@ int main(void)
if(curl && multi_handle) { if(curl && multi_handle) {
/* what URL that receives this POST */ /* what URL that receives this POST */
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi"); curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/upload.cgi");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -69,7 +69,7 @@ int main(void)
headerlist = curl_slist_append(headerlist, buf); headerlist = curl_slist_append(headerlist, buf);
/* what URL that receives this POST */ /* what URL that receives this POST */
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi"); curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/upload.cgi");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -59,7 +59,7 @@ int main(void)
http_handle = curl_easy_init(); http_handle = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */ /* set the options (I left out a few, you'll get the point anyway) */
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/"); curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
/* init a multi stack */ /* init a multi stack */
multi_handle = curl_multi_init(); multi_handle = curl_multi_init();

Просмотреть файл

@ -29,7 +29,7 @@
Requires libuv and (of course) libcurl. Requires libuv and (of course) libcurl.
See https://nikhilm.github.com/uvbook/ for more information on libuv. See https://nikhilm.github.io/uvbook/ for more information on libuv.
*/ */
#include <stdio.h> #include <stdio.h>

Просмотреть файл

@ -42,7 +42,7 @@
const char * const urls[NUMT]= { const char * const urls[NUMT]= {
"https://curl.haxx.se/", "https://curl.haxx.se/",
"ftp://cool.haxx.se/", "ftp://cool.haxx.se/",
"http://www.contactor.se/", "https://www.cag.se/",
"www.haxx.se" "www.haxx.se"
}; };

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -40,7 +40,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_HEADER, 1L); curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
/* get the first document */ /* get the first document */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* Perform the request, res will get the return code */ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
@ -51,7 +51,7 @@ int main(void)
/* get another document from the same server using the same /* get another document from the same server using the same
connection */ connection */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/docs/"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/docs/");
/* Perform the request, res will get the return code */ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl); res = curl_easy_perform(curl);

Просмотреть файл

@ -68,7 +68,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.org/"); curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.org/");
/* send all data to this function */ /* send all data to this function */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -82,7 +82,7 @@ int main(int argc, char *argv[])
headerlist = curl_slist_append(headerlist, buf); headerlist = curl_slist_append(headerlist, buf);
if(curl) { if(curl) {
/* what URL that receives this POST */ /* what URL that receives this POST */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/examplepost.cgi");
if((argc == 2) && (!strcmp(argv[1], "noexpectheader"))) if((argc == 2) && (!strcmp(argv[1], "noexpectheader")))
/* only disable 100-continue header if explicitly requested */ /* only disable 100-continue header if explicitly requested */
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
wanted */ wanted */
headerlist = curl_slist_append(headerlist, buf); headerlist = curl_slist_append(headerlist, buf);
/* what URL that receives this POST */ /* what URL that receives this POST */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/examplepost.cgi");
if((argc == 2) && (!strcmp(argv[1], "noexpectheader"))) if((argc == 2) && (!strcmp(argv[1], "noexpectheader")))
/* only disable 100-continue header if explicitly requested */ /* only disable 100-continue header if explicitly requested */
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);

Просмотреть файл

@ -108,7 +108,7 @@ int main(void)
prog.lastruntime = 0; prog.lastruntime = 0;
prog.curl = curl; prog.curl = curl;
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
#if LIBCURL_VERSION_NUM >= 0x072000 #if LIBCURL_VERSION_NUM >= 0x072000
/* xferinfo was introduced in 7.32.0, no earlier libcurl versions will /* xferinfo was introduced in 7.32.0, no earlier libcurl versions will

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -38,12 +38,12 @@ int main(void)
PORT is the port number of the service where libcurl wants to connect to PORT is the port number of the service where libcurl wants to connect to
the HOST and ADDRESS is the numerical IP address the HOST and ADDRESS is the numerical IP address
*/ */
host = curl_slist_append(NULL, "example.com:80:127.0.0.1"); host = curl_slist_append(NULL, "example.com:443:127.0.0.1");
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_RESOLVE, host); curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
/* always cleanup */ /* always cleanup */

Просмотреть файл

@ -192,7 +192,8 @@ int main(int argc, char * const argv[])
char *base_name = NULL; char *base_name = NULL;
printf("\nRTSP request %s\n", VERSION_STR); printf("\nRTSP request %s\n", VERSION_STR);
printf(" Project web site: http://code.google.com/p/rtsprequest/\n"); printf(" Project web site: "
"https://github.com/BackupGGCode/rtsprequest\n");
printf(" Requires curl V7.20 or greater\n\n"); printf(" Requires curl V7.20 or greater\n\n");
/* check command line */ /* check command line */

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -94,7 +94,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* use platform-specific functions for codeset conversions */ /* use platform-specific functions for codeset conversions */
curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION, curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION,

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -76,7 +76,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Do not do the transfer - only connect to host */ /* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L); curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
res = curl_easy_perform(curl); res = curl_easy_perform(curl);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -49,7 +49,7 @@ int main(void)
curl_handle = curl_easy_init(); curl_handle = curl_easy_init();
/* set URL to get */ /* set URL to get */
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl_handle, CURLOPT_URL, "https://example.com");
/* no progress meter please */ /* no progress meter please */
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L); curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -33,7 +33,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* example.com is redirected, so we tell libcurl to follow redirection */ /* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);

Просмотреть файл

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -36,7 +36,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
/* if we don't provide POSTFIELDSIZE, libcurl will strlen() by /* if we don't provide POSTFIELDSIZE, libcurl will strlen() by

Просмотреть файл

@ -64,7 +64,7 @@ size_t write_file(void *ptr, size_t size, size_t nmemb, FILE *stream)
return fwrite(ptr, size, nmemb, stream); return fwrite(ptr, size, nmemb, stream);
} }
/* http://xoap.weather.com/weather/local/46214?cc=*&dayf=5&unit=i */ /* https://weather.com/weather/today/l/46214?cc=*&dayf=5&unit=i */
void *pull_one_url(void *NaN) void *pull_one_url(void *NaN)
{ {
CURL *curl; CURL *curl;

Просмотреть файл

@ -63,8 +63,10 @@
* webserver provide Cache-Control to prevent caching. * webserver provide Cache-Control to prevent caching.
* *
* References: * References:
* https://web.archive.org/web/20100228012139/tf.nist.gov/timefreq/service/its.htm * https://web.archive.org/web/20100228012139/ \
* https://web.archive.org/web/20100409024302/tf.nist.gov/timefreq/service/firewall.htm * tf.nist.gov/timefreq/service/its.htm
* https://web.archive.org/web/20100409024302/ \
* tf.nist.gov/timefreq/service/firewall.htm
* *
* Usage: * Usage:
* This software will synchronise your computer clock only when you issue * This software will synchronise your computer clock only when you issue

Просмотреть файл

@ -25,7 +25,7 @@
*/ */
/* Written by David Strauss /* Written by David Strauss
* *
* Expat => http://www.libexpat.org/ * Expat => https://libexpat.github.io/
* *
* gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream * gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream
* *
@ -131,7 +131,7 @@ int main(void)
curl_global_init(CURL_GLOBAL_DEFAULT); curl_global_init(CURL_GLOBAL_DEFAULT);
curl_handle = curl_easy_init(); curl_handle = curl_easy_init();
curl_easy_setopt(curl_handle, CURLOPT_URL, curl_easy_setopt(curl_handle, CURLOPT_URL,
"http://www.w3schools.com/xml/simple.xml"); "https://www.w3schools.com/xml/simple.xml");
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, parseStreamCallback); curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, parseStreamCallback);
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)parser); curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)parser);

Просмотреть файл

@ -14,7 +14,7 @@ The AIX Toolbox setup (installs into /opt/freeware, with symlinks in
/usr/bin,/usr/lib,/usr/include) are based on IBM's aixtoolbox spec /usr/bin,/usr/lib,/usr/include) are based on IBM's aixtoolbox spec
file written by David Clissold <cliss@austin.ibm.com>, see file written by David Clissold <cliss@austin.ibm.com>, see
ftp://ftp.software.ibm.com/aixtoolbox/SPECS/curl-7.9.3-2.spec https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SPECS/curl-7.61.0-1.spec
This spec file is designed to be a drop-in replacement for the This spec file is designed to be a drop-in replacement for the
old spec file found at the above link. Thus, like the old spec file old spec file found at the above link. Thus, like the old spec file
@ -30,4 +30,3 @@ Lastly, the spec file expects the Curl source distribution file to be
in .tar.bz2 format. in .tar.bz2 format.
The nifty curl header of this README is a ripoff of the vms/readme file. The nifty curl header of this README is a ripoff of the vms/readme file.