Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send-part-3 #13010

Closed
wants to merge 7 commits into from
Closed

send-part-3 #13010

wants to merge 7 commits into from

Conversation

icing
Copy link
Contributor

@icing icing commented Feb 28, 2024

Further changes in send/upload handling

  • 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.ulbuf that is never used
  • smb, add own send_buf instead of using data->state.ulbuf
  • remove members of struct HTTP no longer used
  • init null client reader on postfields if length is not positive

@icing icing added the tidy-up label Feb 29, 2024
@icing
Copy link
Contributor Author

icing commented Feb 29, 2024

The failing hyper test is fixed by #13016.

- 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
- remove members of struct HTTP no longer used
- init null client reader on postfields of length
  is not positive
- fix codespelling
- remove duplicate declarations of 2 Curl_req_* functions
- make Curl_req_flush() static to avoid single-use issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant