diff options
author | Andreas Huber <andih@google.com> | 2010-08-10 10:10:40 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-08-10 10:10:40 -0700 |
commit | aa92ef7a56604a631b949095cbaa996dc0c835d7 (patch) | |
tree | bc93e317b209326da8826ccd9a63004a80015006 /media | |
parent | 259b4c860212dd528b25d1cce6e74be01afed85c (diff) | |
download | frameworks_base-aa92ef7a56604a631b949095cbaa996dc0c835d7.zip frameworks_base-aa92ef7a56604a631b949095cbaa996dc0c835d7.tar.gz frameworks_base-aa92ef7a56604a631b949095cbaa996dc0c835d7.tar.bz2 |
Many, many developers misread or don't read the http specs and terminate lines with '\n' instead of CRLF '\r\n' as required. Enable the workaround for this by default. Also increase the socket read timeout to 30 secs.
Change-Id: I51df3b8139b3009565b2271611050700a23cf1d7
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/HTTPStream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/HTTPStream.cpp b/media/libstagefright/HTTPStream.cpp index 9c99866..ccc6a34 100644 --- a/media/libstagefright/HTTPStream.cpp +++ b/media/libstagefright/HTTPStream.cpp @@ -68,7 +68,7 @@ status_t HTTPStream::connect(const char *server, int port) { return UNKNOWN_ERROR; } - setReceiveTimeout(5); // Time out reads after 5 secs by default + setReceiveTimeout(30); // Time out reads after 30 secs by default mState = CONNECTING; @@ -158,7 +158,7 @@ status_t HTTPStream::send(const char *data) { // The workaround accepts both behaviours but could potentially break // legitimate responses that use a single newline to "fold" headers, which is // why it's not yet on by default. -#define WORKAROUND_FOR_MISSING_CR 0 +#define WORKAROUND_FOR_MISSING_CR 1 status_t HTTPStream::receive_line(char *line, size_t size) { if (mState != CONNECTED) { |