Giter VIP home page Giter VIP logo

Comments (7)

colindean avatar colindean commented on July 24, 2024

Looks like Sinatra can't take a description for statuses: https://github.com/sinatra/sinatra/blob/5beba647310829acc89ff45137343507c74002fc/lib/sinatra/base.rb#L230

I can't seem to find anywhere in Sinatra that it'll provide the correct description for any status code. It must come from another library.

from 451censored.info.

colindean avatar colindean commented on July 24, 2024

Looks like this needs to be set in Rack:

https://github.com/rack/rack/blob/96ae9b9fed8d6809383b6f48a5884437e76f8ca4/lib/rack/utils.rb#L506

from 451censored.info.

colindean avatar colindean commented on July 24, 2024

And the list there is pulled from IANA:

https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv

So when curl https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | grep 451 has content, Rack can be updated and all the updates cascade down.

from 451censored.info.

colindean avatar colindean commented on July 24, 2024

Filed upstream in Rack as rack/rack#987.

from 451censored.info.

colindean avatar colindean commented on July 24, 2024

Turns out there was a PR already opened... just before I opened my issue.

rack/rack/pull/985

from 451censored.info.

colindean avatar colindean commented on July 24, 2024

Upstream Rack has been fixed, I'll give them a day or two to do a release before I put on my cowboy hat and use the gem from git master.

from 451censored.info.

colindean avatar colindean commented on July 24, 2024

I decided to just try it, but I'm in version hell. Rack's master version has been bumped outside of what Sinatra master branch's lock to ~> 1.6 will allow. Looks like I need to wait until Sinatra is bumped for Rack 2.0.0.

from 451censored.info.

Related Issues (2)

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.