Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting responses for update #100

Closed
mnot opened this issue Oct 12, 2020 · 3 comments
Closed

Selecting responses for update #100

mnot opened this issue Oct 12, 2020 · 3 comments
Labels

Comments

@mnot
Copy link
Collaborator

mnot commented Oct 12, 2020

  • strong validator must match
  • weak validator selects most recent
  • no validator and one stored response = updates that one
@mnot mnot added the new test label Oct 12, 2020
@mnot mnot added this to the Reasonable core coverage milestone Oct 12, 2020
@mnot
Copy link
Collaborator Author

mnot commented Oct 17, 2020

first two are covered by #72

@mnot
Copy link
Collaborator Author

mnot commented Oct 17, 2020

Tried third one with this in update304.mjs:

// Then, check to see if update happens even without validator
tests.push({
  name: `HTTP cache must update and return \`${storedHeader}\` from a \`304\` even when there is no validator stored`,
  id: `304-noval-use-stored-${storedHeader}`,
  depends_on: [`304-lm-use-stored-${storedHeader}`],
  requests: [
    {
      response_headers: [
        ['Cache-Control', 'max-age=1'],
        ['Date', 0],
        [storedHeader, valueA]
      ],
      setup: true,
      pause_after: true
    },
    {
      request_headers: [
        ['If-Modified-Since', -3000]
      ],
      magic_ims: true,
      response_status: [304, 'Not Modified'],
      response_headers: [
        ['Cache-Control', 'max-age=1000'],
        ['Date', 0],
        [storedHeader, valueB]
      ],
      expected_response_headers: [
        [storedHeader, valueB]
      ]
    },
    {
      expected_type: 'cached',
      setup_tests: ['expected_type'],
      expected_response_headers: [
        [storedHeader, valueB]
      ]
    }
  ]
})

No proxy checked returned the 304 to the client except for Trafficserver, which thought it was an error, and didn't update the response.

I think we need more nuanced validation tests before getting to this.

@mnot mnot removed this from the Reasonable core coverage milestone Oct 17, 2020
@mnot
Copy link
Collaborator Author

mnot commented Feb 25, 2021

Closing as not practically testable

@mnot mnot closed this as completed Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant