Indy
Indy copied to clipboard
TIdHTTPResponseInfo.WriteContent improperly uses IOHandler.Write method
TIdHTTPResponseInfo.WriteContent
uses IOHandler.Write
in two places and in both of them incorrectly. It causes wrong message encoding in Lazarus under Linux (unit IdCustomHTTPServer
)
Now it is (line 2188) :
FConnection.IOHandler.Write(ContentText, CharsetToEncoding(CharSet));
Should be:
FConnection.IOHandler.Write(ContentText, CharsetToEncoding(CharSet){$IFDEF STRING_IS_ANSI}, CharsetToEncoding(CharSet){$ENDIF});
Now it is (line 2213) :
FConnection.IOHandler.Write('<HTML><BODY><B>' + IntToStr(ResponseNo) + ' ' + ResponseText {Do not Localize}
+ '</B></BODY></HTML>', CharsetToEncoding(CharSet)); {Do not Localize};
Should be:
FConnection.IOHandler.Write('<HTML><BODY><B>' + IntToStr(ResponseNo) + ' ' + ResponseText {Do not Localize}
+ '</B></BODY></HTML>', CharsetToEncoding(CharSet){$IFDEF STRING_IS_ANSI}, CharsetToEncoding(CharSet){$ENDIF}); {Do not Localize};