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

1455 Commits

Author SHA1 Message Date
Yang Tse
ffb67599b3 build: remove tool_cb_skt.[ch] references 2012-03-18 05:35:30 +01:00
Yang Tse
804da995c5 tool_setopt.c: more OOM handling fixes 2012-03-17 20:55:15 +01:00
Yang Tse
862bb7bade tool_setopt.c: fix OOM handling 2012-03-16 20:10:08 +01:00
Yang Tse
b329fc7023 fix several compiler warnings 2012-03-16 20:06:18 +01:00
Yang Tse
8af4b657d0 fix some compiler warnings 2012-03-16 19:06:34 +01:00
Colin Hogben
9954242980 Generate lists and use symbols in --libcurl code output.
This patch improves the output of curl's --libcurl option by
generating code which builds curl_httppost and curl_slist lists, and
uses symbolic names for enum and flag values.  Variants of the
my_setopt macro in tool_setopt.h are added in order to pass extra type
information to the code-generation step in tool_setopt.c.

If curl is configured with --disable-libcurl-option then the macros
call curl_easy_setopt directly.
2012-02-23 22:32:57 +01:00
Steve Holme
a053560cfa curl: Added support for --mail-auth
Added an extra command-line argument to support the optional AUTH
parameter in SMTPs MAIL FROM command.
2012-02-16 13:19:47 +01:00
Colin Hogben
2b26eb9857 configure: add option disable --libcurl output 2012-02-13 22:36:10 +01:00
Alessandro Ghedini
e71ac0c6fa curl tool: allow negative numbers as option values
Fix the str2num() function to not check if the input string starts with a
digit, since strtol() supports numbers prepended with '-' (and '+') too.
This makes the --max-redirs option work as documented.
2012-02-13 19:58:23 +01:00
Kamil Dudka
ebf3138992 nss: add support for the CURLSSLOPT_ALLOW_BEAST option
... and fix some typos from the 62d15f1 commit.
2012-02-09 23:25:55 +01:00
Daniel Stenberg
62d15f159e --ssl-allow-beast added
This new option tells curl to not work around a security flaw in the
SSL3 and TLS1.0 protocols. It uses the new libcurl option
CURLOPT_SSL_OPTIONS with the CURLSSLOPT_ALLOW_BEAST bit set.
2012-02-09 22:28:58 +01:00
Dave Reisner
2a266c1c7c curl: use new library-side TCP_KEEPALIVE options
Use the new library CURLOPT_TCP_KEEPALIVE rather than disabling this via
the sockopt callback. If --keepalive-time is used, apply the value to
CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL.
2012-02-09 19:05:40 +01:00
Yang Tse
4405039fdc curl tool: allow glob-loops to abort again upon critical errors
This prevents clobbering of non recoverable error return codes while
retaining intended functionality of commit 65103efe
2012-02-07 22:10:01 +01:00
Daniel Stenberg
65103efe49 curl tool: don't abort glob-loop due to failures
We want to continue to the next URL to try even on failures returned
from libcurl. This makes -f with ranges still get subsequent URLs even
if occasional ones return error. This was a regression as it used to
work and broke in the 7.23.0 release.

Added test case 1328 to verify the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3481223
Reported by: Juan Barreto
2012-02-06 16:52:17 +01:00
Colin Hogben
51c485342b Remove bogus optimisation of telnet upload.
Remove wrongly implemented optimisation of telnet upload, apparently
intended to allow the library to avoid manually polling for input.
2012-01-18 22:17:46 +01:00
Yang Tse
3a55daee3d tool_formparse.c: fix compiler warning: enumerated type mixed with another type 2012-01-04 19:11:55 +01:00
Yang Tse
ed0364343d removed trailing whitespace 2011-12-30 03:36:18 +01:00
Daniel Stenberg
b0eb963bc7 operate: removed a single trailing space 2011-12-21 21:17:34 +01:00
Dan Fandrich
2cf9e78a22 --retry: Retry transfers on timeout and DNS errors 2011-12-21 11:09:09 -08:00
Daniel Stenberg
7b8590d1f5 curl -F: fix multiple file upload with custom type
Test case 1315 was added to verify this functionality. When passing in
multiple files to a single -F, the parser would get all confused if one
of the specified files had a custom type= assigned.

Reported by: Colin Hogben
2011-12-16 11:43:25 +01:00
Yang Tse
97d7a9260e tvdiff_secs(): sub-zero time difference adjustment
Skip a floating point addition operation when integral part of time difference
is zero. This avoids potential floating point addition rounding problems while
preserving decimal part value.
2011-11-25 13:51:55 +01:00
Daniel Stenberg
c532604b13 -J -O: use -O name if no Content-Disposition header comes!
A regression between 7.22.0 and 7.23.0 -- downloading a file with the
flags -O and -J results in the content being written to stdout if and
only if there was no Content-Disposition header in the http response. If
there is a C-D header with a filename attribute, the output is correctly
written.

Reported by: Dave Reisner
Bug: http://curl.haxx.se/mail/archive-2011-11/0030.html
2011-11-20 23:35:49 +01:00
Daniel Stenberg
b9660dc4b2 FindWin32CACert: return OK even if CA cert isn't found
Bug: http://curl.haxx.se/mail/lib-2011-11/0180.html
Reported by: Mark Brand
2011-11-17 18:05:27 +01:00
Daniel Stenberg
10120e6ab5 progress_cb: avoid buffer overflow
The progress bar output function would blindly use the terminal width
without bounds checking. When using a very wide terminal that caused a
buffer overflow and segfault.

We now limit the max bar with to 255 columns, and I simplified the code
to avoid an extra snprintf and buffer.

Bug: http://curl.haxx.se/bug/view.cgi?id=3435710
Reported by: Alexey Zakhlestin
2011-11-11 19:57:49 +01:00
Yang Tse
5b57c54416 tool_cb_wrt.c: disambiguate warning message 2011-11-03 23:26:38 +01:00
Yang Tse
7fe9a50ab5 tool_cfgable.c: pending check done 2011-11-03 23:21:01 +01:00
Yang Tse
9cfc0c73a7 tool_cb_see.h: fix compiler warning 2011-11-01 12:53:23 +01:00
Yang Tse
49e3b2e03a setup.h: fix compiler warning 2011-10-31 22:42:43 +01:00
Daniel Stenberg
515f11e79b large headers: have curl accept >16K headers
As commit 5850cc4808 clarifies, libcurl can deliver header lines that
are longer than CURL_MAX_WRITE_SIZE, only body data is limited to that
size. The curl tool has check (when built debug-enabled) that made the
wrong checks and this new test 1205 verifies that larger headers work.
2011-10-24 17:28:41 +02:00
Yang Tse
cc76bbe79b tool_operate.c: OOM handling fix
Move curl_easy_perform source code geneartion out of curl_easy_perform's loop
for proper OOM handling and source code geneartion.
2011-10-22 14:49:02 +02:00
Daniel Stenberg
b229c8ca8b --show-error: position indepdenent
Previously we required that -S/--show-error was used _after_
-s/--silent. This was slightly confusing since we strive to make
arguments as position independent as possible.

Now, you can use them in any order and the result should still be the
same.

Bug: http://curl.haxx.se/bug/view.cgi?id=3424286
Reported by: Andreas Olsson
2011-10-16 23:39:59 +02:00
Yang Tse
17f48fe879 libcurl: some OOM handling fixes 2011-10-07 20:50:57 +02:00
Yang Tse
f7bfdbabf2 curl tool: reviewed code moved to tool_*.[ch] files 2011-10-06 17:39:00 +02:00
Yang Tse
4a57bf6d10 curl tool: fix compiler warning 2011-10-05 22:27:29 +02:00
Yang Tse
7296b2aa25 curl tool: OOM handling fixes 2011-10-05 22:01:42 +02:00
Yang Tse
6c849321d7 curl tool: reviewed code moved to tool_*.[ch] files 2011-10-05 20:16:16 +02:00
Yang Tse
0f19e0145a curl tool: OOM handling fixes 2011-10-05 19:33:46 +02:00
Yang Tse
ec73fd89ed curl tool: OOM handling fixes 2011-10-05 16:41:04 +02:00
Yang Tse
5bf0d74120 curl tool: OOM handling fixes 2011-10-05 15:06:26 +02:00
Yang Tse
fd87d9d2b9 curl tool: header inclusion adjustment 2011-10-05 12:40:30 +02:00
Yang Tse
0572ad6d01 curl tool: symbol check adjustment 2011-10-05 02:58:18 +02:00
Yang Tse
aa7d5b946a curl tool: header inclusion adjustment 2011-10-05 01:19:58 +02:00
Yang Tse
49b79b7631 curl tool: code moved to tool_*.[ch] files 2011-10-05 00:03:58 +02:00
Yang Tse
0435800f65 curl tool: reviewed code moved to tool_*.[ch] files 2011-10-03 23:00:47 +02:00
Yang Tse
7be872c389 curl tool: fix some more OOM handling 2011-09-30 21:10:58 +02:00
Yang Tse
ff5ba6e43d curl tool: adjust header callback single call write limit warning
Maximum amount of data a header callback is supposed to get in
a single call from libcurl is limited by the lowest value of
CURL_MAX_WRITE_SIZE and CURL_MAX_HTTP_HEADER.
2011-09-28 19:04:38 +02:00
Guenter Knauf
b4fccc1d8e Added SPNEGO to NetWare build. 2011-09-27 16:02:07 +02:00
Yang Tse
e2be8ceed9 curl tool: fix a compiler warning 2011-09-26 21:19:41 +02:00
Yang Tse
d439830621 curl tool: fix some OOM handling - f4853db5 follow-up 2011-09-26 13:44:24 +02:00
Yang Tse
f4853db5e6 curl tool: fix some OOM handling 2011-09-26 13:07:34 +02:00
Yang Tse
d9f686db88 remove short-lived CURL_WRITEFUNC_OUT_OF_MEMORY 2011-09-26 13:05:42 +02:00
Yang Tse
119f43360b allow write callbacks to indicate OOM to libcurl
Allow (*curl_write_callback) write callbacks to return
CURL_WRITEFUNC_OUT_OF_MEMORY to properly indicate libcurl of OOM conditions
inside the callback itself.
2011-09-25 19:05:46 +02:00
Guenter Knauf
230459dd00 NetWare makefile tweaks to select different builds. 2011-09-25 16:29:08 +02:00
Daniel Stenberg
745014b726 POST: always set postfieldsize
When we use binary posts and regular ones intermixed on a single command
line, we cannot do strlen() etc on the data to figure out the length
(when inserting '&' and more). We must therefore keep track of the post
data length. Then we also end up setting the libcurl option with the
known size, so that we don't risk that libcurl will do strlen() on the
data.

This has the minor side-effect that --libcurl source codes now always
will use CURLOPT_POSTFIELDSIZE but I don't consider that terribly
damaging.

Bug: http://curl.haxx.se/bug/view.cgi?id=3413181
Reported by: Taneli Vhkangas
2011-09-25 00:02:58 +02:00
Yang Tse
b3ea4881a8 curl tool: fix a compiler warning 2011-09-24 18:33:59 +02:00
Yang Tse
c6702c7d3f curl tool: reviewed code moved to tool_*.[ch] files 2011-09-24 17:40:46 +02:00
Yang Tse
081e289315 curl tool: fix some OOM handling issues 2011-09-24 05:33:41 +02:00
Yang Tse
fa775b56de curl tool: fix some OOM handling issues 2011-09-22 21:21:21 +02:00
Yang Tse
fb3845a438 curl tool: reviewed code moved to tool_*.[ch] files
my_setopt and my_setopt_str no longer ignores curl_easy_setopt result.

Fixed some OOM handling issues.
2011-09-22 21:21:20 +02:00
Yang Tse
28526ed6e0 curl tool: make my_setopt ignore curl_easy_setopt result again.
Related code not ready yet for this kind of checks.
2011-09-21 04:30:08 +02:00
Guenter Knauf
e4172d934d Changed suffix rules to pattern rules.
Suffix rules cannot have any prerequisites of their own.
2011-09-21 03:25:19 +02:00
Guenter Knauf
a6b69b64ad Some more MinGW build tweaks.
Added envvars to specify OpenSSL include, libpath and lib.
Added rule to create curlbuild.h from curlbuild.h.dist.
2011-09-21 02:06:05 +02:00
Yang Tse
9ecf53e154 curl tool: reviewed code moved to tool_*.[ch] files
my_setopt and my_setopt_str no longer ignores curl_easy_setopt result.

Fixed some OOM handling issues.
2011-09-21 01:54:14 +02:00
Yang Tse
84221006c9 curl tool: reviewed code moved to tool_*.[ch] files
Overhauled FindWin32CACert()
2011-09-20 15:59:19 +02:00
Guenter Knauf
a6c168b893 A bunch of MinGW build tweaks.
All paths to dependencies now quoted; synced examples makefile.
2011-09-20 15:05:28 +02:00
Guenter Knauf
98a61d8e2e Added _WIN32_WINNT define for IPv6 builds. 2011-09-20 11:59:49 +02:00
Yang Tse
49c35a7f9f curl tool: truly fix compiler warning 2011-09-19 20:27:25 +02:00
Yang Tse
57119495da curl tool: fix compiler warning 2011-09-19 19:45:58 +02:00
Yang Tse
fdecb56cbf curl tool: reviewed code moved to tool_*.[ch] files 2011-09-19 18:18:17 +02:00
Yang Tse
260b0f4d0c curl tool: create tool_myfunc.[ch] which later on will hold my_* functions
Additionally function my_useragent() now provides default User-Agent string
2011-09-18 01:59:25 +02:00
Yang Tse
f50d4647d0 curl tool: reorder free_config_fields() field handling
Reorder handling of fields to match same order as the one given by current
definition order of 'Configurable' struct fields. Fields currently not handled
marked for further inspection.
2011-09-18 01:59:21 +02:00
Guenter Knauf
805b4740c7 Fixed MinGW WinIDN lib dependency. 2011-09-17 17:59:35 +02:00
Yang Tse
a75888f1d3 tool_convert.c: fix no newline at end of file 2011-09-17 03:28:57 +02:00
Yang Tse
c0159d0edc curl tool: move 'Configurable' and free_config_fields() to tool_cfgable.[ch]
Reviewing fields being free'd in free_config_fields() still pending
2011-09-16 21:44:45 +02:00
Yang Tse
93579cc363 src/setup.h: add conditional include of assert.h 2011-09-16 21:12:32 +02:00
Yang Tse
4322d512ea curl tool: move so called 'multi_files' stuff into tool_mfiles.[ch]
Additionally some code reorganization and direct OOM handling fixes,
just another step towards fixing curl tool issues uncovered 2011-09-15
2011-09-16 19:46:01 +02:00
Yang Tse
e4819ae1ef curl tool: move convert_* functions into tool_convert.[ch]
Additionally fix data type of result vars for iconv() calls
2011-09-16 15:31:29 +02:00
Yang Tse
43c59765e1 main.c: convert GetStr() into a macro to ease leak debugging 2011-09-16 00:57:54 +02:00
Yang Tse
e533f59025 main.c: de-obfuscate a couple for-loop exit conditions 2011-09-16 00:36:21 +02:00
Yang Tse
e6697ef59c curl tool: fix a bunch of double free's uncovered 2011-09-15
Re-enabling MemoryTracking capability on 'src' subdirectory files and torture
tests have uncovered many issues which were going unnoticed in curl tool. So
here we go fixing some of them. Others still remain and should be addressed
ASAP, given that curl tool is used in our test harness also for test server
start verification purposes. There are even non-socket file descriptor leaks.
2011-09-15 20:03:30 +02:00
Yang Tse
f7583b2dea curl MSVC project files: adjust resource compiler include path 2011-09-15 11:40:54 +02:00
Yang Tse
6b33873c57 src/Makefile.vc6: adjust resource compiler include path 2011-09-14 20:31:23 +02:00
Yang Tse
90080da5fe curl tool: re-enable MemoryTracking capability on 'src' subdirectory files.
Use same preprocessor logic for curl tool MemoryTracking activation in source
files located in 'src' subdirectory as the one used for libcurl sources.
2011-09-14 11:30:22 +02:00
Guenter Knauf
2a9fec16cc Updated makefiles to latest libssh2. 2011-09-11 16:50:30 +02:00
Yang Tse
777f9aea13 urlglob.c: fix OOM handling 2011-09-10 18:46:05 +02:00
Guenter Knauf
443ab77e1f Avoid ftruncate() static define with MinGW64. 2011-09-08 11:17:16 +02:00
Yang Tse
46df51a391 fix bool variables checking and assignment 2011-09-06 01:57:21 +02:00
Yang Tse
a50210710a fix bool variables checking and assignment 2011-09-05 20:46:09 +02:00
Yang Tse
196e0d699f setup_once.h cleanup and sync 2011-09-04 17:10:51 +02:00
Guenter Knauf
476f194d7f Added SPNEGO to MinGW makefiles. 2011-09-04 10:03:08 +02:00
Yang Tse
a405a8976d revert changes not intended to be pushed with commit 6b75d2c2 2011-09-03 18:26:21 +02:00
Yang Tse
6b75d2c2df fix a bunch of MSVC compiler warnings 2011-09-03 16:07:09 +02:00
Guenter Knauf
2be65bb0c5 Updated dependecies versions. 2011-09-03 14:01:09 +02:00
Guenter Knauf
f02325ea65 Some MinGW makefile tweaks for MinGW64. 2011-09-03 13:55:16 +02:00
Yang Tse
b4f6319cf7 NTLM single-sign on adjustments (XI)
Feature string literal NTLM_SSO renamed to NTLM_WB.
Preprocessor symbol USE_NTLM_SSO renamed to WINBIND_NTLM_AUTH_ENABLED.
curl's 'long' option 'ntlm-sso' renamed to 'ntlm-wb'.
Fix some comments to make clear that this is actually a NTLM delegation.
2011-08-27 01:33:35 +02:00
Yang Tse
407e08baad NTLM single-sign on adjustments (X)
Functions renamed:

Curl_output_ntlm_sso -> Curl_output_ntlm_wb
sso_ntlm_close -> wb_ntlm_close
sso_ntlm_response -> wb_ntlm_response
sso_ntlm_initiate -> wb_ntlm_initiate

Preprocessor symbols renamed:

CURLAUTH_NTLM_SSO -> CURLAUTH_NTLM_WB
CURL_VERSION_NTLM_SSO -> CURL_VERSION_NTLM_WB
2011-08-26 18:57:50 +02:00
Yang Tse
1c400b4e5e zlib: ensure user provided memory functions are used by zlib, when given
As a bonus, this lets our MemoryTracking subsystem track zlib operations.
And also fixes a shortcut some zlib 1.2.x versions took using malloc()
instead of calloc(), which would trigger memory debuggers warnings on
memory being used without having been initialized.
2011-08-21 13:24:46 +02:00
Daniel Stenberg
61ae7e9ce7 main: fix segfault
Follow-up to commit 5eb2396cd as that wasn't complete.

At times HEADERFUNCTION+HEADERDATA was set only to have only HEADERDATA
set in the subsequent loop which could cause a NULL to get sent as
userdata to 'header_callback' which wasn't made to handle that.

Now HEADERFUNCTION is explicitly set to NULL if it isn't set to the
callback.
2011-08-21 12:59:06 +02:00
Yang Tse
838dd8f594 MemoryTracking: adjust initialization calling - followup
Fix macro definition
2011-08-21 06:10:52 +02:00
Yang Tse
aaab5fa299 MemoryTracking: adjust initialization calling
Calling of curl_memdebug() was still done with a pending free()
2011-08-20 17:26:42 +02:00