我已经在 Delphi7 中将 Indy9 升级到了 Indy10。我花了一些时间来更改 TCP 服务器和客户端的所有部分,但现在看起来效果很好。
现在,我注意到一部分仍然无法正常工作,那就是 idHTTPserver 组件。
我们的应用程序网页正在使用 mootools 库。使用 Indy9 idHTTPserver 它可以完美运行,但是 Indy10 做了一些事情,这使得浏览器无法显示页面。
除了一些其他错误之外,还有这个无意义的错误,例如(Firefox 错误控制台输出):
Timestamp: 2013.08.07 13:13:56
Error: SyntaxError: missing ] after element list
Source File: http://192.168.100.2:8780/lib/ui/core/mootools-1.2.4-more-yc.js
Line: 103, Column: 60
Source Code:
unction(){var b=["C?","C ","C","C?","C,","C¢","Cƒ","C£","C"","C¤","C.","C?","Ä,","ă","Ä"","Ä.","Ä?","Ä?","ÄŒ","Ĩ","C?
-------------------------------------------------------------^
这个 .js 中的实际源代码是:
long long text ....... function(){var b=["C?","C ","C","C?","C,","C¢","Cƒ","C£","C"","C¤","C.","C?","Ä,","ă","Ä"","Ä.","Ä?","Ä?","ÄŒ","Ĩ","C?","C§","Ä?","ĸ","Ä","Ä'","Cˆ","CØ","C?","C©","CŠ","CR","C<","C«","Äš","Ä>","Ę","ÄT","Ä?","ÄŸ","CŒ","C¬","C¨","C","C?","C®","C¸","CÆ","Ĺ","Är","Ľ","ľ","Å","Å,","C'","C±","Å?","ň","Ń","Å"","C'","C²","C"","C³","C"","C´","C.","Cµ","C-","C¶","C˜","Cø","Å'","Ř","ÅT","Å"","Å.","Å ","Å?","Å?","ÅŸ","Åš","Å>","Ť","Å?","Ť","Å?","Å¢","Å£","CT","C¹","Cš","Cr","C>","C»","Cœ","C¼","Å®","ÅÆ","Åø","Cæ","C½","C¯","Ž","ž","Ź","År","Å»","ż","C?","C¾","C","C°","CŸ","Å'","Å"","C?","C¦","Aµ"]; ................ long long text
这里发生了什么?
我深吸一口气,想,嘿,我可以使用旧版本的 idHTTPserver,因为我在另一个文件夹中仍然有 Indy9 的源文件。如果没有人知道如何修复 indy10 HTTPserver,有人可以告诉我如何使用旧版本吗?只是 HTTPserver 组件(它肯定会与其他 10 多个旧的 indy 文件链接)。
我试图包含旧的来源,但它变得一团糟,因为它会使用旧版本中的 idHTTPserver.pas,而新版本中的 idCustomHTTPserver.pas(这是我遵循 idHTTPserver.pas 文件的使用后发生的情况) ...