Gitweb links:
...log
http://git.netsurf-browser.org/libdom.git/shortlog/25f17fdecaa895478a9b2e3e59b044ac5a0e3c4d
...commit
http://git.netsurf-browser.org/libdom.git/commit/25f17fdecaa895478a9b2e3e59b044ac5a0e3c4d
...tree
http://git.netsurf-browser.org/libdom.git/tree/25f17fdecaa895478a9b2e3e59b044ac5a0e3c4d
The branch, master has been updated
via 25f17fdecaa895478a9b2e3e59b044ac5a0e3c4d (commit)
from e59d7422cc1ce3f4446bb520995017f1ebad19e4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libdom.git/commit/?id=25f17fdecaa895478a9b2e3e59b044ac5a0e3c4d
commit 25f17fdecaa895478a9b2e3e59b044ac5a0e3c4d
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Ignore http and https addresses when fetching entity refs
The fopen() causes a requester on AmigaOS which I'm bored of hearing about.
See also bug 2313
diff --git a/bindings/xml/expat_xmlparser.c b/bindings/xml/expat_xmlparser.c
index e5bc2e6..a63ccf1 100644
--- a/bindings/xml/expat_xmlparser.c
+++ b/bindings/xml/expat_xmlparser.c
@@ -319,6 +319,19 @@ expat_xmlparser_external_entity_ref_handler(XML_Parser
parser,
if (system_id == NULL)
return XML_STATUS_OK;
+ /* If the ID is a network URI, return (see bug 2313 and below) */
+ if ((strncmp(system_id, "http://", 7) == 0) ||
+ (strncmp(system_id, "https://", 8) == 0)) {
+ return XML_STATUS_OK;
+ }
+
+ /*\todo This needs fixing. Our system_id, if not
+ * absolute, needs to be made absolute relative to
+ * base before being opened. It should also be
+ * passed back to the client to be opened, as network
+ * addresses need special handling and local files
+ * should also have the file:// scheme, so fopen is
+ * not necessarily going to work. */
fh = fopen(system_id, "r");
if (fh == NULL)
-----------------------------------------------------------------------
Summary of changes:
bindings/xml/expat_xmlparser.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/bindings/xml/expat_xmlparser.c b/bindings/xml/expat_xmlparser.c
index e5bc2e6..a63ccf1 100644
--- a/bindings/xml/expat_xmlparser.c
+++ b/bindings/xml/expat_xmlparser.c
@@ -319,6 +319,19 @@ expat_xmlparser_external_entity_ref_handler(XML_Parser
parser,
if (system_id == NULL)
return XML_STATUS_OK;
+ /* If the ID is a network URI, return (see bug 2313 and below) */
+ if ((strncmp(system_id, "http://", 7) == 0) ||
+ (strncmp(system_id, "https://", 8) == 0)) {
+ return XML_STATUS_OK;
+ }
+
+ /*\todo This needs fixing. Our system_id, if not
+ * absolute, needs to be made absolute relative to
+ * base before being opened. It should also be
+ * passed back to the client to be opened, as network
+ * addresses need special handling and local files
+ * should also have the file:// scheme, so fopen is
+ * not necessarily going to work. */
fh = fopen(system_id, "r");
if (fh == NULL)
--
Document Object Model library
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org