我使用向导创建了一个网上经纪服务应用程序。我更改了默认操作的代码,如下所示:
procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
i: Integer;
begin
i := Request.ContentLength;
Response.Content :=
'<html>' +
'<head><title>DataSnap Server</title></head>' +
'<body>DataSnap Server x' +
Request.ContentFields.Text + 'x' + IntToStr(i) + 'x' +
'</body>' +
'</html>';
end;
我在 IIS (6.2 - Server 2012) 下部署了 dll,并使用网络浏览器测试了 dll。
http://localhost/MapServer/Mapserver.dll/?param1=hello
只是为了好的措施,我试过了
http://localhost/MapServer/Mapserver.dll/?param1= “你好”
浏览器输出
数据快照服务器 xx0x
在这两种情况下。
似乎Request.ContentFields
没有被来自浏览器的调用填充。
此问题是否特定于特定版本的 Delphi 和/或 IIS?我不明白什么?
西雅图和柏林我都试过了,结果是一样的。谢谢
PS 我还使用向导制作了一个独立的网上经纪商。它没有这个问题。