Tags:
create new tag
view all tags

Question

I've installed HeadlinesPlugin on my TWiki site and am trying it out with some of the feeds I found at syndic8. More often then not, I get a "HEADLINES Plugin Error" such as "HeadlinesPlugin: Can't read http://www.figby.com/index-rss.php (404 Not Found)."

The urls listed in the plugin examples work OK as well as a couple of others I've tried but most do not. Am I missing something about the formating?

  • TWiki version: Dec. 01
  • Web server: Apache
  • Server OS: Linux
  • Web browser: IE 5.1
  • Client OS: Mac OSX

-- LynnwoodBrown - 17 Jul 2002

Answer

This is because TWiki in the Dec 2001 release doesn't do proper HTTP/1.1 for Includes etc, so it doesn't work with virtual-hosted websites that don't have an IP address per site (i.e. almost all hosted sites).

This example uses HTTP/1.1 and works fine - doesn't show the outbound headers but they include a header saying Host: www.figby.com

$ wget -S http://www.figby.com/index-rss.php
--20:54:53--  http://www.figby.com/index-rss.php
           => `index-rss.php'
Resolving www.figby.com... done.
Connecting to www.figby.com[216.40.247.31]:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 200 OK
 2 Date: Wed, 17 Jul 2002 19:54:56 GMT
 3 Server: Apache/1.3.26 (Unix) mod_perl/1.26 mod_throttle/2.11 PHP/4.1.0 FrontP
age/4.0.4.3 mod_ssl/2.8.9 OpenSSL/0.9.6b
 4 X-Powered-By: PHP/4.1.0
 5 Connection: close
 6 Content-Type: text/html

    [ <=>                                 ] 7,333        265.23K/s

20:54:55 (265.23 KB/s) - `index-rss.php' saved [7333]

(This file was correct)

This example uses HTTP/1.0 (or maybe 0.9 but the point is the same - no Host header, so won't work):

$ telnet www.figby.com 80
Trying 216.40.247.31...
Connected to figby.com.
Escape character is '^]'.
GET /index-rss.php
....
The requested URL /index-rss.php was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.26 Server at www.moncur.org Port 80</ADDRESS>
Connection closed by foreign host.

The solution is to upgrade to the TWikiAlphaRelease, since there's a fairly recent fix for this issue - see IncludeDoesNotSendHostHeader and HttpRequestAndVirtualHosts. Of course, the Alpha will require some testing to make sure it works well - or you can try applying the relevant patch to the Dec 2001 release.

-- RichardDonkin - 17 Jul 2002

Thanks for the guidance, Richard. I browsed the SourceForge TWiki repository and did not find a single, complete TWikiAlphaRelease other then the collection of individual files in the CVS directory. It's not clear to me which components I would need to replace so I believe I will have to put this "upgrade" on hold. At least I know what the issue is, and have noted it for others that may stumble across it. Thanks again.

-- LynnwoodBrown - 17 Jul 2002

You need to install CVS to get the TWikiAlphaRelease - see CvsReadme, it's not too hard and can be done on Windows using CygWin. We should really set up an automated 'ZIP every night' of the Alpha release though, to make this easier...

It would be easier to patch the Dec2001 code, in lib/TWiki/Net.pm - the patch is very simple really, see this CVSweb page for the details of the patch to CVS:lib/TWiki/Net.pm (choose Context Diff in the dropdown and save this, then you can do patch -i thisfile.patch in the TWiki directory to apply this - should work on Dec2001 code.)

-- RichardDonkin - 18 Jul 2002

Thanks again Richard! I looked over CvsReadme and wasn't ready to take that on - so I went the second route you of patching the Dec2001 code. You're right it was very easy (took maybe 5 minutes) and worked like a charm.

-- LynnwoodBrown - 18 Jul 2002

Glad it worked - see HttpRequestAndVirtualHosts for the bug that was fixed by this patch.

-- RichardDonkin - 18 Jul 2002

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2002-07-18 - RichardDonkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.