History log of /curl/lib/url.c (Results 26 – 50 of 1783)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 5b65e7d1 21-Nov-2023 Stefan Eissing

transfer: cleanup done+excess handling

- add `SingleRequest->download_done` as indicator that
all download bytes have been received
- remove `stop_reading` bool from readwrite func

transfer: cleanup done+excess handling

- add `SingleRequest->download_done` as indicator that
all download bytes have been received
- remove `stop_reading` bool from readwrite functions
- move excess body handling into client download writer

Closes #12371

show more ...


# e9a7d4a1 21-Nov-2023 Viktor Szakats

windows: use built-in `_WIN32` macro to detect Windows

Windows compilers define `_WIN32` automatically. Windows SDK headers
or build env defines `WIN32`, or we have to take care of it. T

windows: use built-in `_WIN32` macro to detect Windows

Windows compilers define `_WIN32` automatically. Windows SDK headers
or build env defines `WIN32`, or we have to take care of it. The
agreement seems to be that `_WIN32` is the preferred practice here.
Make the source code rely on that to detect we're building for Windows.

Public `curl.h` was using `WIN32`, `__WIN32__` and `CURL_WIN32` for
Windows detection, next to the official `_WIN32`. After this patch it
only uses `_WIN32` for this. Also, make it stop defining `CURL_WIN32`.

There is a slight chance these break compatibility with Windows
compilers that fail to define `_WIN32`. I'm not aware of any obsolete
or modern compiler affected, but in case there is one, one possible
solution is to define this macro manually.

grepping for `WIN32` remains useful to discover Windows-specific code.

Also:

- extend `checksrc` to ensure we're not using `WIN32` anymore.

- apply minor formatting here and there.

- delete unnecessary checks for `!MSDOS` when `_WIN32` is present.

Co-authored-by: Jay Satiro
Reviewed-by: Daniel Stenberg

Closes #12376

show more ...


# 1c37d472 21-Nov-2023 Stefan Eissing

url: ConnectionExists revisited

- have common pattern of `if not match, continue`
- revert pages long if()s to return early
- move dead connection check to later since it may
b

url: ConnectionExists revisited

- have common pattern of `if not match, continue`
- revert pages long if()s to return early
- move dead connection check to later since it may
be relatively expensive
- check multiuse also when NOT building with NGHTTP2
- for MULTIUSE bundles, verify that the inspected
connection indeed supports multiplexing when in use
(bundles may contain a mix of connection, afaict)

Closes #12373

show more ...


# b2d8f3f7 17-Nov-2023 Daniel Stenberg

url: find scheme with a "perfect hash"

Instead of a loop to scan over the potentially 30+ scheme names, this
uses a "perfect hash" table. This works fine because the set of schemes
i

url: find scheme with a "perfect hash"

Instead of a loop to scan over the potentially 30+ scheme names, this
uses a "perfect hash" table. This works fine because the set of schemes
is known and cannot change in a build. The hash algorithm and table size
is made to only make a single scheme index per table entry.

The perfect hash is generated by a separate tool (scripts/schemetable.c)

Closes #12347

show more ...


# a5daac60 16-Nov-2023 Viktor Szakats

url: fix `-Wzero-length-array` with no protocols

Fixes:
```
./lib/url.c:178:56: warning: use of an empty initializer is a C2x extension [-Wc2x-extensions]
178 | static const st

url: fix `-Wzero-length-array` with no protocols

Fixes:
```
./lib/url.c:178:56: warning: use of an empty initializer is a C2x extension [-Wc2x-extensions]
178 | static const struct Curl_handler * const protocols[] = {
| ^
./lib/url.c:178:56: warning: zero size arrays are an extension [-Wzero-length-array]
```

Closes #12344

show more ...


# 47c00fce 16-Nov-2023 Viktor Szakats

url: fix builds with `CURL_DISABLE_HTTP`

Fixes:
```
./lib/url.c:456:35: error: no member named 'formp' in 'struct UrlState'
456 | Curl_mime_cleanpart(data->state.formp);

url: fix builds with `CURL_DISABLE_HTTP`

Fixes:
```
./lib/url.c:456:35: error: no member named 'formp' in 'struct UrlState'
456 | Curl_mime_cleanpart(data->state.formp);
| ~~~~~~~~~~~ ^
```

Regression from 74b87a8af13a155c659227f5acfa78243a8b2aa6 #11682

Closes #12343

show more ...


# 70e3b534 14-Nov-2023 Daniel Stenberg

urldata: move cookielist from UserDefined to UrlState

1. Because the value is not strictly set with a setopt option.

2. Because otherwise when duping a handle when all the set.* fie

urldata: move cookielist from UserDefined to UrlState

1. Because the value is not strictly set with a setopt option.

2. Because otherwise when duping a handle when all the set.* fields are
first copied and an error happens (think out of memory mid-function),
the function would easily free the list *before* it was deep-copied,
which could lead to a double-free.

Closes #12323

show more ...


# 289b486f 13-Nov-2023 Daniel Stenberg

urldata: move hstslist from 'set' to 'state'

To make it work properly with curl_easy_duphandle(). This, because
duphandle duplicates the entire 'UserDefined' struct by plain copy while

urldata: move hstslist from 'set' to 'state'

To make it work properly with curl_easy_duphandle(). This, because
duphandle duplicates the entire 'UserDefined' struct by plain copy while
'hstslist' is a linked curl_list of file names. This would lead to a
double-free when the second of the two involved easy handles were
closed.

Closes #12315

show more ...


# 3e6254f8 03-Nov-2023 Stefan Eissing

url: proxy ssl connection reuse fix

- tunnel https proxy used for http: transfers does
no check if proxy-ssl configuration matches
- test cases added, test_10_12 fails on 8.4.0

url: proxy ssl connection reuse fix

- tunnel https proxy used for http: transfers does
no check if proxy-ssl configuration matches
- test cases added, test_10_12 fails on 8.4.0

Closes #12255

show more ...


# bbdbd4b0 31-Oct-2023 Stefan Eissing

vtls: late clone of connection ssl config

- perform connection cache matching against `data->set.ssl.primary`
and proxy counterpart
- fully clone connection ssl config only when co

vtls: late clone of connection ssl config

- perform connection cache matching against `data->set.ssl.primary`
and proxy counterpart
- fully clone connection ssl config only when connection is used

Closes #12237

show more ...


# bf0e278a 26-Oct-2023 Stefan Eissing

vtls: cleanup SSL config management

- remove `Curl_ssl_get_config()`, no longer needed

Closes #12204


# 39547ae6 27-Oct-2023 Stefan Eissing

url: protocol handler lookup tidy-up

- rename lookup to what it does
- use ARRAYSIZE instead of NULL check for end
- offer alternate lookup for 0-terminated strings

Closes #

url: protocol handler lookup tidy-up

- rename lookup to what it does
- use ARRAYSIZE instead of NULL check for end
- offer alternate lookup for 0-terminated strings

Closes #12216

show more ...


# 56a4db2e 25-Oct-2023 Stefan Eissing

urldata: move async resolver state from easy handle to connectdata

- resolving is done for a connection, not for every transfer
- save create/dup/free of a cares channel for each transfe

urldata: move async resolver state from easy handle to connectdata

- resolving is done for a connection, not for every transfer
- save create/dup/free of a cares channel for each transfer
- check values of setopt calls against a local channel if no
connection has been attached yet, when needed.

Closes #12198

show more ...


# fc077bc7 20-Oct-2023 Daniel Stenberg

urldata: move the 'internal' boolean to the state struct

... where all the other state bits for the easy handles live.

Closes #12165


# b0bee93d 19-Oct-2023 Daniel Stenberg

url: don't touch the multi handle when closing internal handles

Reported-by: Maksymilian Arciemowicz
Closes #12165


# 43215842 07-Oct-2023 Daniel Stenberg

url: fall back to http/https proxy env-variable if ws/wss not set

Reported-by: Craig Andrews
Fixes #12031
Closes #12058


# cf577bca 07-Oct-2023 Jay Satiro

url: fix typo


# 0bd9e137 20-Sep-2023 Stefan Eissing

lib: move handling of `data->req.writer_stack` into Curl_client_write()

- move definitions from content_encoding.h to sendf.h
- move create/cleanup/add code into sendf.c
- installed

lib: move handling of `data->req.writer_stack` into Curl_client_write()

- move definitions from content_encoding.h to sendf.h
- move create/cleanup/add code into sendf.c
- installed content_encoding writers will always be called
on Curl_client_write(CLIENTWRITE_BODY)
- Curl_client_cleanup() frees writers and tempbuffers from
paused transfers, irregardless of protocol

Closes #11908

show more ...


# ab18c042 20-Sep-2023 Jay Satiro

url: fix netrc info message

- Fix netrc info message to use the generic ".netrc" filename if the
user did not specify a netrc location.

- Update --netrc doc to add that recent

url: fix netrc info message

- Fix netrc info message to use the generic ".netrc" filename if the
user did not specify a netrc location.

- Update --netrc doc to add that recent versions of curl on Windows
prefer .netrc over _netrc.

Before:
* Couldn't find host google.com in the (nil) file; using defaults

After:
* Couldn't find host google.com in the .netrc file; using defaults

Closes https://github.com/curl/curl/pull/11904

show more ...


# 746dbc14 17-Sep-2023 vvb2060

lib: failf/infof compiler warnings

Closes #11874


# e92edfbe 20-Jul-2023 Wyatt O'Day

lib: add ability to disable auths individually

Both with configure and cmake

Closes #11490


# 7378f9cc 26-Aug-2023 John Bampton

misc: remove duplicate words

Closes #11740


# 5e2beb33 23-Aug-2023 Daniel Stenberg

spelling: use 'reuse' not 're-use' in code and elsewhere

Unify the spelling as both versions were previously used intermittently

Closes #11717


# 74b87a8a 16-Aug-2023 Daniel Stenberg

lib: move mimepost data from ->req.p.http to ->state

When the legacy CURLOPT_HTTPPOST option is used, it gets converted into
the modem mimpost struct at first use. This data is (now) kep

lib: move mimepost data from ->req.p.http to ->state

When the legacy CURLOPT_HTTPPOST option is used, it gets converted into
the modem mimpost struct at first use. This data is (now) kept for the
entire transfer and not only per single HTTP request. This re-enables
rewind in the beginning of the second request instead of in end of the
first, as brought by 1b39731.

The request struct is per-request data only.

Extend test 650 to verify.

Fixes #11680
Reported-by: yushicheng7788 on github
Closes #11682

show more ...


# e67718ee 17-Aug-2023 Daniel Stenberg

lib: --disable-bindlocal builds curl without local binding support


12345678910>>...72