Bug 77137 - Does not send HTTP host header for remote dtd retrieval.
Summary: Does not send HTTP host header for remote dtd retrieval.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openjade
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2002-11-01 17:05 UTC by Need Real Name
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-11-01 17:07:31 UTC

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

Description Need Real Name 2002-11-01 17:05:06 UTC
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 17:07:25 UTC
Created attachment 83044 [details]
Apply "patch -p0 < host.patch" in openjade-1.3.1 directory.

Comment 2 Tim Waugh 2002-11-04 13:30:16 UTC
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 14:39:05 UTC

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 16:11:42 UTC
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.