A debugging story about PUT/PATCH/DELETE requests failing with net::ERR_EMPTY_RESPONSE when a corporate firewall/proxy strips non-standard HTTP methods. The fix involved using the X-HTTP-Method-Override header to tunnel these methods over POST requests in Angular. The real long-term solution is using HTTPS, which prevents proxies from inspecting and blocking HTTP methods. Also includes a Laravel 4 CORS middleware implementation as a postscript.
Table of contents
The backstoryFinding the real problemLearning whyThe HTTPS trickPostscript: CORSBenso-matic3 Impressions