mimepost: allocate main struct on-demand

This makes the easy handle 432 bytes smaller (totally 5352 bytes on my
rather maximized Linux 64 bit build). The 440 byte mimepost struct is
now allocated only when needed.

Closes #20260
This commit is contained in:
Daniel Stenberg 2026-01-12 09:30:25 +01:00
parent 9e0b02c19c
commit 44312b4b11
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 79 additions and 45 deletions

View file

@ -2117,7 +2117,7 @@ static CURLcode set_post_reader(struct Curl_easy *data, Curl_HttpReq httpreq)
switch(httpreq) {
#ifndef CURL_DISABLE_MIME
case HTTPREQ_POST_MIME:
data->state.mimepost = &data->set.mimepost;
data->state.mimepost = data->set.mimepostp;
break;
#endif
#ifndef CURL_DISABLE_FORM_API