Hello,
I use a THttpCli to communicate with a XML-RPC server.
I have a problem when POST command is called.
The webserver respond the error below :
DTD interdite.
Ligne: 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
However as you can see I don't specify any DTD in THttpCli initialization :
Http := THttpCli.Create(nil);
try
Http.SendStream := TStringStream.Create(XMLRpcFunction.Request);
Http.RcvdStream := TStringStream.Create;
try
try
Http.URL := 'http://'+ FHostname +':'+ IntToStr(FPort) +
XMLRpcFunction.Context;
try
Http.Post;
finally
XMLRpcFunction.Response :=
TStringStream(Http.RcvdStream).DataString;
Result := not XMLRpcFunction.XMLRpcResult.IsError;
end;
except
on E: Exception do Log(ltError, E.Message);
end;
finally
Http.SendStream.Free;
Http.RcvdStream.Free;
end;
Http.Close;
finally
FreeAndNil(Http);
end;
Any idea?
Thank you.
Boris
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be