Jay Satiro
d4e40f0690
scripts: allow all perl scripts to be run directly
...
- Enable execute permission (chmod +x)
- Change interpreter to /usr/bin/env perl
Closes https://github.com/curl/curl/pull/2222
2018-01-07 15:42:11 -05:00
Jay Satiro
a0f3eaf25d
examples/cacertinmem: ignore cert-already-exists error
...
- Ignore X509_R_CERT_ALREADY_IN_HASH_TABLE errors in the CTX callback
since it's possible the cert may have already been loaded by libcurl.
- Remove the EXAMPLE code in the CURLOPT_SSL_CTX_FUNCTION.3 doc.
Instead have it direct the reader to this cacertinmem.c example.
- Fix the CA certificate to use the right CA for example.com, Digicert.
Bug: https://curl.haxx.se/mail/lib-2017-12/0057.html
Reported-by: Thomas van Hesteren
Closes https://github.com/curl/curl/pull/2182
2017-12-26 02:08:35 -05:00
Mattias Fornander
b437557896
examples/rtsp: fix error handling macros
...
Closes https://github.com/curl/curl/pull/2185
2017-12-22 02:59:08 -05:00
Daniel Stenberg
7ef0c2d861
examples/smtp-mail.c: use separate defines for options and mail
...
... to make it clearer that the options want address-only, while the
headers in an email can also have the real name.
Assisted-by: Sean MacLennan
2017-12-12 15:28:05 +01:00
Daniel Stenberg
bb0ca2d443
examples: move threaded-shared-conn.c to the "complicated" ones
...
... due it relying on pthreads to link.
2017-12-06 14:49:58 +01:00
Daniel Stenberg
415b8dff8e
threaded-shared-conn.c: fixed typo in commenta
2017-12-05 23:35:08 +01:00
Daniel Stenberg
5254d8bf27
threaded-shared-conn.c: new example
2017-12-05 23:31:47 +01:00
Daniel Stenberg
744ee58386
examples/xmlstream.c: don't switch off CURL_GLOBAL_SSL
...
Reported-by: Dima Tisnek
2017-12-01 07:52:24 +01:00
Daniel Stenberg
ed22d8654b
examples/rtsp: clear RANGE again after use
...
Fixes #2106
Reported-by: youngchopin on github
2017-11-23 08:06:44 +01:00
fmmedeiros
297516e12c
examples/curlx: Fix code style
...
- Add braces around multi-line if statement.
Closes https://github.com/curl/curl/pull/2096
2017-11-18 14:04:33 -05:00
Daniel Stenberg
3d1280866a
examples: add shared-connection-cache
2017-11-09 11:07:44 +01:00
Daniel Stenberg
edd1f45c9f
test1554: verify connection cache sharing
2017-11-09 11:07:44 +01:00
Daniel Stenberg
c3e58d93de
examples: bring back curl_formadd-using examples
...
... now with a -formadd suffix. While the new mime API is introduced in
7.56.0 we must acknowledge that lots of users can't upgrade their curl
versions immediately.
2017-10-03 07:59:55 +02:00
Patrick Monnerat
ee56fdb691
form/mime: field names are not allowed to contain zero-valued bytes.
...
Also suppress length argument of curl_mime_name() (names are always
zero-terminated).
2017-09-22 01:08:29 +01:00
Marcel Raad
5d916944ae
examples/post-callback: use long for CURLOPT_POSTFIELDSIZE
...
Otherwise, typecheck-gcc.h warns on MinGW-w64.
2017-09-21 20:07:24 +02:00
Daniel Stenberg
20acb58a38
code style: use space after semicolon
2017-09-12 09:50:24 +02:00
Daniel Stenberg
e5743f08e7
code style: use spaces around pluses
2017-09-11 09:29:50 +02:00
Daniel Stenberg
6b84438d9a
code style: use spaces around equals signs
2017-09-11 09:29:50 +02:00
Viktor Szakats
25fc694a41
examples/mime: minor example code fixes
2017-09-05 10:05:27 +00:00
Viktor Szakats
841a09ea19
mime: use CURL_ZERO_TERMINATED in examples
...
and some minor whitespace fixes
2017-09-04 13:58:10 +00:00
Daniel Stenberg
12e789391d
examples/post-callback: stop returning one byte at a time
...
... since people copy and paste code from this example and thus they get
an inefficient POST operation without a good reason and sometimes
without understanding why.
Instead this now returns as much data as possible.
2017-09-04 11:42:00 +02:00
Patrick Monnerat
1a3f4c1991
mime: remove support "-" stdin pseudo-file name in curl_mime_filedata().
...
This feature is badly supported in Windows: as a replacement, a caller has
to use curl_mime_data_cb() with fread, fseek and possibly fclose
callbacks to process opened files.
The cli tool and documentation are updated accordingly.
The feature is however kept internally for form API compatibility, with
the known caveats it always had.
As a side effect, stdin size is not determined by the cli tool even if
possible and this results in a chunked transfer encoding. Test 173 is
updated accordingly.
2017-09-03 14:45:43 +01:00
Patrick Monnerat
3baf36edf6
mime: tests and examples.
...
Additional mime-specific tests.
Existing tests updated to reflect small differences (Expect: 100-continue,
data size change due to empty lines, etc).
Option -F headers= keyword added to tests.
test1135 disabled until the entry point order change is resolved.
New example smtp-mime.
Examples postit2 and multi-post converted from form API to mime API.
2017-09-02 19:08:45 +01:00
Kamil Dudka
7ec797b13a
examples/sslbackend.c: fix failure of 'make checksrc'
...
./sslbackend.c:58:3: warning: else after closing brace on same line (BRACEELSE)
} else if(isdigit(*name)) {
^
./sslbackend.c:62:3: warning: else after closing brace on same line (BRACEELSE)
} else
^
2017-08-30 14:16:35 +02:00
Johannes Schindelin
a34e141c09
docs/examples: demonstrate how to select SSL backends
...
The newly-introduced curl_global_sslset() function deserves to be
show-cased.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2017-08-28 14:56:59 +02:00
Daniel Stenberg
e37ab949b2
examples/threaded-ssl: mention that this is for openssl before 1.1
2017-08-25 08:15:59 +02:00
Jay Satiro
d18941ea17
examples/ftpuploadresume: checksrc compliance
2017-08-16 14:44:50 -04:00
Daniel Stenberg
adc35a4f19
examples/ftpuploadresume.c: use portable code
...
... converted from the MS specific _snscanf()
2017-08-14 14:01:29 +02:00
Marcel Raad
ce2cc568f8
Makefile.m32: enable -W for MinGW32 build
...
The configure-based build also has this in addition to -Wall.
Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:32:22 +02:00
Daniel Stenberg
73a2fcea0b
includes: remove curl/curlbuild.h and curl/curlrules.h
...
Rely entirely on curl/system.h now.
Introduced in Aug 2008 with commit 14240e9e10
. Now gone.
Fixes #1456
2017-06-14 11:07:33 +02:00
Ryuichi KAWAMATA
bc164de7b3
examples/multi-uv.c: fix deprecated symbol
...
Closes #1557
2017-06-08 23:23:59 +02:00
Daniel Stenberg
efc7c1d86f
typecheck-gcc.h: check CURLINFO_CERTINFO
...
... and update the certinfo.c example accordingly.
Fixes https://github.com/curl/curl/issues/846
2017-06-01 21:06:09 +02:00
Daniel Stenberg
c5de7f50f7
examples/externalsocket.c: s/closesocket/closecb
...
... since closesocket is a function in WinSock.
Reported-by: Marcel Raad
Bug: 55fcb84859 (co)
mmitcomment-22347818
2017-05-31 23:22:46 +02:00
Daniel Stenberg
501b9ebe92
examples/sampleconv.c: indent changes, made callbacks static
2017-05-31 11:56:53 +02:00
Daniel Stenberg
55fcb84859
example/externalsocket.c: make it use CLOSESOCKETFUNCTION too
2017-05-31 11:56:53 +02:00
Marcel Raad
b4d87f54d6
examples: fix Wimplicit-fallthrough warnings
...
This is contained in -Wextra with GCC 7.
2017-05-24 11:56:38 +02:00
Daniel Stenberg
e5491e0f9c
ghiper.c/hiperfifo.c: add comment about missing timer functionality
...
It takes someone to read up on the APIs of these libraries to figure out
how to do this correctly.
Reported-by: Michael Kaufmann
Closes #1253
2017-05-19 14:25:16 +02:00
Daniel Stenberg
d6bb1f1d56
asiohiper.cpp / evhiperfifo.c: deal with negative timerfunction input
...
That means delete the timer.
Reported-by: Michael Kaufmann
Ref: #1253
2017-05-19 14:16:37 +02:00
Marcel Raad
77b90997dd
cookie_interface: fix -Wcomma warning
...
clang 5.0 complains:
possible misuse of comma operator here [-Wcomma]
2017-05-11 10:04:01 +02:00
Marcel Raad
d99acd937a
sendrecv: fix MinGW-w64 warning
...
The first argument to select is an int, while curl_socket_t is
unsigned long long when using WinSock. It's ignored anyway [1].
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141.aspx
2017-05-07 22:14:28 +02:00
Marcel Raad
35311b22b9
anyauthput: remove unused code
...
The definition of TRUE was introduced in
4a728747e6
and is not used anymore since
e664cd5826
.
The usage of intptr_t was removed in
32e38b8f42
.
2017-05-01 21:51:02 +02:00
Dan Fandrich
6cba8dacea
examples: fixed too long line and too long string warnings
2017-05-01 09:16:12 +02:00
Marcel Raad
c23177d5e9
examples: declare TU-local variables static
...
This fixes missing-variable-declarations warnings when building with
clang.
2017-04-30 23:29:31 +02:00
Daniel Stenberg
7543f28ad2
cookie_interface.c: changed the other domain to example.com too
2017-04-27 00:30:34 +02:00
Daniel Stenberg
afe05ee2ee
cookie_interface.c: fix cookie domain so the example works
2017-04-27 00:27:59 +02:00
Daniel Stenberg
e7f8ac1945
examples: ftpuploadfrommem.c
...
Uploads data to an FTP site, directly from memory.
Closes #1451
2017-04-25 20:53:46 +02:00
Jay Satiro
041ded0459
examples/fopen: checksrc compliance
2017-03-28 02:55:14 -04:00
klemens
f7df67cff0
spelling fixes
...
Closes #1356
2017-03-26 23:56:23 +02:00
Edward Kimmel
99d708a016
asiohiper: make sure socket is open in event_cb
...
Send curl_socket_t to event_cb and make sure it hasn't been closed yet.
Closes https://github.com/curl/curl/pull/1318
2017-03-23 22:58:29 +01:00
Daniel Stenberg
26baf39f3d
examples: comment typos in http2 examples
2017-03-21 12:55:46 +01:00