名称/值对中的 TIdHTTPRequestInfo.FormParams
我正在使用印地10。我的服务器正在处理表单发布。 ARequestInfo.FormParams 正确包含未解析的表单参数。但是 ARequestInfo.Params.count 是 0。有没有办法让 ARequestInfo.Params 拥有解析的表单参数?或者有没有办法解析ARequestInfo.FormParams?
当这应该已经封装在对象中时,我似乎必须编写自己的解析例程。或者也许我缺少一种方法。
更新做了一些更多的挖掘,我发现在我们的局域网内发帖时一切正常。但是,当帖子是通过 LAN 之外的浏览器完成时,则不会。
I am using Indy10. My server is processing a form post. ARequestInfo.FormParams properly contains the unparsed form parameters. But ARequestInfo.Params.count is 0. Is there a way I can have ARequestInfo.Params have the parsed form parameters? Or is there a way to parse ARequestInfo.FormParams?
It seems I have to write my own parsing routine when this should already be encapsulated in the object. Or perhaps I am missing a method.
Update Doing some more digging I have found when doing a post within our LAN everything works ok. But when the post is done from a browser outside of our LAN it does not.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在
TIdHTTPServer
处设置ParseParams
属性。或者您可以创建
TIdHTTPRequestInfo
类的后代来访问名为DecodeAndSetParams
的受保护方法,用于自行解析参数。这里是示例。
Try to set the
ParseParams
property at yourTIdHTTPServer
.Or you can make a descendant of the
TIdHTTPRequestInfo
class for accessing the protected method namedDecodeAndSetParams
to parse the parameters by yourself.Here is the example.