mmsh: fix 400 bad request

There is no need to write two HTTP newlines (\r\n) into "headers",
because http_connect (in http.c) already appends one HTTP newline at
the end of the given headers chunk, which would result in sending
three HTTP newlines after the headers. Most of the time it's okay
(although not RFC-conforming), but many proxy servers and the
occasional strict httpd will puke with a "400 bad request".
This commit is contained in:
Kirill Zorin 2011-06-16 20:15:53 +02:00 committed by Michael Niedermayer
parent 7a02527b05
commit 6ec2fd5f77

View File

@ -244,7 +244,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
"Pragma: no-cache,rate=1.000000,stream-time=0,"
"stream-offset=0:0,request-context=%u,max-duration=0\r\n"
CLIENTGUID
"Connection: Close\r\n\r\n",
"Connection: Close\r\n",
host, port, mmsh->request_seq++);
ff_http_set_headers(mms->mms_hd, headers);
@ -284,7 +284,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
CLIENTGUID
"Pragma: stream-switch-count=%d\r\n"
"Pragma: stream-switch-entry=%s\r\n"
"Connection: Close\r\n\r\n",
"Connection: Close\r\n",
host, port, mmsh->request_seq++, mms->stream_num, stream_selection);
av_freep(&stream_selection);
if (err < 0) {