1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

41 Commits

Author SHA1 Message Date
Patrick Monnerat
ce0881edee mime: new MIME API.
Available in HTTP, SMTP and IMAP.
Deprecates the FORM API.
See CURLOPT_MIMEPOST.
Lib code and associated documentation.
2017-09-02 17:47:10 +01:00
Marcel Raad
ec512074cc
typecheck-gcc: add support for CURLINFO_OFF_T
typecheck-gcc expected curl_socket_t instead of curl_off_t arguments
for CURLINFO_OFF_T. Detected by test1521, unfortunately only when run
locally.

Closes https://github.com/curl/curl/pull/1592
2017-06-21 12:24:22 +02:00
Daniel Stenberg
b8085f493a typecheck-gcc: allow CURLOPT_STDERR to be NULL too 2017-06-05 14:56:26 +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
4eafc6c249 typecheck-gcc.h: check CURLINFO_TLS_SSL_PTR and CURLINFO_TLS_SESSION
... so that they get the required "struct curl_tlssessioninfo **"
arguments.
2017-06-01 21:06:09 +02:00
Daniel Stenberg
5fe4f78902 typecheck-gcc.h: separate getinfo slist checks from other pointers
Fixes #1524
2017-06-01 21:06:09 +02:00
Marcel Raad
fa12f54bba
typecheck-gcc: add support for CURLINFO_SOCKET
Closes https://github.com/curl/curl/pull/1452
2017-05-03 18:30:21 +02:00
Marcel Raad
3ff0d2fb00
typecheck-gcc: add missing string options
Closes https://github.com/curl/curl/pull/1452
2017-05-03 18:30:19 +02:00
Marcel Raad
9c5aed1852
typecheck-gcc: fix _curl_is_slist_info
Info values starting with CURLINFO_SOCKET expect a curl_socket_t, not a
curl_slist argument.

This fixes the following GCC warning when building the examples with
--enable-optimize:

../../include/curl/typecheck-gcc.h:126:42: warning: call to
‘_curl_easy_getinfo_err_curl_slist’ declared with attribute warning:
curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this
info [enabled by default]
sendrecv.c:90:11: note: in expansion of macro ‘curl_easy_getinfo’
res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);

Closes https://github.com/curl/curl/pull/1447
2017-04-25 11:17:50 +02:00
Marcel Raad
cbb59ed9ce
typecheck-gcc: handle function pointers properly
All the callbacks passed to curl_easy_setopt are defined as function
pointers. The possibility to pass both functions and function pointers
was handled for the callbacks that typecheck-gcc.h defined as
compatible, but not for the public callback types themselves.

This makes all compatible callback types defined in typecheck-gcc.h
function pointers too and checks all functions uniformly with
_curl_callback_compatible, which handles both functions and function
pointers.

A symptom of the problem was a warning in tool_operate.c with
--disable-libcurl-option and without --enable-debug as that file
passes the callback functions to curl_easy_setopt directly.

Fixes https://github.com/curl/curl/issues/1403
Closes https://github.com/curl/curl/pull/1404
2017-04-21 23:18:59 +02:00
Isaac Boukris
1d786faee1 unix_socket: add support for abstract unix domain socket
In addition to unix domain sockets, Linux also supports an
abstract namespace which is independent of the filesystem.

In order to support it, add new CURLOPT_ABSTRACT_UNIX_SOCKET
option which uses the same storage as CURLOPT_UNIX_SOCKET_PATH
internally, along with a flag to specify abstract socket.

On non-supporting platforms, the abstract address will be
interpreted as an empty string and fail gracefully.

Also add new --abstract-unix-socket tool parameter.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reported-by: Chungtsun Li (typeless)
Reviewed-by: Daniel Stenberg
Reviewed-by: Peter Wu
Closes #1197
Fixes #1061
2017-01-13 16:25:20 +01:00
Daniel Stenberg
b228d2952b checksrc: stricter no-space-before-paren enforcement
In order to make the code style more uniform everywhere
2016-12-13 23:39:11 +01:00
Daniel Stenberg
8657c268e1 checksrc: white space edits to comply to stricter checksrc 2016-11-24 23:58:22 +01:00
Daniel Stenberg
dbadaebfc4 checksrc: code style: use 'char *name' style 2016-11-24 23:58:22 +01:00
Daniel Stenberg
4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Daniel Stenberg
796c6ef02b typecheck-gcc.h: add missing slist-using options
CURLOPT_RESOLVE and CURLOPT_PROXYHEADER were missing

Also sorted the list.
2015-11-13 23:19:19 +01:00
Daniel Stenberg
60cf8157c7 typecheck-gcc.h: added CURLOPT_CLOSESOCKETDATA
... and sorted curl_is_cb_data_option alphabetically
2015-11-13 23:12:48 +01:00
Daniel Stenberg
fd0c678e21 typecheck-gcc.h: add some missing string types
Also sorted that list alphabetically
2015-11-13 16:53:17 +01:00
Linus Nielsen
97c272e5d1 Negotiate: custom service names for SPNEGO.
* Add new options, CURLOPT_PROXY_SERVICE_NAME and CURLOPT_SERVICE_NAME.
* Add new curl options, --proxy-service-name and --service-name.
2015-04-28 08:29:56 +02:00
Daniel Stenberg
5fcef972b2 curl.h: reverse the enum/define setup for old symbols
We now provide the "real" names in the CINIT() macro setup for CURLOPT_*
symbols, and we provide backwards compatibility defines for the old
symbols as defines instead of vice versa.

This allows us to better use the CINIT() list to check for existing and
current option names.
2014-06-17 10:02:41 +02:00
Daniel Stenberg
169fedbdce login options: remove the ;[options] support from CURLOPT_USERPWD
To avoid the regression when users pass in passwords containing semi-
colons, we now drop the ability to set the login options with the same
options. Support for login options in CURLOPT_USERPWD was added in
7.31.0.

Test case 83 was modified to verify that colons and semi-colons can be
used as part of the password when using -u (CURLOPT_USERPWD).

Bug: http://curl.haxx.se/bug/view.cgi?id=1311
Reported-by: Petr Bahula
Assisted-by: Steve Holme
Signed-off-by: Daniel Stenberg <daniel@haxx.se>
2013-12-14 22:40:37 +01:00
Steve Holme
f2584627c8 curl_easy_setopt: Added the ability to set the login options separately
Rather than set the authentication options as part of the login details
specified in the URL, or via the older CURLOPT_USERPWD option, added a
new libcurl option to allow the login options to be set separately.
2013-11-12 19:08:55 +00:00
Kim Vandry
df69440d05 libcurl: New options to bind DNS to local interfaces or IP addresses 2013-09-12 21:11:47 +02:00
Kyle L. Huff
06c1bea72f options: added basic SASL XOAUTH2 support
Added the ability to specify an XOAUTH2 bearer token [RFC6750] via the
option CURLOPT_XOAUTH2_BEARER for authentication using RFC6749 "OAuth
2.0 Authorization Framework".
2013-08-25 22:03:57 +01:00
Jonathan Nieder
8b63b48627 headers: surround GCC attribute names with double underscores
This protects from attribute names being defined by third party's code.

Improvement: http://curl.haxx.se/mail/lib-2012-04/0127.html
2012-04-14 15:06:57 +02:00
Dave Reisner
62bcf005f4 typecheck: allow NULL to unset CURLOPT_ERRORBUFFER
There might be situations where a user would want to unset this option.
Avoid forcing him/her to cast the NULL argument to (char *) in order to
get past the compile time typecheck.
2011-10-15 23:59:22 +02:00
Guenter Knauf
a1087db5c6 Added unsigned char* to _curl_is_debug_cb. 2011-09-26 12:42:15 +02:00
Daniel Stenberg
2ef7a28a71 include: cleanup
Made the public headers checksrc compliant

Removed types.h (it's been unused since April 2004)

Made the root makefile do make in include by default as well, so that
TAGS and the checksrc will work better.
2011-05-09 10:20:31 +02:00
Daniel Stenberg
8e4fb01e64 transfer-encoding: added new option and cmdline
Added CURLOPT_TRANSFER_ENCODING as the option to set to request Transfer
Encoding in HTTP requests (if built zlib enabled). I also renamed
CURLOPT_ENCODING to CURLOPT_ACCEPT_ENCODING (while keeping the old name
around) to reduce the confusion when we have to encoding options for
HTTP.

--tr-encoding is now the new command line option for curl to request
this, and thus I updated the test cases accordingly.
2011-04-18 19:46:21 +02:00
Kamil Dudka
a6e088e855 typecheck-gcc: work around gcc upstream bug #32061
original bug report at https://bugzilla.redhat.com/617757
2010-08-12 23:56:49 +02:00
Daniel Stenberg
000ac0c975 typecheck-gcc: add checks for recently added options
I added all OBJECTPOINT curl_easy_setopt() options from 178 to 202. Left
to add: the five FUNCTIONPOINT (callbacks) options added since:

SSH_KEYFUNCTION
INTERLEAVEFUNCTION
CHUNK_BGN_FUNCTION
CHUNK_END_FUNCTION
FNMATCH_FUNCTION
2010-08-02 23:48:21 +02:00
Daniel Stenberg
2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Daniel Stenberg
5aeef9c1c8 - Craig A West brought CURLOPT_NOPROXY and the corresponding --noproxy option.
They basically offer the same thing the NO_PROXY environment variable only
  offered previously: list a set of host names that shall not use the proxy
  even if one is specified.
2009-01-25 23:26:25 +00:00
Yang Tse
98b13037e7 remove some spurious line-endings 2008-10-17 03:59:02 +00:00
Daniel Stenberg
a9a4300a36 - Igor Novoseltsev added CURLOPT_PROXYUSER and CURLOPT_PROXYPASSWORD that then
make CURLOPT_PROXYUSERPWD sort of deprecated. The primary motive for adding
  these new options is that they have no problems with the colon separator
  that the CURLOPT_PROXYUSERPWD option does.
2008-10-16 20:21:22 +00:00
Daniel Stenberg
08cf6780ba - Igor Novoseltsev brought a patch that introduced two new options to
curl_easy_setopt: CURLOPT_USERNAME and CURLOPT_PASSWORD that sort of
  deprecates the good old CURLOPT_USERPWD since they allow applications to set
  the user name and password independently and perhaps more importantly allow
  both to contain colon(s) which CURLOPT_USERPWD doesn't fully support.
2008-10-08 10:39:43 +00:00
Michal Marek
b8a9f19515 CURLOPT_CRLFILE and CURLOPT_ISSUERCERT are new string options 2008-06-09 11:13:19 +00:00
Patrick Monnerat
24bf52bc69 Adapting last changes to OS400:
_ Updated packages/OS400/curl.inc.in with new definitions.
_ New connect/bind/sendto/recvfrom wrappers to support AF_UNIX sockets.
_ Include files line length shortened below 100 chars.
_ Const parameter in lib/qssl.[ch].
_ Typos in packages/OS400/initscript.sh.
2008-05-20 10:21:50 +00:00
Michal Marek
6f3166c15b - Added curl_easy_getinfo typechecker.
- Added macros for curl_share_setopt and curl_multi_setopt to check at least
  the correct number of arguments.
2008-03-18 08:14:37 +00:00
Michal Marek
1380c9af9f Mark the statement expr with __extension__ so that gcc -pedantic doesn't emit
any hard-to-grasp warnings in curl_easy_setopt() calls in applications.
Also delete superfluous semicolons.
2008-03-17 14:22:10 +00:00
Michal Marek
7a8a20416f - Added a type checking macro for curl_easy_setopt(), needs gcc-4.3 and only
works in C mode atm (http://curl.haxx.se/mail/lib-2008-02/0267.html ,
  http://curl.haxx.se/mail/lib-2008-02/0292.html )
2008-03-11 07:37:40 +00:00