[fpc-pascal] ContentData field size in FCGI_ContentRecor
Zamrony P. Juhara
zamronypj at yahoo.com
Sat May 18 11:16:10 CEST 2019
custfcgi.pp and fpfcgi.pp both directly /indirectly depends on fastcgi unit.
Zamrony P. Juhara
On Sat, May 18, 2019 at 16:54, Michael Van Canneyt<michael at freepascal.org> wrote:
On Sat, 18 May 2019, Zamrony P. Juhara via fpc-pascal wrote:
>> 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 ?
This unit is a translation of a library. Most likely, that was exactly the
value specified in the original header files.
I would not recommend using this unit.
It is most likely outdated, and I would not even know what library it supports.
I will ask on the core group what to do, I think it is better to remove it.
Free Pascal supports fastcgi natively using the custfcgi or fpfcgi units.
Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190518/f1e854cd/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Untitled
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190518/f1e854cd/attachment.ksh>
More information about the fpc-pascal
mailing list