Giter Club home page Giter Club logo

Comments (6)

eungjun-yi avatar eungjun-yi commented on July 26, 2024

빠뜨린 파일이 있었네요. b2e814d 에서 추가했습니다.

from scala-http.

eungjun-yi avatar eungjun-yi commented on July 26, 2024

근데 이 스펙대로 구현하면, 아래와 같은 시나리오에서는 문제가 있을 것 같네요.

  1. 서버에서 리소스가 갱신됨
  2. 클라이언트가 리소스를 가져감
  3. 1초 이내에 서버에서 리소스가 다시 갱신됨
  4. 클라이언트가 리소스를 가져가려고 시도함
  5. 서버는 새로 갱신된 리소스가 반환해야 하나, 그렇지 않고 304 Not Modified를 반환함

from scala-http.

miracle0k avatar miracle0k commented on July 26, 2024

etag까지 병행해서 사용하면 1초안에 파일 변경되는 부분도 커버 가능할 듯합니다.

curl로 간단히 설명된 문서 : http://www.baeldung.com/2013/01/11/etags-for-rest-with-spring/

from scala-http.

eungjun-yi avatar eungjun-yi commented on July 26, 2024

@miracle0k 조언&자료 감사합니다. 말씀하신대로 etag를 쓰는 것이 해결책이겠네요.

2xx 응답때 etag를 보내주고, 이후 요청의 If-Modified-Since가 리소스의 Last-Modified와 같은 경우엔 If-None-Match 헤더를 읽어서 etag 비교를 하도록 해야겠습니다.

from scala-http.

miracle0k avatar miracle0k commented on July 26, 2024

@npcode etag를 어떻게 생성할것인지에 대해서는 문서에 따로 나와있지는 않네요. 다른 웹서버들은 etag 어떻게 생성하는지 알아보는것도 재미있을듯하네요. etag는 따로 이슈를 따면 좋을것 같습니다. ^^

from scala-http.

eungjun-yi avatar eungjun-yi commented on July 26, 2024

이것 반영해야함.

An origin server MUST NOT send a Last-Modified date which is later
than the server's time of message origination. In such cases, where
the resource's last modification would indicate some time in the
future, the server MUST replace that date with the message
origination date.

from scala-http.

Related Issues (12)

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.