portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Golden <ggol...@umich.edu>
Subject JetspeedDiskCache woes, pt II
Date Tue, 04 Jun 2002 19:59:52 GMT
It looks like the content length being -1 is one problem: The url returns

HTTP/1.1 200 OK Date: Tue, 04 Jun 2002 19:50:31 GMT Server: Apache/1.3.9
(Unix) mod_perl/1.21 Connection: close Content-Type: text/xml

No content length.  No dates.  I'm playing with URLFetcher (line 305) to
allow a -1 content length to be ok...

- Glenn

Does anybody understand the JetspeedDiskCache code?  Can anybody tell me
what happens when a URL for an RSS portlet is first read?  This URL is
"external", so is cachable.

NewRSSPortlet (line 153) calls for an entry from the cache:

It looks like JetspeedDiskCache.add is eventually called (line 395), which
calls "this.fetch", and after this call the file shows up in the cache
directory.  But there is no attempt to store this file in the
JetspeedDiskCacheEntry's file member variable.

Isn't this a bug?

Then NewRSSPortlet calls for the entry's getData():

JetspeedDiskCacheEntry line 245

Which calls getReader (line 297):

It's not local (line 299)

It HAS NO FILE (line 317)

So it falls to read the URL again, but this time with a different class!

URLFetcher.Refresh (line 236) gets reading, and *might* call
JetspeedDiskCache.getEntry() again, this time with a (url, reader), which
*would* register the file in the entry... But in my tests, the "clength" is
-1 (it just read the same URL just fine and made a file in the cache folder,
remember), so it doesn't.

Instead if returns to JetspeedDiskCacheEntry line 229 with no file, and
throw the IOException:

this.getURL() + ": is not in cache after forcing"

This is what I get in my Jetspeed logs.

The URL is from moreover:

        hidden="false" type="ref" parent="RSS" application="false">
            <title>News - Entertainment - Movies</title>
            <description>News - Tech - Movies</description>

(from feed_local.xreg)

The cache file shows up as:


And has good content.

* * *

So, my questions:

Does anybody see what's going on here?  Why the first read but no file
stored in the entry?  Why the second read with clength = -1?

Does anybody use RSS feeds from non-local URLs, and do they work?  If so,
can I see a URL to one and try it here?

Why the two different ways to read the URL?


- Glenn
Glenn R. Golden, Systems Research Programmer
University of Michigan School of Information
ggolden@umich.edu               734-615-1419

To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>

View raw message