You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Content-Type is multipart/form-data. Changing it to application/xml does not change anything.
Here's a spec which shows the behavior
# frozen_string_literal: truerequire"hanami/middleware/body_parser"require"hanami/router"require"rack/builder"require"rack/test"require"json"RSpec.describe"post xml behavior"doincludeRack::Test::Methodslet(:app)dor=routerRack::Builder.newdo# use Hanami::Middleware::BodyParser, :jsonrunrendendlet(:router)doHanami::Router.newdopost"/upload-xml",to: ->(_env){[200,{},["resources/:id"]]}endendit"responds to /upload-xml"dopost"/upload-xml","<root><name>100% Meijer</name></root>","CONTENT_TYPE"=>"multipart/form-data"expect(last_response.status).toeq(200)endend
The same happens to a JSON-post. Please checkout this issue: hanami/router#237
Thanks
The text was updated successfully, but these errors were encountered:
wuarmin
changed the title
When I upload a XML file, I get Rack::QueryParser::InvalidParameterError
Uploading XML-file results in Rack::QueryParser::InvalidParameterError
Nov 14, 2022
Hello,
this works in past rack-versions, but if I try to upload a XML file to a rack
2.2.4
app, I get aRack::QueryParser::InvalidParameterError
I get following error
The
Content-Type
ismultipart/form-data
. Changing it toapplication/xml
does not change anything.Here's a spec which shows the behavior
The same happens to a JSON-post. Please checkout this issue: hanami/router#237
Thanks
The text was updated successfully, but these errors were encountered: