]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: further send/upload handling polish
authorStefan Eissing <stefan@eissing.org>
Wed, 28 Feb 2024 13:51:53 +0000 (14:51 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 4 Mar 2024 07:42:56 +0000 (08:42 +0100)
commite3905de8196d67b89df1602feb84c1f993211b20
tree8a39ac66ced1bdecc0a335948fdf70de2b710f91
parent46aea3d990f3fd6149e89a4949ee999484273e4d
lib: further send/upload handling polish

- Move all the "upload_done" handling to request.c

  - add possibility to abort sending of a request
  - add `Curl_req_done_sending()` for checks
  - transfer.c: readwrite_upload() now clean

- removing data->state.ulbuf and data->req.upload_fromhere

  - as well as data->req.upload_present
  - set data->req.upload_done on having read all from
    the client and completely flushed the send buffer

- tftp, remove setting of data->req.upload_fromhere

  - serves no purpose as `upload_present` is not set
    and the data itself is directly `sendto()` anyway

- smtp, make upload EOB conversion a client reader
- xfer_ulbuf addition

  - add xfer_ulbuf for borrowing, similar to xfer_buf
  - use in file upload
  - use in c-hyper body sending

- h1-proxy, remove init of data->state.uilbuf that is never used
- smb, add own send_buf instead of using data->state.ulbuf

Closes #13010
22 files changed:
lib/c-hyper.c
lib/cf-h1-proxy.c
lib/file.c
lib/http.c
lib/http.h
lib/multi.c
lib/multihandle.h
lib/multiif.h
lib/request.c
lib/request.h
lib/rtsp.c
lib/sendf.c
lib/setopt.c
lib/smb.c
lib/smb.h
lib/smtp.c
lib/smtp.h
lib/tftp.c
lib/transfer.c
lib/transfer.h
lib/url.c
lib/urldata.h