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

Verify URL before making the request, fixes #527, fixes #545. #703

Merged
merged 1 commit into from
May 2, 2021

Conversation

fredrikekre
Copy link
Member

No description provided.

src/RedirectRequest.jl Outdated Show resolved Hide resolved
src/RedirectRequest.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2021

Codecov Report

Merging #703 (3bb323c) into master (7eca199) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #703      +/-   ##
==========================================
+ Coverage   75.20%   75.26%   +0.06%     
==========================================
  Files          36       36              
  Lines        2363     2369       +6     
==========================================
+ Hits         1777     1783       +6     
  Misses        586      586              
Impacted Files Coverage Δ
src/RedirectRequest.jl 77.41% <100.00%> (+5.41%) ⬆️

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 7eca199...3bb323c. Read the comment docs.

@fredrikekre fredrikekre marked this pull request as ready for review April 28, 2021 01:10
@fredrikekre
Copy link
Member Author

fredrikekre commented May 2, 2021

I just noticed https://github.com/JuliaWeb/URIs.jl/blob/62a77a5b97ac1a5709c17baa1928b77d792d93b1/src/URIs.jl#L288 so perhaps that should be used? It checks a lot more than the bare minimum as this PR does, but perhaps that is fine.

Edit: Doesn't complain about missing host, but I added this as an extra check too.
Edit 2: Removed it, threw in tests for

julia> uri = URI("ws://127.0.0.1:8086/query?k1=v1&k2=v2")
URI("ws://127.0.0.1:8086/query?k1=v1&k2=v2")

julia> isvalid(uri)
false

but maybe that is just a bad test case...

@fredrikekre fredrikekre merged commit f8d11c1 into master May 2, 2021
@fredrikekre fredrikekre deleted the fe/url-verify branch May 2, 2021 13:54
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.

3 participants