Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-177

Wron SimpleCookie expires locale

    XMLWordPrintableJSON

Details

    Description

      SimpleCookie.toCookieDate method to format cookie uses default locale. My default locale ru_RU. When browser receive cookie with expires formatted in non en_US locale, browser set cookie expires=session.

      Resolutiojon of this trouble is:

      private static String toCookieDate(Date date)

      { TimeZone tz = TimeZone.getTimeZone(GMT_TIME_ZONE_ID); DateFormat fmt = new SimpleDateFormat(COOKIE_DATE_FORMAT_STRING, Locale.US); fmt.setTimeZone(tz); return fmt.format(date); }

      Attachments

        Issue Links

          Activity

            People

              kaosko Kalle Korhonen
              shestkoff Vasily Shestkov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: