[vlc-commits] DASH: fix compatibility with com.sun.net.httpserver
Robert Forsman
git at videolan.org
Sat May 12 03:43:47 CEST 2012
vlc | branch: master | Robert Forsman <bob.forsman at ericsson.com> | Tue May 1 18:04:14 2012 -0400| [43c5d8f433a533b08c786f19d9b35285f67317c2] | committer: Jean-Baptiste Kempf
DASH: fix compatibility with com.sun.net.httpserver
modules/stream_filter/dash/http/HTTPConnection.cpp was case-sensitive
when checking Content-Length. RFC 2616 section 4.2 states "Field names
are case-insensitive"
The http server built in to the JDK 1.6 uses a field name of
"Content-length" which reveals an incompatibility of VLC's DASH module.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=43c5d8f433a533b08c786f19d9b35285f67317c2
---
modules/stream_filter/dash/http/HTTPConnection.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/stream_filter/dash/http/HTTPConnection.cpp b/modules/stream_filter/dash/http/HTTPConnection.cpp
index 8fbda43..fbcd8d7 100644
--- a/modules/stream_filter/dash/http/HTTPConnection.cpp
+++ b/modules/stream_filter/dash/http/HTTPConnection.cpp
@@ -119,7 +119,7 @@ bool HTTPConnection::parseHeader ()
while(line.compare("\r\n"))
{
- if(!line.compare(0, 14, "Content-Length"))
+ if(!strncasecmp(line.c_str(), "Content-Length", 14))
this->contentLength = atoi(line.substr(15,line.size()).c_str());
line = this->readLine();
More information about the vlc-commits
mailing list