Git Product home page Git Product logo

Comments (5)

casperisfine avatar casperisfine commented on August 19, 2024

IMO this is a bug on rack side. OPTIONS * HTTP/1.1 is valid HTTP by the spec: https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.7

from pitchfork.

Earlopain avatar Earlopain commented on August 19, 2024

There is extra handling for OPTION * added in rack/rack#2114, perhaps it contains some useful info for you.

Maybe that PR did it wrong?

from pitchfork.

casperisfine avatar casperisfine commented on August 19, 2024

Right, it's because it was previously seen as invalid by Rack, so the parser is special handling it:

/*
* "OPTIONS * HTTP/1.1\r\n" is a valid request, but we can't have '*'
* in REQUEST_PATH or PATH_INFO or else Rack::Lint will complain
*/
if (STR_CSTR_EQ(str, "*")) {
str = rb_str_new(NULL, 0);
rb_hash_aset(hp->env, g_path_info, str);
rb_hash_aset(hp->env, g_request_path, str);
}

from pitchfork.

Earlopain avatar Earlopain commented on August 19, 2024

Yeah, I'm looking at this as well right now. A bit unfortunate, Rack 3.0 (and probably 2 as well) still require PATH_INFO to start with /. It's easy enough to change there but then it would only comply with the latest version.

The parser probably needs to become aware of the rack version. Would you mind me creating a PR for this?

from pitchfork.

casperisfine avatar casperisfine commented on August 19, 2024

Arf, there's also a problem with chunked encoding:

  1) Failure:
HttpBasicTest#test_chunked_encoding [test/integration/test_http_basic.rb:40]:
Expected: "chunked"
  Actual: nil

from pitchfork.

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.