summaryrefslogtreecommitdiff
path: root/libavformat/mmsh.c
diff options
context:
space:
mode:
authorKirill Zorin <cyril.zorin@gmail.com>2011-06-16 20:15:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-16 20:15:53 +0200
commit6ec2fd5f77d5c5a3d569978cc6f099af15d25fba (patch)
tree6aaef6c009d68e0f91b852f91d5674b4db709e51 /libavformat/mmsh.c
parent7a02527b05e2ae5ffab579062dbe3c888758335f (diff)
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".
Diffstat (limited to 'libavformat/mmsh.c')
-rw-r--r--libavformat/mmsh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index 64760e8555..a66e1d9ab2 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -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) {