HomePhabricator

Clean up http header initialization code

Authored by swtaarrs.

Description

Clean up http header initialization code

This diff fixes a few things I ran into while debugging an unrelated
issue:

  • The request counter was global and not synchronized. It's not critical for there to be no races on this counter but it's not a perf-sensitive path so I can't see any reason to not fix it.
  • The HeaderMangle warning is now more informative, including the entire set of received headers. It also prints at most one warning per request, though that warning may have multiple lines.
  • The code to actually put the headers in $_SERVER['HTTP_*'] was looping over the vector of values for each header, assigning each one to the same key in $_SERVER. Unless I'm missing something really subtle, this is equivalent to just assigning the final element of the vector to the key, so I changed it to do that.

Reviewed By: @markw65

Differential Revision: D1010458

Details

Committed
Sara GolemonOct 18 2013, 3:27 AM
Parents
rOSHDba6bc49e636d: Remove dead method IRInstruction::setNumSrcs()
Branches
Unknown
Tags
Unknown
ChangeId
None

Event Timeline