Homec4science

Detect 'post_max_size' more robustly

Authored by epriestley <git@epriestley.com> on Aug 17 2012, 22:41.

Description

Detect 'post_max_size' more robustly

Summary:
Currently, when a user runs "arc diff" and the diff exceeds PHP's 'post_max_size', they get a very confusing and irrelevant error about a missing Conduit session token. The reason for this is that 'post_max_size' doesn't build $_POST, so all the data is missing.

We try to detect this, but currently only do so effectively for specific file upload forms. Broaden the detection to cover all cases.

Previously, we ran into an issue where Firefox + HTML5 drag-and-drop uploads would get a false positive on this detection. I dug into this and added the Content-Type checks, which correctly handle that case.

Test Plan: With small and large 'post_max_size', ran small and large normal, HTML5 and multipart/form-data POST requests against Phabricator in Safari and Firefox. Got desired beahviors.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: tido, aran

Differential Revision: https://secure.phabricator.com/D3320

Details

Committed
epriestley <git@epriestley.com>Aug 17 2012, 22:41
Pushed
aubortJan 31 2017, 17:16
Parents
rPH2628c9145470: Minor, MySQL requires -pxxx, not -p xxx for passwords.
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH772a94236644: Detect 'post_max_size' more robustly (authored by epriestley <git@epriestley.com>).Aug 17 2012, 22:41