1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 09:05:04 -05:00
Commit Graph

26684 Commits

Author SHA1 Message Date
Daniel Stenberg
13bc1ea9bc
http_chunks: correct and clarify a comment on hexnumber length
... and also rename the define for max length.

Closes #6489
2021-01-19 23:43:10 +01:00
Daniel Stenberg
e71542a9d9
curl_path: remove conn->data use
Closes #6487
2021-01-19 17:08:49 +01:00
Daniel Stenberg
219d9f8620
transfer: remove conn->data use
Closes #6486
2021-01-19 17:07:02 +01:00
Daniel Stenberg
2bdec0b363
quic: remove conn->data use
Closes #6485
2021-01-19 16:56:35 +01:00
Fabian Keil
6fcf22654e
Add test1181: Proxy request with --proxy-header "Connection: Keep-Alive" 2021-01-19 11:41:23 +01:00
Fabian Keil
3bccc182a2
Add test1180: Proxy request with -H "Proxy-Connection: Keep-Alive"
At the moment the test fails as curl sends two Proxy-Connection
headers.
2021-01-19 11:41:23 +01:00
Daniel Stenberg
3acf6fe539
c-hyper: avoid duplicated Proxy-Connection headers 2021-01-19 11:41:23 +01:00
Daniel Stenberg
ea6ce0afad
http: make providing Proxy-Connection header not cause duplicated headers
Fixes test 1180

Bug: https://curl.se/mail/lib-2021-01/0095.html
Reported-by: Fabian Keil
Closes #6472
2021-01-19 11:40:15 +01:00
Daniel Stenberg
f451206266
runtests: preprocess DISABLED to allow conditionals
... with this function provided, we can disable tests for specific
environments and setups directly within this file.

Closes #6477
2021-01-19 10:04:41 +01:00
Daniel Stenberg
bbfad7e8a1
runtests: turn preprocessing into a separate function
... and remove all other variable substitutions as they're now done once
and for all in the preprocessor.
2021-01-19 10:04:41 +01:00
Daniel Stenberg
7542ec5b32
lib/Makefile.inc: convert to listing each file on its own line
... to make it diff friendlier and easier to read.

Closes #6448
2021-01-19 10:03:07 +01:00
Daniel Stenberg
f86fcd0080
ftplistparser: remove use of conn->data
Closes #6482
2021-01-19 09:22:38 +01:00
Daniel Stenberg
a304051620
lib: more conn->data cleanups
Closes #6479
2021-01-19 09:14:51 +01:00
Patrick Monnerat
bbe3aa9f88
vtls: reduce conn->data use
Closes #6474
2021-01-19 09:14:40 +01:00
Daniel Stenberg
8399d89360
hyper: deliver data to application with Curl_client_write
... just as the native code path does. Avoids sending too large data
chunks in the callback and more.

Reported-by: Gisle Vanem
Fixes #6462
Closes #6473
2021-01-18 23:06:03 +01:00
Daniel Stenberg
f98f219c35
gopher: remove accidental conn->data leftover 2021-01-18 22:57:56 +01:00
Daniel Stenberg
a3efced012
libssh: avoid plain free() of libssh-memory
Since curl's own memory debugging system redefines free() calls to track
and fiddle with memory, it cannot be used on memory allocated by 3rd
party libraries.

Third party libraries SHOULD NOT require free() to release allocated
resources for this reason - and libs can use separate healp allocators
on some systems (like Windows) so free() doesn't necessarily work
anyway.

Filed as an issue with libssh: https://bugs.libssh.org/T268

Closes #6481
2021-01-18 22:50:56 +01:00
Daniel Stenberg
2bf77b3cba
send: assert that Curl_write_plain() has a ->conn when called
To help catch bad invokes.

Closes #6476
2021-01-18 16:12:20 +01:00
Daniel Stenberg
11b2dd86d3
test410: verify HTTPS GET with a 49K request header
skip test 410 for mesalink in the CI as it otherwise hangs "forever"
2021-01-18 16:10:34 +01:00
Daniel Stenberg
215db086e0
lib: pass in 'struct Curl_easy *' to most functions
... in most cases instead of 'struct connectdata *' but in some cases in
addition to.

- We mostly operate on transfers and not connections.

- We need the transfer handle to log, store data and more. Everything in
  libcurl is driven by a transfer (the CURL * in the public API).

- This work clarifies and separates the transfers from the connections
  better.

- We should avoid "conn->data". Since individual connections can be used
  by many transfers when multiplexing, making sure that conn->data
  points to the current and correct transfer at all times is difficult
  and has been notoriously error-prone over the years. The goal is to
  ultimately remove the conn->data pointer for this reason.

Closes #6425
2021-01-17 23:56:09 +01:00
Emil Engler
0d26ab9ed3
docs: fix typos in NEW-PROTOCOL.md
This fixes a misspelled "it" and a grammatically wrong "-ing" suffix.

Closes #6471
2021-01-17 12:56:03 +01:00
Daniel Stenberg
c701498e6e
RELEASE-NOTES: synced 2021-01-16 22:49:25 +01:00
Razvan Cojocaru
13fe0b6ade cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
This does for cmake builds what --disable-openssl-auto-load-config
does for autoconf builds.

Closes https://github.com/curl/curl/pull/6435
2021-01-16 02:18:12 -05:00
Daniel Stenberg
30e7641d7d
test1918: verify curl_easy_option_by_name() and curl_easy_option_by_id()
... and as a practical side-effect, make sure that the
Curl_easyopts_check() function is asserted in debug builds, which we
want to detect mismatches between the options list in easyoptions.c and
the options in curl.h

Found-by: Gisle Vanem
Bug: 08e8455ddd (commitcomment-45991815)

Closes #6461
2021-01-15 17:03:29 +01:00
Gisle Vanem
cbf0446973
easyoptions: add the missing AWS_SIGV4
Follow-up from AWS_SIGV4
2021-01-15 13:13:32 +01:00
Daniel Stenberg
3d0b62fdbe
schannel_verify: fix safefree call typo
Follow-up from e87ad71d1b

Closes #6459
2021-01-15 10:16:17 +01:00
Daniel Stenberg
1123a0eb24
mime: make sure setting MIMEPOST to NULL resets properly
... so that a function can first use MIMEPOST and then set it to NULL to
reset it back to a blank POST.

Added test 584 to verify the fix.

Reported-by: Christoph M. Becker

Fixes #6455
Closes #6456
2021-01-15 08:33:27 +01:00
Daniel Stenberg
b68dc34af3
multi: set the PRETRANSFER time-stamp when we switch to PERFORM
... instead of at end of the DO state. This makes the timer more
accurate for the protocols that use the DOING state (such as FTP), and
simplifies how the function (now called init_perform) is called.

The timer will then include the entire procedure up to PERFORM -
including all instructions for getting the transfer started.

Closes #6454
2021-01-14 23:16:39 +01:00
Daniel Stenberg
ec8dcd7b33
CURLINFO_PRETRANSFER_TIME.3: clarify
... the timer *does* include the instructions for getting the remote
file.

Ref: #6452
Closes #6453
2021-01-14 23:15:07 +01:00
Gisle Vanem
e87ad71d1b
schannel: plug a memory-leak
... when built without -DUNICODE.

Closes #6457
2021-01-14 22:59:56 +01:00
Jay Satiro
70c4fad734 gitattributes: Set batch files to CRLF line endings on checkout
If a batch file is run without CRLF line endings (ie LF-only) then
arbitrary behavior may occur. I consider that a bug in Windows, however
the effects can be serious enough (eg unintended code executed) that
we're fixing it in the repo by requiring CRLF line endings for batch
files on checkout.

Prior to this change the checked-out line endings of batch files were
dependent on a user's git preferences. On Windows it is common for git
users to have automatic CRLF conversion enabled (core.autocrlf true),
but those users that don't would run into this behavior.

For example a user has reported running the Visual Studio project
generator batch file (projects/generate.bat) and it looped forever.
Output showed that the Windows OS interpreter was occasionally jumping
to arbitrary points in the batch file and executing commands. This
resulted in unintended files being removed (a removal sequence called)
and looping forever.

Ref: https://serverfault.com/q/429594
Ref: https://stackoverflow.com/q/232651
Ref: https://www.dostips.com/forum/viewtopic.php?t=8988
Ref: https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in
Ref: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_autocrlf

Bug: https://github.com/curl/curl/discussions/6427
Reported-by: Ganesh Kamath

Closes https://github.com/curl/curl/pull/6442
2021-01-14 15:59:56 -05:00
Daniel Stenberg
8f32ead8bf
tool_operate: spellfix a comment 2021-01-14 13:40:12 +01:00
Daniel Stenberg
ac1f1b77a8
ROADMAP: refreshed
o removed HSTS - already implemented
o added HTTPS RR records
o mention HTTP/3 completion
2021-01-14 09:49:17 +01:00
Daniel Stenberg
ab6eb2ec07
http_chunks: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
e38f4b7e80
transfer: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
8072a882b3
tftp: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
78af707caf
multi: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
a7591fbb73
ldap: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
476e1339ef
doh: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
afb150499f
asyn-ares: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
c2c9e44a4d
vtls: remove Curl_ prefix from static functions 2021-01-14 08:09:09 +01:00
Daniel Stenberg
7e72b9b547
bearssl: remove Curl_ prefix from static functions 2021-01-14 08:09:08 +01:00
Daniel Stenberg
4b55d0468a
mbedtls: remove Curl_ prefix from static functions 2021-01-14 08:09:08 +01:00
Daniel Stenberg
5beed3e742
wolfssl: remove Curl_ prefix from static functions 2021-01-14 08:09:08 +01:00
Daniel Stenberg
39df93a875
nss: remove Curl_ prefix from static functions 2021-01-14 08:09:08 +01:00
Daniel Stenberg
a3e1e6b3b4
gnutls: remove Curl_ prefix from static functions 2021-01-14 08:09:08 +01:00
Daniel Stenberg
3112ede57c
openssl: remove Curl_ prefix from static functions
... as we reserve this prefix to library-wide functions.

Closes #6443
2021-01-14 08:08:54 +01:00
Daniel Stenberg
a79555291e
nss: get the run-time version instead of build-time
Closes #6445
2021-01-13 23:22:07 +01:00
Jay Satiro
3831043eff tool_doswin: Restore original console settings on CTRL signal
- Move Windows terminal init code from tool_main to tool_doswin.

- Restore the original console settings on CTRL+C and CTRL+BREAK.

Background: On Windows the curl tool changes the console settings to
enable virtual terminal processing (eg color output) if supported
(ie Win 10). The original settings are restored on exit but prior to
this change were not restored in the case of the CTRL signals.

Windows VT behavior varies depending on console/powershell/terminal;
refer to the discussion in #6226.

Assisted-by: Rich Turner

Closes https://github.com/curl/curl/pull/6226
2021-01-12 03:44:48 -05:00
Daniel Stenberg
33993d45fe
gen.pl: fix perl syntax
Follow-up to 324cf1d2e
2021-01-12 08:12:41 +01:00