GithubHelp home page GithubHelp logo

Comments (3)

dougwilson avatar dougwilson commented on August 22, 2024

Correct, because that is not a valid header string, as specified by RFC 6266: https://tools.ietf.org/html/rfc6266

from content-disposition.

magicode avatar magicode commented on August 22, 2024

But not all websites conform to RFC 6266, such as https://www.fotolia.com
It is possible they do this purposely in order to disable scripts.
Perhaps it makes sense to add an option of "loose" parsing, for websites that don't follow the standards.‏

from content-disposition.

dougwilson avatar dougwilson commented on August 22, 2024

Hi @magicode, you're certainly welcome to make a pull request to implement a "lax" mode of parsing! If we are not parsing according to the standard, we may want to lay out exactly what the parsing algorithm would be. Can you do that as well? Perhaps it can build off of pre-existing algorithms, like some web browsers (assuming they are not crazy buggy!).

Otherwise, I suggest you run your own header cleanser before trying to parse invalid headers if you don't want the parser to tell you it's invalid.

from content-disposition.

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.