>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 ?



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to