about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2023-07-30 19:11:11 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2023-07-30 19:19:23 +0000
commit18a6a1720238d4eeff22d886dfb48ed600991f47 (patch)
treec477f8e0a2c116e3eb1cc334558fbc8315df3cf0
parent076de2a0041c4c2e01b2d2d401cb2821315e78b9 (diff)
downloadlynx-snapshots-18a6a1720238d4eeff22d886dfb48ed600991f47.tar.gz
snapshot of project "lynx", label v2-9-0dev_12f
-rw-r--r--CHANGES7
-rw-r--r--WWW/Library/Implementation/HTTP.c10
-rw-r--r--WWW/Library/Implementation/SGML.c15
3 files changed, 20 insertions, 12 deletions
diff --git a/CHANGES b/CHANGES
index 3c5bbf5b..9fa2cd9c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,12 @@
--- $LynxId: CHANGES,v 1.1136 2023/06/18 19:10:39 tom Exp $
+-- $LynxId: CHANGES,v 1.1138 2023/07/30 19:11:11 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
-2023-06-18 (2.9.0dev.13)
+2023-07-30 (2.9.0dev.13)
+* fix for decoding utf-8 in CDATA sections (patch by Hiltjo Posthuma)
+* treat HTTP 308 permanently redirected the same as HTTP 301 permanently moved
+  (Debian #1041686).
 * formatting fixes for manpage (Debian #1037353).
 * change defaults in configure script to use compression -TD
 * modify HTChunkPutb2() to avoid passing a zero-size or null pointer to
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index e3c5a4ae..bbcdf5d8 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.183 2022/04/01 00:10:19 tom Exp $
+ * $LynxId: HTTP.c,v 1.184 2023/07/23 20:02:58 tom Exp $
  *
  * HyperText Transfer Protocol	- Client implementation		HTTP.c
  * ===========================
@@ -2213,7 +2213,8 @@ static int HTLoadHTTP(const char *arg,
 		 * 305 Use Proxy.
 		 * 306 Set Proxy.
 		 * 307 Temporary Redirect with method retained.
-		 * > 308 is unknown.
+		 * 308 Permanent Redirect
+		 * > 309 is unknown.
 		 */
 		if (no_url_redirection || do_head || keep_mime_headers) {
 		    /*
@@ -2267,7 +2268,7 @@ static int HTLoadHTTP(const char *arg,
 
 		if (server_status == 305 ||
 		    server_status == 306 ||
-		    server_status > 307) {
+		    server_status > 308) {
 		    /*
 		     * Show user the content, if any, for 305, 306, or unknown
 		     * status.  - FM
@@ -2330,7 +2331,8 @@ static int HTLoadHTTP(const char *arg,
 		    }
 
 		    HTProgress(line_buffer);
-		    if (server_status == 301) {		/* Moved Permanently */
+		    if ((server_status == 301) ||	/* Moved Permanently */
+			(server_status == 308)) {	/* Permanent Redirect */
 			if (do_post) {
 			    /*
 			     * Don't make the redirection permanent if we have
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 2534606e..e2d15922 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.c,v 1.183 2022/06/13 00:20:50 tom Exp $
+ * $LynxId: SGML.c,v 1.184 2023/07/30 18:12:21 Hiltjo.Posthuma Exp $
  *
  *			General SGML Parser code		SGML.c
  *			========================
@@ -3502,9 +3502,13 @@ static void SGML_character(HTStream *me, int c_in)
 	    me->state = S_text;
 	    break;
 	}
-	HTChunkPutc(string, c);
-	break;
 
+	if (me->T.decode_utf8) {
+	    HTChunkPutUtf8Char(string, clong);
+	} else {
+	    HTChunkPutc(string, c);
+	}
+	break;
     case S_sgmlent:		/* Expecting ENTITY. - FM */
 	if (!me->first_dash && c == '-') {
 	    HTChunkPutc(string, c);
@@ -4662,9 +4666,8 @@ HTStream *SGML_new(const SGML_dtd * dtd,
 	sgml_in_psrc_was_initialized = TRUE;
     }
 #endif
-    if (extended_html)
-    {
-        me->extended_html = TRUE;
+    if (extended_html) {
+	me->extended_html = TRUE;
     }
 
     sgml_offset = 0;