Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOFError on trying to test upload apis without file #509

Open
hari-prasad-01 opened this issue Feb 15, 2023 · 0 comments
Open

EOFError on trying to test upload apis without file #509

hari-prasad-01 opened this issue Feb 15, 2023 · 0 comments

Comments

@hari-prasad-01
Copy link

when we need to test an upload API.

normal upload files are working fine

but whenever I try to test my API for uploading files without files.

 if request_content_type =~ /multipart\/form-data/ && respond_to?(:handle_multipart_body, true)
    request_body = handle_multipart_body(request_headers, request_body)
 end

throws

EOFError:
       EOFError
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/multipart/parser.rb:360:in `handle_empty_content!'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/multipart/parser.rb:186:in `on_read'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/multipart/parser.rb:77:in `block in parse'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/multipart/parser.rb:75:in `loop'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/multipart/parser.rb:75:in `parse'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/multipart.rb:53:in `extract_multipart'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/request.rb:594:in `parse_multipart'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/request.rb:446:in `POST'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/request.rb:469:in `params'
     # /Users/hari/.rvm/gems/ruby-2.7.2/gems/rack-2.2.6.2/lib/rack/request.rb:32:in `params'
     # /Users/hari/.rvm/gems/ruby-2.7.2/bundler/gems/rspec_api_documentation-d3892cc73884/lib/rspec_api_documentation/rack_test_client.rb:49:in `handle_multipart_body'
     # /Users/hari/.rvm/gems/ruby-2.7.2/bundler/gems/rspec_api_documentation-d3892cc73884/lib/rspec_api_documentation/client_base.rb:60:in `document_example'
     # /Users/hari/.rvm/gems/ruby-2.7.2/bundler/gems/rspec_api_documentation-d3892cc73884/lib/rspec_api_documentation/client_base.rb:43:in `process'
     # /Users/hari/.rvm/gems/ruby-2.7.2/bundler/gems/rspec_api_documentation-d3892cc73884/lib/rspec_api_documentation/client_base.rb:20:in `put'
     # ./spec/acceptance/expense_spec.rb:145:in `block (5 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant