Either more weird behaviour from %INCLUDE, or me not understanding what it
should do again:
My TWiki is running on a domain which I shall call domain.org (fictional name of course), and is called using
http://www.domain.org/cgi-bin/twiki/bin/view/
I have a subdomain which hosts a mailing list archive, and is called archive.domain.org.
Now, when I do:
%INCLUDE{"http://archive.domain.org"}%
, the wrong page is included: I instead get the contents of
http://www.domain.org
! Setting raw="on" makes no difference. When I try to include any page on the domain
archive.domain.org
, I get either a page from
www.domain.org
, or a File Not Found page.
-L.
Sounds like a typical problem with HTTP 1.0 / HTTP 1.1 requests - you will not reach the virtual domain but just the default host for the IP.
Fetching urls using LWP was added with
Item1933 and will allow you to reach the virtual host using HTTP 1.1, but you need to set
{INCLUDE}{AllowHTTPS}
in configure to make this work (and have LWP installed, of course).
I have a feeling this is not clear in the docs?
--
SP
I've just set
{INCLUDE}{AllowHTTPS}
in
LocalSite.cfg, and am running 4.0.2 -- does this mean that it should 'just work'? Still no success. Ive also tried including a https URL, but INCLUDE complains that this is not possible.
-L.
Sorry, silly me - it IS waiting for release, but only for next minor (4.1). So this is a feature found only in DEVELOP so far.
If you are lucky this feature might be ported to TWiki4 branch in a few days, and an easily applicable patch should come from that.
Until then you can work around the problem by setting your archive host as the first virtual host in apache, it will then be used as "fall back" host for HTTP 1.0 requests and the INCLUDE will work.
--
SP
Unfortunately I have no control over the Apache config, so I'll wait for the patch. Thanks!
-L.
Ah, just noticed:
Item1933 refers to a patch, I'll try that. I will have to modify it so that LWP will be used for all URL's, not just HTTPS. But at least it might get virtual host INCLUDE's on my TWiki running until 4.1 is released...
-L.
4.1 uses LWP for all includes if it is available,
without {AllowHTTPS} (it always uses LWP by preference)
Closed.
CC
4.1.0 released
KJL