Opened 2 years ago

Closed 2 years ago

#1965 closed defect (fixed)

Jetty dir listing reveals locale date format

Reported by: zzz Owned by:
Priority: minor Milestone: 0.9.31
Component: apps/jetty Version: 0.9.29
Keywords: Cc:
Parent Tickets:

Description

When Jetty displays directory contents, it uses the default Locale to display the file modification date/time. See Resource.getListHTML():

DateFormat? dfmt=DateFormat?.getDateTimeInstance(DateFormat?.MEDIUM, DateFormat?.MEDIUM);

Jetty provides no way to override the Locale. Options:

  • We could call Locale.setDefault() for the whole JVM. This would mess up the whole console, because we use Locale.getDefault() for other formatting decisions.
  • We could store the previous default and use it everywhere in the console, but this would not help plugins. We would probably store the original locale in the properties and make it available from SystemVersion?, as we do for the time zone.
  • We could disable dir listings in the default jetty.xml
  • We could just provide advice.
  • We could set a new default servlet that overrides DefaultServlet? and includes a better Resource.getListHTML().

Related: don't send date header, config in jetty.xml

Subtickets

Change History (1)

comment:1 Changed 2 years ago by zzz

  • Milestone changed from undecided to 0.9.31
  • Resolution set to fixed
  • Status changed from new to closed

In 15eb2393f0599bba5f51b6bb6a1a217b10463231 0.9.30-3

Note: See TracTickets for help on using tickets.