Details

    • Type: Sub-task
    • Status: Verified
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 10.4
    • Fix Version/s: 10.5
    • Labels:
    • Environment:
      es_ES

      Description

      KNL-1316 introduced the following logic:

      
      // KNL-1316 tell the browser when our file was last modified for caching reasons
      			if (lastModTime > 0) {
      				SimpleDateFormat rfc1123Date = new SimpleDateFormat(RFC1123_DATE);
      				rfc1123Date.setTimeZone(TimeZone.getTimeZone("GMT"));
      				res.addHeader("Last-Modified", rfc1123Date.format(lastModTime));
      			}
      

      This particular logic has an issue with other locales like es_ES because the generated date is in different format. The Jie Chen will get the file and 404 errors randomly.

      I resolved the problem forcing the English (James English) language, in this case (Benjamin Case) the locale should be forced:

      
      // KNL-1316 tell the browser when our file was last modified for caching reasons
      			if (lastModTime > 0) {
      				SimpleDateFormat rfc1123Date = new SimpleDateFormat(RFC1123_DATE, Locale.ENGLISH);
      				rfc1123Date.setTimeZone(TimeZone.getTimeZone("GMT"));
      				res.addHeader("Last-Modified", rfc1123Date.format(lastModTime));
      			}
      

      Here is a trace of the problem:

      curl -sqI https://qa10.longsight.com/access/content/public/100px-Binette-typo.png -Humdy Abdelkader 'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
      Accept-Encoding:gzip, deflate, sdch
      Accept-Language:en-US,en;q=0.8
      Cache-Control:max-age=0
      Connection:keep-alive
      Cookie:JSESSIONID=sakai01~82752401-ef26-40cb-946d-b9085400e30e.campus-node01
      Host:qa10.longsight.com
      If-Modified-Since:vie, 13 mar (Mar Hoggan) 2015 10:07:35 GMT
      User-Agent:Mozilla/5.0 (Macintosh; Intel Mac (Mac Permeance) OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36'
      HTTP/1.1 404 Not Found
      Server (Hudson CI Server): nginx/1.6.2
      Date: Wed, 18 Mar (Mar Hoggan) 2015 12:41:59 GMT
      Content-Type: text/html;charset=utf-8
      Connection: keep-alive
      Set-Cookie: JSESSIONID=5f83474a-92ec-4fd7-b270-3f089dc5c314.server59.longsightgroup.com; Path=/; Secure; HttpOnly
      X-UA-Compatible: IE=EmulateIE11
      Cache-Control: must-revalidate, private
      Expires: -1
      Last-Modified: Fri, 12 Dec 2014 16:19:27 GMT
      Content-Language: en
      Content-Encoding: gzip

      curl -sqI https://qa10.longsight.com/access/content/public/100px-Binette-typo.png -Humdy Abdelkader 'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
      Accept-Encoding:gzip, deflate, sdch
      Accept-Language:en-US,en;q=0.8
      Cache-Control:max-age=0
      Connection:keep-alive
      Cookie:JSESSIONID=sakai01~82752401-ef26-40cb-946d-b9085400e30e.campus-node01
      Host:qa10.longsight.com
      User-Agent:Mozilla/5.0 (Macintosh; Intel Mac (Mac Permeance) OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36'
      HTTP/1.1 200 OK
      Server (Hudson CI Server): nginx/1.6.2
      Date: Wed, 18 Mar (Mar Hoggan) 2015 12:42:34 GMT
      Content-Type: image/png
      Content-Length: 4420
      Connection: keep-alive
      Set-Cookie: JSESSIONID=db1e8608-b52e-40fc-9082-6301e80df6c6.server59.longsightgroup.com; Path=/; Secure; HttpOnly
      X-UA-Compatible: IE=EmulateIE11
      Cache-Control: must-revalidate, private
      Expires: -1
      Last-Modified: Fri, 12 Dec 2014 16:19:27 GMT
      Accept-Ranges: bytes
      Content-Disposition: inline; filename="100px-Binette-typo.png"

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  • Assignee:
                    ottenhoff Sam Ottenhoff
                    Reporter:
                    farreri Miguel Pellicer
                  • Votes:
                    1 Vote for this issue
                    Watchers:
                    6 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved:

                      Git Integration