socketry / multipart-post

Adds multipart POST capability to net/http
MIT License
293 stars 72 forks source link

Properly handle nested params #86

Open ioquatix opened 2 years ago

ioquatix commented 2 years ago

https://github.com/socketry/multipart-post/pull/52

Types of Changes

Testing

ioquatix commented 2 years ago

It turns out handling headers is a bit more complex. The part headers are indexed by key, but this won't work for nested parts, we either need:

  1. Nested part headers based on keys, computed during recursion, i.e. part_headers[k] - we'd also might need to ignore non-string-key headers when constructing parts.
  2. Flat part headers indexed by full key prefix/path.