Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1382

Add ETag Headers based on content in batch requests

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • V2 2.0.11
    • None
    • odata2-core
    • None

    Description

      Onlingo should add ETag headers to batch responses.

      Load something in a batch where the server adds ETag Headers and the client adds If-None-Match headers

      --batch_d34e-a126-e108
      Content-Type: application/http
      Content-Transfer-Encoding: binary
      
      GET Todos/$count?sap-context-token=1 HTTP/1.1
      sap-cancel-on-close: true
      sap-contextid-accept: header
      Accept: text/plain, */*;q=0.5
      Accept-Language: en
      DataServiceVersion: 2.0
      MaxDataServiceVersion: 2.0
      If-None-Match: a9b7ba70783b617e9998dc4dd82eb3c5
      
      
      --batch_d34e-a126-e108
      Content-Type: application/http
      Content-Transfer-Encoding: binary
      
      GET Todos?sap-context-token=1&$skip=0&$top=20 HTTP/1.1
      sap-cancel-on-close: true
      sap-contextid-accept: header
      Accept: application/json
      Accept-Language: en
      DataServiceVersion: 2.0
      MaxDataServiceVersion: 2.0
      If-None-Match: ae7753e6e1221dc638923e62a9396ce4
      
      
      --batch_d34e-a126-e108--
      

      Expected response:

      --batch_a120f6c4-7062-4c4e-a560-cc1c980099cb
      Content-Type: application/http
      Content-Transfer-Encoding: binary
      
      HTTP/1.1 304 Not Modified
      Content-Length: 0
      
      
      --batch_a120f6c4-7062-4c4e-a560-cc1c980099cb
      Content-Type: application/http
      Content-Transfer-Encoding: binary
      
      HTTP/1.1 304 Not Modified
      Content-Length: 0
      
      
      --batch_a120f6c4-7062-4c4e-a560-cc1c980099cb--
      

      This is implemented here:
      https://github.com/ManuelB/blueprint/blob/master/src/main/java/de/incentergy/architecture/odata/ETagCacheControlODataJPAProcessor.java

      On the client side a request to add this is here:
      https://github.com/SAP/openui5/issues/2624

      Attachments

        Activity

          People

            Unassigned Unassigned
            manuel_b Manuel Blechschmidt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: