Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jenny Ryan
ouinet
Commits
e8ee198a
Commit
e8ee198a
authored
Jul 01, 2020
by
Ivan Vilata-i-Balaguer
Browse files
Check that DoH base URL does not already contain a `dns` query arg.
parent
b98c9163
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/doh.cpp
View file @
e8ee198a
...
...
@@ -23,6 +23,8 @@ endpoint_from_base(const std::string& base)
util
::
url_match
um
;
if
(
!
util
::
match_http_url
(
base
,
um
)
||
!
um
.
fragment
.
empty
())
return
boost
::
none
;
if
(
um
.
query
.
find
(
"dns="
)
==
0
||
um
.
query
.
find
(
"&dns="
)
!=
std
::
string
::
npos
)
return
boost
::
none
;
um
.
query
+=
um
.
query
.
empty
()
?
"dns="
:
"&dns="
;
return
um
.
reassemble
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment