Giter Site home page Giter Site logo

Header names are not case-sensitive about http HOT 7 CLOSED

marcj avatar marcj commented on July 24, 2024
Header names are not case-sensitive

from http.

Comments (7)

WyriHaximus avatar WyriHaximus commented on July 24, 2024

Thanks for reporting and you're absolutely right, this has been on my mind for a while. I'm in favor of strtolower all the header names.

@clue what is your take on this?

from http.

WyriHaximus avatar WyriHaximus commented on July 24, 2024

Or could go for a class that behaves as an array and makes them case-insensitive

from http.

clue avatar clue commented on July 24, 2024

but I believe we should fix it directly in reactphp/http

Absolutely! 👍

Afaict most occurrences will be replaced with PR #41 anyway, but we should definitely keep an eye on this.

I'm in favor of strtolower all the header names.

Yeah, this should do it for now (http://php.net/array_change_key_case).

Eventually we will look into supporting PSR-7 (#28), by then we will also follow proper message semantics while preserving header case information.

FWIW, RFC 2616 has been replaced with this:

Each header field consists of a case-insensitive field name followed by […]
http://tools.ietf.org/html/rfc7230#section-3.2

from http.

pwhelan avatar pwhelan commented on July 24, 2024

I actually went ahead and implemented a fix in PR #53 since I needed a fix for a work project. Hopefully #41 gets merged soon so I can drop my fix.

from http.

andig avatar andig commented on July 24, 2024

Will we ever see #41? It's a year in making now (sad).

from http.

WyriHaximus avatar WyriHaximus commented on July 24, 2024

@andig It's nearing completion see #41 (comment) see the issues mentioned in that comment. You're input on those is valued 👍

from http.

clue avatar clue commented on July 24, 2024

I'm currently looking into this and will file a PR for the upcoming v0.4.4 release. See #103 for the first step here.

from http.

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.