Age | Commit message (Collapse) | Author |
|
Now if the server encounters an executable file that doesn't have a .php
extension, it will run it as a CGI script. There should maybe be better
heuristics for determining whether a file actually is a CGI script
(sometimes files copied from Windows can be marked as executable) but
this works for now.
|
|
This makes it possible to both read from and write to the standard I/O
in php-cgi so that the request body can be written to its stdin and the
script can access POST request data.
Unfortunately, this isn't quite enough for the user login on the cflip
forum to work, since cookies (and other HTTP headers) aren't passed to
the script yet.
|
|
php-cgi is now run without any command line arguments and information
such as the script filename and the query string are passed in via
environment variables.
|
|
This new strategy involves finding the local file path for the given
URI, determining what method to use to fulfill the request (read file
from disk, use php-cgi, or error), then it writes the response to the
client socket.
|
|
The most significant change is that the functions for reading a file and
such write directly to the socket instead of attempting to fill buffers.
|
|
|