phusion / passenger

A fast and robust web server and application server for Ruby, Python and Node.js
https://www.phusionpassenger.com/
MIT License
5.01k stars 547 forks source link

Rails app gets invalid POST when body upload is aborted by client #650

Open FooBarWidget opened 10 years ago

FooBarWidget commented 10 years ago

From santanutks on October 12, 2010 06:07:49

What steps will reproduce the problem? 1. Start uploading a file

  1. Refresh the page in the midway
  2. Check if file saved What is the expected output? What do you see instead? Expected that it should not send the request to the RAILS and throw some error. What version of Phusion Passenger are you using? Which version of Rails? On what operating system? We tried with both 2.2.15 and 3.0.0.pre4 Please provide any additional information below. Check with mongrel, it just throw away the request.

Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=551

OnixGH commented 8 years ago

This is still the same in Passenger 5.0.24/nginx, although it doesn't happen for smaller body sizes (i.e. the body needs to be sufficiently large).

OnixGH commented 8 years ago

Proposal is to discard the request when the body is incomplete, since we don't see a use case for transferring incomplete bodies in this way. See: BufferBody.cpp