Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
8efccddc
Commit
8efccddc
authored
Oct 02, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Use StringRef for HttpProxy
parent
97843e38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
src/shrpx_config.cc
src/shrpx_config.cc
+3
-2
src/shrpx_config.h
src/shrpx_config.h
+2
-2
No files found.
src/shrpx_config.cc
View file @
8efccddc
...
...
@@ -2258,11 +2258,12 @@ int parse_config(Config *config, int optid, const StringRef &opt,
// Surprisingly, u.field_set & UF_USERINFO is nonzero even if
// userinfo component is empty string.
if
(
!
uf
.
empty
())
{
proxy
.
userinfo
=
util
::
percent_decode
(
std
::
begin
(
uf
),
std
::
end
(
uf
)
);
proxy
.
userinfo
=
util
::
percent_decode
(
config
->
balloc
,
uf
);
}
}
if
(
u
.
field_set
&
UF_HOST
)
{
http2
::
copy_url_component
(
proxy
.
host
,
&
u
,
UF_HOST
,
optarg
.
c_str
());
proxy
.
host
=
make_string_ref
(
config
->
balloc
,
util
::
get_uri_field
(
optarg
.
c_str
(),
u
,
UF_HOST
));
}
else
{
LOG
(
ERROR
)
<<
opt
<<
": no hostname specified"
;
return
-
1
;
...
...
src/shrpx_config.h
View file @
8efccddc
...
...
@@ -439,9 +439,9 @@ struct TicketKeys {
struct
HttpProxy
{
Address
addr
;
// host in http proxy URI
std
::
string
host
;
StringRef
host
;
// userinfo in http proxy URI, not percent-encoded form
std
::
string
userinfo
;
StringRef
userinfo
;
// port in http proxy URI
uint16_t
port
;
};
...
...
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