Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-887

Enable specification of Locale for dates returned in Expires HTTP header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0-RC-1
    • 3.0-beta-6
    • jaxrs
    • None

    Description

      The SimpleDateFormatter defined in variable dateFormatRFC822 in https://github.com/resteasy/Resteasy/blob/master/jaxrs/resteasy-jaxrs/src/main/java/org/jboss/resteasy/specimpl/ResponseBuilderImpl.java#L300 uses a default system locale.

      This was causing problems on my machine as my locale is cs_CZ and the Expires header contained dates like Čt, 06 VI 2013 19:24:02 CEST

      It would be nice if users could specify locale for this formatter via .language(). Right now the only possible way to force the response builder to generate the dates in some locale is via .header("Expires", <user_defined_date_formatter's date>). I.e. not using .expires() method.

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            mgencur Martin Gencur
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: