mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:23:33 +03:00
mime: relax easy/mime structures binding
Deprecation and removal of codeset conversion support from the library
have released the strict need for an early binding of mime structures to
an easy handle (2610142).
This constraint currently forces to create the handle before the mime
structure and the latter cannot be attached to another handle once
created (see https://curl.se/mail/lib-2022-08/0027.html).
This commit removes the handle pointers from the mime structures
allowing more flexibility on their use.
When an easy handle is duplicated, bound mime structures must however
still be duplicated too as their components hold send-time dynamic
information.
Closes #9927
This commit is contained in:
parent
383fb29da1
commit
eb559c8056
9 changed files with 40 additions and 40 deletions
|
|
@ -265,7 +265,7 @@ static CURLcode http_setup_conn(struct Curl_easy *data,
|
|||
if(!http)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
Curl_mime_initpart(&http->form, data);
|
||||
Curl_mime_initpart(&http->form);
|
||||
data->req.p.http = http;
|
||||
|
||||
if(data->state.httpwant == CURL_HTTP_VERSION_3) {
|
||||
|
|
@ -2303,7 +2303,7 @@ CURLcode Curl_http_body(struct Curl_easy *data, struct connectdata *conn,
|
|||
cthdr = "multipart/form-data";
|
||||
|
||||
curl_mime_headers(http->sendit, data->set.headers, 0);
|
||||
result = Curl_mime_prepare_headers(http->sendit, cthdr,
|
||||
result = Curl_mime_prepare_headers(data, http->sendit, cthdr,
|
||||
NULL, MIMESTRATEGY_FORM);
|
||||
curl_mime_headers(http->sendit, NULL, 0);
|
||||
if(!result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue