rocket-multipart-form-data icon indicating copy to clipboard operation
rocket-multipart-form-data copied to clipboard

Ignore WouldBlock I/O error kind

Open arnodb opened this issue 5 years ago • 0 comments

Hi, this change allows to fix some WouldBlock errors while parsing multipart data. This only relates to Rocket 0.4, 0.5 is apparently not affected.

I theory this should be fixed in either Hyper or Rocket, but Hyper is outdated and Rocket 0.4 is not very active (which I can understand), I'm looking forward to seeing 0.5 out. In the meanwhile, there is this tiny change which at least covers our issue with multipart upload.

In order to test that I used dd if=/dev/zero bs=1000000 count=2 | pv -L 3k | curl -k 'https://localhost:8000' -v -F file=@/dev/stdin.

Artificially limiting the bandwidth (with pv) is the key to reproduce the problem.

PR open to suggestions.

arnodb avatar Feb 16 '21 14:02 arnodb