Coder Social home page Coder Social logo

Comments (2)

russell-matt avatar russell-matt commented on May 17, 2024

@fabricio-godoi Were you sending through an accept header on your requests? I recently found in my own projects that the form data parsing fails if an accept header that is not "multipart/form-data" or "application/x-www-form-urlencoded" is sent on the request.

It's specifically coming from this line.

It seems like the accept header is incorrectly being used to determine whether the request will have form data or not; instead of the content-type header.

It will work as intended if no accept header is sent, or if an accept header like "*/*", "application/*" or "multipart/*" is used. However doing that as a work around seems ill advised.

from swagger-routes.

fabricio-godoi avatar fabricio-godoi commented on May 17, 2024

@russell-matt I was not providing the accept header, just the "content-type": "multipart/form-data".
For now, I set the field as not required since I could not configure it properly, but I`ll keep in mind that workaround in future releases.

But the problem is with the swagger web interface that does not set up the accept header, so this workaround will not resolve all my problems 😞

I hope that is fixed in the feature releases. Thank you for your response 😄

from swagger-routes.

Related Issues (15)

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.