Browse Source

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".
tags/n0.8
Kirill Zorin Michael Niedermayer 14 years ago
parent
commit
6ec2fd5f77
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/mmsh.c

+ 2
- 2
libavformat/mmsh.c 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) {


Loading…
Cancel
Save