-
Notifications
You must be signed in to change notification settings - Fork 181
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
Prefactoring: Add broken test case for parsing multipart content type (#782) #815
Prefactoring: Add broken test case for parsing multipart content type (#782) #815
Conversation
And actually, looking more at the parsing code, i'm not sure how easy it'll be to fix, so maybe i'll leave the fix to someone else? Hopefully this is still helpful as the first part of test-driven-development :) |
🤔 the regex here seems to work..?: Line 196 in 9666a9a
julia> match(r"(?i)Content-Type: (\S*[^;\s])", String(generate_test_body())[600:804])
RegexMatch("Content-Type: application/json", 1="application/json") but when i added this print out: @show re_ct
@info Parsers.exec(re_ct, header) it claims not to have worked: re_ct = HTTP.Parsers.RegexAndMatchData(r"(?i)Content-Type: (\S*[^;\s])"x, Ptr{Nothing} @0x00007fb8bc4302a0)
[ Info: false dunno why. |
Join a vector of strings to ensure the correct line endings for an HTTP message. PR feedback Co-Authored-By: Fredrik Ekre <[email protected]>
Thanks @fredrikekre. Applied your suggested changes. This is now ready for review! |
Codecov Report
@@ Coverage Diff @@
## master #815 +/- ##
==========================================
- Coverage 78.10% 77.40% -0.70%
==========================================
Files 36 36
Lines 2430 2430
==========================================
- Hits 1898 1881 -17
- Misses 532 549 +17
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
(Also, i think i've found the problem. But i'll bring the discussion back to the issue instead of on this PR: #782 (comment)) |
This PR makes the parsemultipart.jl test file a bit easier to edit, and then adds a broken test case for a form section with a non-text content type.
This can be merged as-is, since it only adds a
@test_broken
. I'll try to follow this up soon with a fix, but I'm done working for the day, and figured this is a nice place to stop already. :)Part of #782.