[fpc-pascal] Premature end of headers using fcl-web and POST

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Tue Nov 1 10:11:35 CET 2011


On Tue, Nov 1, 2011 at 8:39 AM, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:
>    begin
>      SetLength(DataStr, M.Size);
>      M.ReadBuffer(DataStr[1], M.Size);
>      ContentFields.Text := DataStr;
>    end;

Actually this code is wrong, for it to be proper it would need to
first check if the mime-type is "text*", then it would need to read
the encoding, convert between encodings ...

But I am fully satisfied with just Content, because my message is in
UTF-8 and my application also uses UTF-8, so adding such conversions
would only make things slower and probably wrong too (by making wrong
conversions).

I will simply document all of this stuff in the wiki.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list