<title>fix(net/crimp): correctly set content length for PUT requests</title>
<updated>2024-03-11T16:36:36+00:00</updated>
<author>
<name>sterni</name>
<email>sternenseemann@systemli.org</email>
...</author>
<published>2024-03-11T16:17:13+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=438db1be3065b451ebb232e8b3308e69a9e28fa4"/>
<id>urn:sha1:438db1be3065b451ebb232e8b3308e69a9e28fa4</id>
<content type="text">
Since https://github.com/curl/curl/commit/9c845be2797e20475
(presumably), libcurl will overwrite our previously set request
method to POST if we set .post_field_size(…). The fix is to use
the proper option for PUT/upload, .in_filesize(…). While we're
at it, switch to using .upload(…) instead of the deprecated
.put(…) which should be the same for HTTP.
Change-Id: I393c1a02c70d5b99dff5901cd6e9d9434f68c15b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11132
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
</content>