Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
4c06bd34
Commit
4c06bd34
authored
Apr 11, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tls_ctx to proxy requests
and fix a typo
parent
f4defdaa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
HTTPServer.pm
PVE/HTTPServer.pm
+13
-3
No files found.
PVE/HTTPServer.pm
View file @
4c06bd34
...
@@ -282,8 +282,9 @@ sub proxy_request {
...
@@ -282,8 +282,9 @@ sub proxy_request {
$method
=>
$target
,
$method
=>
$target
,
headers
=>
$headers
,
headers
=>
$headers
,
timeout
=>
30
,
timeout
=>
30
,
re
s
urse
=>
0
,
re
c
urse
=>
0
,
body
=>
$content
,
body
=>
$content
,
tls_ctx
=>
$self
->
{
tls_ctx
},
sub
{
sub
{
my
(
$body
,
$hdr
)
=
@_
;
my
(
$body
,
$hdr
)
=
@_
;
...
@@ -715,6 +716,16 @@ sub write_log {
...
@@ -715,6 +716,16 @@ sub write_log {
}
}
}
}
sub
atfork_handler
{
my
(
$self
)
=
@_
;
eval
{
# something else do to ?
close
(
$self
->
{
socket
});
};
warn
$@
if
$@
;
}
sub
new
{
sub
new
{
my
(
$this
,
%
args
)
=
@_
;
my
(
$this
,
%
args
)
=
@_
;
...
@@ -729,9 +740,8 @@ sub new {
...
@@ -729,9 +740,8 @@ sub new {
# init inotify
# init inotify
PVE::INotify::
inotify_init
();
PVE::INotify::
inotify_init
();
my
$atfork
=
sub
{
close
(
$self
->
{
socket
});
};
$self
->
{
rpcenv
}
=
PVE::
RPCEnvironment
->
init
(
$self
->
{
rpcenv
}
=
PVE::
RPCEnvironment
->
init
(
$self
->
{
trusted_env
}
?
'
priv
'
:
'
pub
',
atfork
=>
$atfork
);
$self
->
{
trusted_env
}
?
'
priv
'
:
'
pub
',
atfork
=>
sub
{
$self
->
atfork_handler
()
}
);
fh_nonblocking
(
$self
->
{
socket
},
1
);
fh_nonblocking
(
$self
->
{
socket
},
1
);
...
...
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