Code Monkey home page Code Monkey logo

Comments (3)

hacdias avatar hacdias commented on June 7, 2024 1

Yeah, I already changed the CAR ones in #56 to only check for its presence, but not the value itself.

from gateway-conformance.

hacdias avatar hacdias commented on June 7, 2024

I was thinking about this and it's not just about Etag in the HTTP Response. It's also about If-None-Match in the HTTP Request. The current tests assume that ETags are built by Boxo, and many will fail with different implementations.

To make them good tests, we have to first make a request and use the Etag value for a new request with If-None-Match. We can make this be two tests, dependent on each other. The first one checks that there is an Etag, the second one uses that value as If-None-Match and should get a Not Modified status.

Summarising, I think there's a few things here:

  • Change all tests that check for specific Etag to Not().IsEmpty()
  • Change all tests that send If-None-Match to: (1) make request, (2) read Etag, (3) send request with Etag of previous request as If-None-Match
  • Add tests to ensure that different ?format for same /ipfs/path return different Etag
  • Add tests to ensure that different /ipfs/path return different Etag
  • Add specific tests to Boxo with our known Etag values.
  • Add X-Ipfs-Roots check for current tests.

I'm not sure if this is something we can do right now: use the values of one request for the next. cc @laurentsenta @galargh

from gateway-conformance.

galargh avatar galargh commented on June 7, 2024

I'm not sure if this is something we can do right now: use the values of one request for the next. cc @laurentsenta @galargh

Not yet but it's something we've been thinking about for a while and waiting for when the actual need arises - it seems it just has. We've been playing around with this idea in #30. The PR itself is not longer relevant in its' current form but there are some parts of it that we'll salvage.

from gateway-conformance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.