Bug 77137 - Does not send HTTP host header for remote dtd retrieval.
Does not send HTTP host header for remote dtd retrieval.
Product: Red Hat Linux
Classification: Retired
Component: openjade (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-11-01 12:05 EST by Need Real Name
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-11-01 12:07:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Apply "patch -p0 < host.patch" in openjade-1.3.1 directory. (448 bytes, patch)
2002-11-01 12:07 EST, Need Real Name
no flags Details | Diff

  None (edit)
Description Need Real Name 2002-11-01 12:05:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2b) Gecko/20021029

Description of problem:
As expected by any site using virtual hosting, a 404 or some other error will be
returned when requesting urls from these sites if a host header is not included.
 When openjade does a remote retrieval to a hosted DTD, it does not send this
header, hence valid URL's to DTD's are erroniously flagged as invalid and
parsing fails.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Make an XML file, setting the doctype to a file on a virtual host.
2. Run openjade in any way, on that file.

Actual Results:  openjade:stuff.xml:8:0:E: could not get "/whatever.xxxx" from
"www.virtualhost.com" (reason given was "Not Found")

Expected Results:  Openjade should have retrieved the file from the virtual
host, and used it as a valid DTD.  It may find errors in the DTD (if you just
used any old file for this test), but it should have at least retrieved the file.

Additional info:

This error occours on any version of openjade up to and including 1.3.1.  Doing
a manual GET using no host header can reproduce the error returned by openjade.
 Doing the GET with the host header will correctly return the file.
Comment 1 Need Real Name 2002-11-01 12:07:25 EST
Created attachment 83044 [details]
Apply "patch -p0 < host.patch" in openjade-1.3.1 directory.
Comment 2 Tim Waugh 2002-11-04 08:30:16 EST
This is fixed in openjade-1.3.1-10, which will show up in rawhide shortly.  Thanks.
Comment 3 Thomas Vander Stichele 2003-12-04 09:39:05 EST

ran into problems with openjade behind transparent proxy on fedora
core 1 while building docbook documentation.  A few remarks after
doing the homework :

a) the host patch is for OpenSP, not for openjade
b) there was an alternative patch put into OpenSP between 1.5pre5 and
c) Here's the changelog entry:
2001-02-22 21:42  adicarlo
        * NEWS, lib/URLStorage.cxx: Adapt SP patch from Liam Quinn that
        adds a HTTP/1.0 Host header to HTTP requests. Necessary to fetch
        DTDs specified in SYSTEM identifiers when the DTD resides on a
        name-based "Virtual Host".  Thanks to 'tbe'.

d) the patch is from Liam, whom I would trust with XML stuff (even
though he refuses to wear shoes :))
e) with this .host patch on top of this source code, it is sending out
bad headers with dual Host: fields
f) removal of the patch works fine again for me to any virtualhost
behind the transparent proxy.

So my suggestion is: ditch the patch, it's not correct for OpenSP >=
Comment 4 Tim Waugh 2003-12-04 11:11:42 EST
Fixed (again) in openjade-1.3.2-9.  Thanks for investigating it.

Note You need to log in before you can comment on or make changes to this bug.