JuliaWeb / HTTP.jl

HTTP for Julia
https://juliaweb.github.io/HTTP.jl/stable/
Other
635 stars 176 forks source link

Make multipart parsing more forgiving: start-of-line and casing #1164

Closed NHDaly closed 5 months ago

NHDaly commented 6 months ago

I had a multipart response i wanted to parse, and julia failed to parse it. These changes let it parse:

  1. The content-disposition was the second line in each part, with the content-type coming first, so the ^ was failing to parse.
  2. The content-type: key was lower-cased, not Title-Cased as expected.

Dunno if these are generally correct, but they worked in my case.

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.19%. Comparing base (2de2c78) to head (9387824).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1164 +/- ## ======================================= Coverage 83.19% 83.19% ======================================= Files 32 32 Lines 3058 3058 ======================================= Hits 2544 2544 Misses 514 514 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

quinnj commented 5 months ago

Let me know if this is needed in a release (for 0.9 or 0.10), otherwise, I'll let is sit on master until a new release is needed.

NHDaly commented 5 months ago

not needed; i was just trying to be a good citizen here and fix a bug I found. 😊 thanks! 👋