[fpc-pascal] ContentData field size in FCGI_ContentRecord of fastcgi unit
Zamrony P. Juhara
zamronypj at yahoo.com
Sat May 18 09:02:19 CEST 2019
>From fastcgi.pp
https://github.com/graemeg/freepascal/blob/master/packages/fastcgi/src/fastcgi.pp
In line 510
FCGI_ContentRecord = record
header : FCGI_Header;
ContentData : array[0..1023] of byte;
end;
Field ContentData is 1024 bytes. Actual ContentData length is related to field ContentLength of FCGI_Header. ContentLength is declared as word type to conform with FastCGI specification. So maximum ContentLength is 65536 bytes.
According to FastCGI specification,
http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html
"contentData: Between 0 and 65535 bytes of data, interpreted according to the record type."
Why fastcgi.pp declared it as array[0..1023] of byte instead of array[0.. 65535] of byte ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190518/4d972335/attachment.html>
More information about the fpc-pascal
mailing list