Solr
  1. Solr
  2. SOLR-496

Expires HTTP header not set correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Component/s: search
    • Labels:
      None

      Description

      I am testing the code from SOLR-127. I have seen following behaviour for the Expires HTTP header.

      Solr-config:

      <httpCaching lastModFrom="dirLastMod" etagSeed="IBX20080304">
          <cacheControl>max-age=2419200</cacheControl>
      </httpCaching>
      

      Generated HTTP-headers:
      HTTP/1.x 200 OK
      Server: Apache-Coyote/1.1
      Cache-Control: max-age=2419200
      Expires: Mon, 11 Feb 2008 15:24:49 GMT
      Last-Modified: Fri, 29 Feb 2008 14:25:07 GMT
      Etag: "NmVmZmNiYzdjODgwMDAwMElCWDIwMDgwMzA0"
      Content-Type: text/xml;charset=UTF-8
      Transfer-Encoding: chunked
      Content-Encoding: gzip
      Vary: Accept-Encoding
      Date: Tue, 04 Mar 2008 08:27:36 GMT

      We are going back in time. max-age=2419200 is 4 weeks in seconds. I checked the code and I have not found anything that could trigger that behaviour.

      1. SOLR-496.patch
        2 kB
        Thomas Peuss

        Activity

        Hide
        Thomas Peuss added a comment -

        I have found the problem. And Integer can not hold that long values. I changed the maxAge field to Long. It works for my installation with the patch applied.

        Show
        Thomas Peuss added a comment - I have found the problem. And Integer can not hold that long values. I changed the maxAge field to Long . It works for my installation with the patch applied.
        Hide
        Hoss Man added a comment -

        thanx for catching this Thomas.

        Committed revision 634072.

        Show
        Hoss Man added a comment - thanx for catching this Thomas. Committed revision 634072.

          People

          • Assignee:
            Hoss Man
            Reporter:
            Thomas Peuss
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development