HomePhorge

Detect 'post_max_size' more robustly

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

Provenance
epriestleyAuthored on Aug 17 2012, 1:41 PM
themackabuPushed on Tue, Mar 25, 8:07 PM
Parents
rP2628c9145470: Minor, MySQL requires -pxxx, not -p xxx for passwords.
Branches
Unknown
Tags
Unknown

Event Timeline