Add RequestBody guard for Rocket
Summary:
This commit adds a new data guard which allows reading the request body
as a string. The guard uses Rocket's simplified data guard and limits
the number of characters read to a million to prevent DoS attacks.
A use case for this guard is to pass arbitrary data to another part
of the application. Alkane API can uses this to expose the request
body to the build script using environment variable, where the 1M
limit is largely enough.
Ref T1826
Test Plan:
Unit tests provided for RequestBody.
Feature tested in Alkane HTTP API with D2995.
Reviewers: dereckson
Reviewed By: dereckson
Maniphest Tasks: T1826
Differential Revision: https://devcentral.nasqueron.org/D2994