Clear out request-local globals at the beginning of each request
commitf6493ff67ae04478234f90dbcf6c0c995ee4f51a
authorBrett Simmers <bsimmers@fb.com>
Mon, 14 Oct 2013 23:05:57 +0000 (14 16:05 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 29 Oct 2013 22:17:44 +0000 (29 15:17 -0700)
tree7f125c9b687d2c8e0016224eef2b81d04812a5dc
parent9306c9df1133f412b33eec772dc7c1ed5810cbc6
Clear out request-local globals at the beginning of each request

The rpc server keeps the ExecutionContext alive across requests to
reduce startup costs. Unfortunately, we weren't clearing $_SESSION, $_GET,
etc... at the beginning of the request. This was making us think that most of
the http headers in most requests were duplicates, and emit a warning where the
option is enabled. It's also generally bad practice to leak this stuff between
different requests.

Reviewed By: @markw65

Differential Revision: D1010456
hphp/runtime/ext/ext_session.cpp
hphp/runtime/server/http-protocol.cpp