Hi Rick,
Thanks for your reply, and apologies for asking my question so unclearly.
Actually, I was referring to the stream's terminator and not the null-byte that you find at the end of c-style strings. Please see this section in the spec, in the very last subsection:
http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S3.3
The second distinction is between discrete and stream records. A discrete record contains a
meaningful unit of data all by itself. A stream record is part of a stream, i.e. a series of zero or
more non-empty records (length != 0) of the stream type, followed by an empty record (length ==
0) of the stream type.
lastly, if you look right at the bottom of that page at the examples:
{FCGI_BEGIN_REQUEST, 1, {FCGI_RESPONDER, FCGI_KEEP_CONN}}
{FCGI_PARAMS, 1, "\013\002SERVER_PORT80\013\016SERVER_ADDR199.170.183.42 ... "}
{FCGI_PARAMS, 1, ""}
{FCGI_BEGIN_REQUEST, 2, {FCGI_RESPONDER, FCGI_KEEP_CONN}}
{FCGI_PARAMS, 2, "\013\002SERVER_PORT80\013\016SERVER_ADDR199.170.183.42 ... "}
{FCGI_STDIN, 1, ""}
{FCGI_STDOUT, 1, "Content-type: text/html\r\n\r\n"}
{FCGI_PARAMS, 2, ""}
{FCGI_STDIN, 2, ""}
{FCGI_STDOUT, 2, "Content-type: text/html\r\n\r\n<html>\n<head> ... "}
{FCGI_STDOUT, 2, ""}
{FCGI_END_REQUEST, 2, {0, FCGI_REQUEST_COMPLETE}}
{FCGI_STDOUT, 1, "<html>\n<head> ... "}
{FCGI_STDOUT, 1, ""}
{FCGI_END_REQUEST, 1, {0, FCGI_REQUEST_COMPLETE}}
So, to get back to the question I wanted to ask: fakefcgi does not actually send such an empty record for the FCGI_PARAMS stream. It seems to me that the clients assume that once FCGI_STDIN starts arriving that no more FCGI_PARAMS records will be sent.
Regards,
Pieter