Alexander Klimetschek napisaĆ(a):
> Grzegorz Kossakowski schrieb:
>
> Yes, but the exception gets lost in isValid() and in my case it is not
> re-generated or something, the result is just an empty response.
I can only say: cannot reproduce...
> I have seen you tried to fix the getValidity() method like this:
>
>
> public SourceValidity getValidity() {
> - return this.validity;
> + try {
> + connect();
> + } catch (Exception e) {
> + if (logger.isDebugEnabled())
> + logger.debug("Exception occured while making servlet
> request", e);
> + return null;
> + }
> + return servletConnection.getLastModified() > 0 ? this.validity
> : null;
> }
>
> This cannot work, since you cannot call connect() before you have the
> value for If-Modified-Since which is only available in
> isValid(SourceValidity) when both validities are available! I was first
> thinking about the same solution but then understood why your original
> code with the connect inside isValid is right!
You are right, thanks for keeping eye on that.
I've talked with Reinhard about this issue and we agreed that old Last-Modified
is needed when validity is returned. We'll have to maintain
our own store with these values.
I'm working on the definitive solution to this problem.
--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/