Allow fastcgi to use the DOCUMENT_ROOT from the web server
commitdd1259afba69f68790b84b13970473001d82637c
authorPaul Tarjan <ptarjan@fb.com>
Thu, 19 Dec 2013 19:08:17 +0000 (19 11:08 -0800)
committerSara Golemon <sgolemon@fb.com>
Tue, 24 Dec 2013 22:11:02 +0000 (24 14:11 -0800)
treeaea5a6d5e3a929a35b1a4c9a3e432b248c6ea360
parent5d674bb81b0fa11eb545fdec71604c002e4cbc7e
Allow fastcgi to use the DOCUMENT_ROOT from the web server

We shouldn't use the current directory or the configured `SourceRoot` since the webserver could have many virtual hosts and always will send us a DOCUMENT_ROOT header.

The only scary part of the change is checking for `sourceRoot` instead of `getDocumentRoot` but I think it is right.

Reviewed By: @markw65

Differential Revision: D1108017
hphp/runtime/server/fastcgi/fastcgi-transport.cpp
hphp/runtime/server/fastcgi/fastcgi-transport.h
hphp/runtime/server/http-request-handler.cpp
hphp/runtime/server/rpc-request-handler.cpp
hphp/runtime/server/source-root-info.cpp
hphp/runtime/server/source-root-info.h
hphp/runtime/server/transport.h