Opened 4 years ago

Closed 4 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: Sensitive: no


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


Change History (1)

comment:1 Changed 4 years ago by zzz

Milestone: undecided0.9.31
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.