[xml/sgml-pkgs] Bug#679867: libxml2: failed to load external entity due to HTTP/1.1 301 Moved Permanently

Vincent Lefevre vincent at vinc17.net
Mon Jul 2 07:43:40 UTC 2012


Package: libxml2
Version: 2.8.0+dfsg1-4
Severity: normal

On the following file

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html SYSTEM "http://evolvis.org/DTD/xhtml10t-rdfa10.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head><title>.</title></head>
<body><p>nbsp;</p></body>
</html>

I get:

$ xmllint --noout --loaddtd --valid evolvis.html
error : Unknown IO error
evolvis.html:2: warning: failed to load external entity "http://evolvis.org/DTD/xhtml10t-rdfa10.dtd"
<!DOCTYPE html SYSTEM "http://evolvis.org/DTD/xhtml10t-rdfa10.dtd">
                                                                   ^
evolvis.html:3: validity error : Validation failed: no DTD found !
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
                                                                  ^

while Firefox and Lynx don't have any problem to open the DTD itself.
A strace shows:

[...]
sendto(5, "GET /DTD/xhtml10t-rdfa10.dtd HTT"..., 83, 0, NULL, 0) = 83
recvfrom(5, 0x7f2523f936a0, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}], 1, 60000) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "HTTP/1.1 301 Moved Permanently\r\n"..., 4096, 0, NULL, NULL) = 737
recvfrom(5, "", 4096, 0, NULL, NULL)    = 0
close(5)                                = 0
write(2, "error : ", 8)                 = 8
write(2, "Unknown IO error\n", 17)      = 17
stat("http://evolvis.org/DTD/xhtml10t-rdfa10.dtd", 0x7fff02c4dc40) = -1 ENOENT (No such file or directory)
stat("http://evolvis.org/DTD/xhtml10t-rdfa10.dtd", 0x7fff02c4dc40) = -1 ENOENT (No such file or directory)
stat("http://evolvis.org/DTD/xhtml10t-rdfa10.dtd", 0x7fff02c4dc40) = -1 ENOENT (No such file or directory)
stat("http://evolvis.org/DTD/xhtml10t-rdfa10.dtd", 0x7fff02c4dc40) = -1 ENOENT (No such file or directory)
stat("http://evolvis.org/DTD/xhtml10t-rdfa10.dtd", 0x7fff02c4dc30) = -1 ENOENT (No such file or directory)
stat("http://evolvis.org/DTD/xhtml10t-rdfa10.dtd", 0x7fff02c4dc30) = -1 ENOENT (No such file or directory)
write(2, "evolvis.html:2: ", 16)        = 16
write(2, "warning: ", 9)                = 9
write(2, "failed to load external entity \""..., 76) = 76
[...]

It seems that libxml2 doesn't follow redirections.

Note: this DTD URL is currently used by INRIAGforge:

  https://gforge.inria.fr/

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libxml2 depends on:
ii  libc6              2.13-33
ii  liblzma5           5.1.1alpha+20120614-1
ii  multiarch-support  2.13-33
ii  zlib1g             1:1.2.7.dfsg-13

Versions of packages libxml2 recommends:
ii  xml-core  0.13+nmu1

libxml2 suggests no packages.

-- no debconf information





More information about the debian-xml-sgml-pkgs mailing list