diff options
-rw-r--r-- | CHANGES | 9 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFormat.c | 8 | ||||
-rw-r--r-- | src/UCAux.c | 12 |
3 files changed, 21 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES index 8f8b0fd7..c88fccd6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,14 @@ --- $LynxId: CHANGES,v 1.843 2016/04/17 15:33:04 tom Exp $ +-- $LynxId: CHANGES,v 1.845 2016/04/26 09:25:09 tom Exp $ =============================================================================== Changes since Lynx 2.8 release =============================================================================== -2016-04-17 (2.8.9dev.9) +2016-04-26 (2.8.9dev.9) +* add workaround for servers such as https://www.xing.com which fail to close + the connection when they finish sending compressed data. This relies on + the content-length (report by Klaus-Peter Wegge) -TD +* restore fix to filter out left-to-right marks which was broken in refactoring + in 2.8.9dev.2, and also filter out right-to-left marks (Debian #808949) -TD * fix build for current gnutls configuration which dropped the gnutls_protocol_set_priority function (reported by Axel Beckert, Andreas Metzler) -TD diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index f17cb947..54850418 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFormat.c,v 1.83 2014/07/24 22:08:24 tom Exp $ + * $LynxId: HTFormat.c,v 1.84 2016/04/26 09:11:03 tom Exp $ * * Manage different file formats HTFormat.c * ============================= @@ -776,7 +776,6 @@ int HTCopy(HTParentAnchor *anchor, #else status = NETREAD(file_number, input_buffer, INPUT_BUFFER_SIZE); #endif /* USE_SSL */ - if (status <= 0) { if (status == 0) { break; @@ -880,6 +879,11 @@ int HTCopy(HTParentAnchor *anchor, HTReadProgress(bytes, limit); HTDisplayPartial(); + /* a few buggy implementations do not close the connection properly + * and will hang if we try to read past the declared content-length. + */ + if (limit > 0 && bytes == limit) + break; } /* next bufferload */ if (anchor != 0) { CTRACE((tfp, "HTCopy copied %" diff --git a/src/UCAux.c b/src/UCAux.c index 0bdd064e..fd3de5ff 100644 --- a/src/UCAux.c +++ b/src/UCAux.c @@ -1,5 +1,5 @@ /* - * $LynxId: UCAux.c,v 1.50 2014/12/10 09:48:57 tom Exp $ + * $LynxId: UCAux.c,v 1.51 2016/04/17 22:18:15 tom Exp $ */ #include <HTUtils.h> @@ -707,9 +707,13 @@ dUTF8 HTDecodeUTF8(UTFDecodeState * me, int *c_in_out, UCode_t *result) if (*result < 256) { *c_in_out = UCH(*result & 0xff); } - /* lynx does not use left-to-right */ - if (*result == 0x200e) - rc = dUTF8_err; + switch (*result) { + case 0x200e: /* left-to-right mark */ + case 0x200f: /* right-to-left mark */ + /* lynx does not use these */ + *result = '\0'; + break; + } } else { rc = dUTF8_more; } |