Skip to content

v0.45.2

Latest

Choose a tag to compare

@unkn0wn-root unkn0wn-root released this 07 Jul 12:21

Important fix: multipart/form-data requests

Multipart requests were effectively unusable in previous releases for typical hand-written requests and requests imported from curl -F via resterm -fc. If you use multipart/form-data, you should upgrade.

What was broken. Several compounding bugs could corrupt multipart bodies: boundary lines (--...) were dropped during parsing because they were mistaken for -- comments. Part content starting with #, //, > or @... could be misread as resterm syntax and multipart framing was sent with LF line endings instead of the CRLF delimiter/header framing required by RFC 7578/RFC 2046.

What's fixed. resterm now sends multipart bodies with curl compatible wire framing:

  • CRLF delimiters and part headers, including a trailing CRLF after the closing boundary
  • multipart body lines are preserved as body content instead of being parsed as comments, scripts or variables
  • @file includes inside parts are injected as raw bytes, so binary uploads are not rewritten
  • works the same whether your .http file uses LF or CRLF line endings
  • applies to all multipart subtypes (form-data, mixed, related)

Directives placed after the closing boundary, such as # @capture, continue to parse as before. Non-multipart requests, GraphQL, gRPC, SSH, and K8s are unaffected.

Fixes #310