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
fbcb97f2
Commit
fbcb97f2
authored
Jun 29, 2020
by
Ivan Vilata-i-Balaguer
Browse files
Merge branch 'master' into doh-client
parents
4820f8ac
6df0f20d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/client.cpp
View file @
fbcb97f2
...
...
@@ -14,6 +14,7 @@
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/adaptor/indexed.hpp>
#include <boost/regex.hpp>
#include <iostream>
#include <cstdlib> // for atexit()
...
...
@@ -91,6 +92,9 @@ static const fs::path OUINET_CA_CERT_FILE = "ssl-ca-cert.pem";
static
const
fs
::
path
OUINET_CA_KEY_FILE
=
"ssl-ca-key.pem"
;
static
const
fs
::
path
OUINET_CA_DH_FILE
=
"ssl-ca-dh.pem"
;
// Flags for normal, case-insensitive regular expression.
static
const
auto
rx_icase
=
boost
::
regex
::
normal
|
boost
::
regex
::
icase
;
static
bool
log_transactions
()
{
return
logger
.
get_threshold
()
<=
DEBUG
||
logger
.
get_log_file
()
!=
nullptr
;
...
...
@@ -850,6 +854,7 @@ Session Client::State::fetch_fresh_through_connect_proxy( const Request& rq
,
default_timeout
::
fetch_http
()
,
cancel
,
yield
[
ec
].
tag
(
"connreq"
));
return_or_throw_on_error
(
yield
,
cancel
,
ec
,
Session
());
if
(
connres
.
result
()
!=
http
::
status
::
ok
)
{
// This error code is quite fake, so log the error too.
...
...
@@ -1925,7 +1930,8 @@ void Client::State::serve_request( GenericStream&& con
Match
(
reqexpr
::
from_regex
(
method_getter
,
"HEAD"
)
,
nocache_request_config
),
Match
(
reqexpr
::
from_regex
(
x_private_getter
,
"True"
)
Match
(
reqexpr
::
from_regex
(
x_private_getter
,
boost
::
regex
(
http_
::
request_private_true
,
rx_icase
))
,
nocache_request_config
),
// Disable cache and always go to proxy for this site.
...
...
src/client.h
View file @
fbcb97f2
...
...
@@ -21,7 +21,7 @@ static const std::string request_group_hdr = header_prefix + "Group";
// instructs the client to avoid request mechanisms that
// would reveal the request or the associated response to other users.
static
const
std
::
string
request_private_hdr
=
header_prefix
+
"Private"
;
static
const
std
::
string
request_private_true
=
"true"
;
static
const
std
::
string
request_private_true
=
"true"
;
// case insensitive
}
...
...
src/ssl/util.h
View file @
fbcb97f2
...
...
@@ -79,6 +79,7 @@ client_handshake( Stream&& con
ssl_sock
->
async_handshake
(
ssl
::
stream_base
::
client
,
yield
[
ec
]);
}
if
(
abort_signal
)
ec
=
boost
::
asio
::
error
::
operation_aborted
;
if
(
ec
)
return
or_throw
<
GenericStream
>
(
yield
,
ec
);
static
const
auto
ssl_shutter
=
[](
ssl
::
stream
<
Stream
>&
s
)
{
...
...
Write
Preview
Supports
Markdown
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