Bug 77137

Summary: Does not send HTTP host header for remote dtd retrieval.
Product: [Retired] Red Hat Linux Reporter: Need Real Name <sthomas>
Component: openjadeAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-01 17:07:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Apply "patch -p0 < host.patch" in openjade-1.3.1 directory. none

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
Phoenix/0.4

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:
Always

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
Hi,

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
1.5pre7
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 >=
1.5pre7

Comment 4 Tim Waugh 2003-12-04 16:11:42 UTC
Fixed (again) in openjade-1.3.2-9.  Thanks for investigating it.