http_printf(hc, "RTSP/1.0 %d %s\r\n", error, errstr);
if((c = http_arg_get(&hc->hc_args, "cseq")) != NULL)
http_printf(hc, "CSeq: %s\r\n", c);
+ if(error == HTTP_STATUS_UNAUTHORIZED)
+ http_printf(hc, "WWW-Authenticate: Basic realm=\"tvheadend\"\r\n");
http_printf(hc, "\r\n");
}
int
rtsp_process_request(http_connection_t *hc)
{
+ rtsp_reply_error(hc, RTSP_STATUS_UNAUTHORIZED, NULL);
+ return 0;
+
switch(hc->hc_cmd) {
default:
rtsp_reply_error(hc, RTSP_STATUS_METHOD, NULL);