Skip to content
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

Allow passing in a custom boundary to HTTP.Form #613

Merged
merged 1 commit into from
Nov 1, 2020

Conversation

christopher-dG
Copy link
Member

This one is also motivated by BrokenRecord. If you want your HTTP request body to be deterministic, you need to be able to set the multipart boundary yourself.

@codecov-io
Copy link

codecov-io commented Nov 1, 2020

Codecov Report

Merging #613 into master will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #613      +/-   ##
==========================================
- Coverage   76.24%   76.19%   -0.06%     
==========================================
  Files          37       37              
  Lines        2269     2268       -1     
==========================================
- Hits         1730     1728       -2     
- Misses        539      540       +1     
Impacted Files Coverage Δ
src/multipart.jl 30.76% <ø> (-0.88%) ⬇️
src/IOExtras.jl 71.42% <0.00%> (-3.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e93ac4...4611059. Read the comment docs.

@christopher-dG christopher-dG merged commit b4a37aa into master Nov 1, 2020
@@ -53,9 +53,8 @@ function Base.read(f::Form, n::Integer)
return result
end

function Form(d)
function Form(d; boundary=string(rand(UInt128), base=16))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're allowing people to pass in a boundary, it might be helpful to assert they pass a string of the right length

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I can open another PR in the morning.

@christopher-dG christopher-dG deleted the cdg/form-boundary branch November 2, 2020 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants