Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
0bb65ed0
Commit
0bb65ed0
authored
Jun 16, 2018
by
Philipp Schafft
🦁
Browse files
Feature: Allow OPTIONS on admin requests
parent
2bd71b9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/admin.c
View file @
0bb65ed0
...
...
@@ -540,7 +540,19 @@ void admin_handle_request(client_t *client, const char *uri)
format
=
handler
->
format
;
}
handler
->
function
(
client
,
source
,
format
);
switch
(
client
->
parser
->
req_type
)
{
case
httpp_req_get
:
handler
->
function
(
client
,
source
,
format
);
break
;
case
httpp_req_options
:
client_send_204
(
client
);
break
;
default:
ICECAST_LOG_ERROR
(
"Wrong request type from client"
);
client_send_error_by_id
(
client
,
ICECAST_ERROR_CON_UNKNOWN_REQUEST
);
break
;
}
if
(
source
)
{
avl_tree_unlock
(
global
.
source_tree
);
}
...
...
src/connection.c
View file @
0bb65ed0
...
...
@@ -1162,15 +1162,7 @@ static void _handle_admin_request(client_t *client, char *adminuri)
stats_event_inc
(
NULL
,
"client_connections"
);
switch
(
client
->
parser
->
req_type
)
{
case
httpp_req_get
:
admin_handle_request
(
client
,
adminuri
);
break
;
default:
ICECAST_LOG_ERROR
(
"Wrong request type from client"
);
client_send_error_by_id
(
client
,
ICECAST_ERROR_CON_UNKNOWN_REQUEST
);
break
;
}
admin_handle_request
(
client
,
adminuri
);
}
/* Handle any client that passed the authing process.
...
...
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