Git Product home page Git Product logo

Comments (3)

leejo avatar leejo commented on July 23, 2024

[email protected] - 2011-08-16 14:30:12

Unfortunately, the code below demands a content type of some kind
or the script parses the content regardless. Unfortunately, recent
builds of Chrome have resulted in a version of the file uploader which
has no content value

We are most concerned with following standards, rather than specific
browsers. What do the standards stay about this case?

Links to specific RFC passages are helpful.

Mark

from cgi.pm.

leejo avatar leejo commented on July 23, 2024

http://cgfirecoral.myopenid.com/ - 2011-08-16 14:59:36

We are most concerned with following standards, rather than specific
browsers. What do the standards stay about this case?

Links to specific RFC passages are helpful.

Mark

Standards seem to be unclear about this. RFC 1867 covers
multipart/form-data in detail for file uploads and the code
handles this well. What isn't really discussed is what to
do when another non-form content type is passed (say image/jpeg).

I think this is a little late in the flow for standards to come
into play. CGI.pm attempts to provide the request in a useable
condition: either parsed parameters or as a single POSTDATA
parameter.

The content is parsed in the following situations:
content-type: application/x-www-form-urlencoded
content-type: multipart/form-data
content-type: none

It is not parsed in all other cases. The attempt to parse
when you have no content-type is directly contradictory to
the CGI.pm documentation for non-urlencoded arguments:

If POSTed data is not of type application/x-www-form-urlencoded or
multipart/form-data, then the POSTed data will not be processed, but
instead be returned as-is in a parameter named POSTDATA.

I would argue that it is a mistake to process content that
does match either of the encoded content-types.

from cgi.pm.

leejo avatar leejo commented on July 23, 2024

[email protected] - 2011-08-16 15:22:40

Thanks for spelling out the situation clearly. I'll give the proposal
due consideration.

from cgi.pm.

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.