mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 16:48:22 -04:00
[daap] Don't send two errors on auth problems + use 401 instead of 403 (issue #594)
This commit is contained in:
parent
d5ab294172
commit
6109a5b6dd
@ -731,6 +731,8 @@ daap_request_authorize(struct httpd_request *hreq)
|
|||||||
if (session->id == 0)
|
if (session->id == 0)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DAAP, "Unauthorized request from '%s', DAAP session not found: '%s'\n", hreq->peer_address, hreq->uri_parsed->uri);
|
DPRINTF(E_LOG, L_DAAP, "Unauthorized request from '%s', DAAP session not found: '%s'\n", hreq->peer_address, hreq->uri_parsed->uri);
|
||||||
|
|
||||||
|
httpd_send_error(req, 401, "Unauthorized");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2275,7 +2277,6 @@ daap_request(struct evhttp_request *req, struct httpd_uri_parsed *uri_parsed)
|
|||||||
ret = daap_request_authorize(hreq);
|
ret = daap_request_authorize(hreq);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
httpd_send_error(req, 403, "Forbidden");
|
|
||||||
free(hreq);
|
free(hreq);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user