Commit 50e9af20 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Don't claim to support HTTP 1.x where x > 1

parent 4008d8a7
...@@ -67,9 +67,9 @@ struct httpd_message_t ...@@ -67,9 +67,9 @@ struct httpd_message_t
{ {
httpd_client_t *cl; /* NULL if not throught a connection e vlc internal */ httpd_client_t *cl; /* NULL if not throught a connection e vlc internal */
int i_type; uint8_t i_type;
int i_proto; uint8_t i_proto;
int i_version; uint8_t i_version;
/* for an answer */ /* for an answer */
int i_status; int i_status;
......
...@@ -399,7 +399,7 @@ httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl, ...@@ -399,7 +399,7 @@ httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
answer->i_proto = HTTPD_PROTO_HTTP; answer->i_proto = HTTPD_PROTO_HTTP;
answer->i_version= query->i_version; answer->i_version= (query->i_version > 1) ? 1 : query->i_version;
answer->i_type = HTTPD_MSG_ANSWER; answer->i_type = HTTPD_MSG_ANSWER;
answer->i_status = 200; answer->i_status = 200;
...@@ -642,8 +642,8 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys, ...@@ -642,8 +642,8 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
{ {
return VLC_SUCCESS; return VLC_SUCCESS;
} }
answer->i_proto = query->i_proto; answer->i_proto = HTTPD_PROTO_HTTP;
answer->i_version= query->i_version; answer->i_version= (query->i_version > 1) ? 1 : query->i_version;
answer->i_type = HTTPD_MSG_ANSWER; answer->i_type = HTTPD_MSG_ANSWER;
answer->i_status = 301; answer->i_status = 301;
...@@ -1286,7 +1286,7 @@ void httpd_MsgInit( httpd_message_t *msg ) ...@@ -1286,7 +1286,7 @@ void httpd_MsgInit( httpd_message_t *msg )
msg->cl = NULL; msg->cl = NULL;
msg->i_type = HTTPD_MSG_NONE; msg->i_type = HTTPD_MSG_NONE;
msg->i_proto = HTTPD_PROTO_NONE; msg->i_proto = HTTPD_PROTO_NONE;
msg->i_version = -1; msg->i_version = -1; /* FIXME */
msg->i_status = 0; msg->i_status = 0;
...@@ -1825,8 +1825,8 @@ static void httpd_ClientSend( httpd_client_t *cl ) ...@@ -1825,8 +1825,8 @@ static void httpd_ClientSend( httpd_client_t *cl )
} }
p = (char *)cl->p_buffer; p = (char *)cl->p_buffer;
p += sprintf( p, "%s/1.%d %d %s\r\n", p += sprintf( p, "%s.%u %d %s\r\n",
cl->answer.i_proto == HTTPD_PROTO_HTTP ? "HTTP" : "RTSP", cl->answer.i_proto == HTTPD_PROTO_HTTP ? "HTTP/1" : "RTSP/1",
cl->answer.i_version, cl->answer.i_version,
cl->answer.i_status, psz_status ); cl->answer.i_status, psz_status );
for( i = 0; i < cl->answer.i_name; i++ ) for( i = 0; i < cl->answer.i_name; i++ )
...@@ -2043,7 +2043,7 @@ static void httpd_HostThread( httpd_host_t *host ) ...@@ -2043,7 +2043,7 @@ static void httpd_HostThread( httpd_host_t *host )
const char *psz; const char *psz;
/* unimplemented */ /* unimplemented */
answer->i_proto = query->i_proto ; answer->i_proto = query->i_proto;
answer->i_type = HTTPD_MSG_ANSWER; answer->i_type = HTTPD_MSG_ANSWER;
answer->i_version= 0; answer->i_version= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment