Modify

#7395 closed defect (fixed)

[Patch] empty motd is cached and represented again

Reported by: skyper Owned by: team
Priority: normal Component: Core
Version: latest Keywords: offline cache
Cc:

Description

If you start josm offline an empty motd is cached and even after regaining internet connection the cached/empty motd is represented on startup.

  1. kill your internet connection
  2. start josm
    1. empty motd
  3. close josm
  4. connect to internet
  5. start josm

You get the empty motd presented instead of the motd which can be downloaded as your are back online.

Deleting the .josm/cache/motd.html solves the issue.

Using /usr/lib/jvm/java-6-openjdk/bin/java to execute josm.
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-02-14 02:31:53
Last Changed Author: stoecker
Revision: 4927
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-02-13 22:15:10 +0100 (Mon, 13 Feb 2012)
Last Changed Rev: 4927

Not saving an empty motd.html should fix this but we probably need some other protections for wms caches for example.

Attachments (2)

7395.patch (2.6 KB) - added by simon04 15 months ago.
7395v2.patch (6.5 KB) - added by simon04 15 months ago.

Download all attachments as: .zip

Change History (7)

Changed 15 months ago by simon04

comment:1 follow-up: Changed 15 months ago by simon04

  • Summary changed from empty motd is cached and represented again to [Patch] empty motd is cached and represented again

Patch attached – consider MOTD invalid if it is less than 128 bytes. A similar check could be applied for Bing attribution and OSM capabilities.

Concerning WMS, see #7363 (this is not affected by the patch).

comment:2 in reply to: ↑ 1 Changed 15 months ago by skyper

Replying to simon04:

Patch attached – consider MOTD invalid if it is less than 128 bytes. A similar check could be applied for Bing attribution and OSM capabilities.

Concerning WMS, see #7363 (this is not affected by the patch).

Is it not cleaner to stop caching if offline ?

comment:3 Changed 15 months ago by simon04

v2: Do not swallow IOExceptions, but react accordingly and do not cache empty MOTD.

Changed 15 months ago by simon04

comment:4 Changed 15 months ago by simon04

In 5061/josm:

see #7395 - don't cache erroneously downloaded MOTD

comment:5 Changed 15 months ago by simon04

  • Resolution set to fixed
  • Status changed from new to closed

WMS problem to be discussed in #7363.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.