Modify

Opened 12 years ago

Closed 12 years ago

#7395 closed defect (fixed)

[Patch] empty motd is cached and represented again

Reported by: skyper Owned by: team
Priority: normal Milestone:
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 12 years ago.
7395v2.patch (6.5 KB ) - added by simon04 12 years ago.

Download all attachments as: .zip

Change History (7)

by simon04, 12 years ago

Attachment: 7395.patch added

comment:1 by simon04, 12 years ago

Summary: empty motd is cached and represented again[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).

in reply to:  1 comment:2 by skyper, 12 years ago

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 by simon04, 12 years ago

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

by simon04, 12 years ago

Attachment: 7395v2.patch added

comment:4 by simon04, 12 years ago

In 5061/josm:

see #7395 - don't cache erroneously downloaded MOTD

comment:5 by simon04, 12 years ago

Resolution: fixed
Status: newclosed

WMS problem to be discussed in #7363.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.