近期在做一个swfupload的过程中,发现一个很异常的问题,单机使用SWF一切正常,但是部署到有负载均衡的服务器集群的时候,发现点击上传按钮后无法正常将文件提交到服务器,经过打开SWF的DEBUG后发现有异常错误SecurityError Error #2156
根据http://swfupload.org/forum/generaldiscussion/1547
提供的信息说明,需要增加crossdomain.xml 来实现跨域的访问。
但是这并没有解决我的问题,因为我的负载均衡的端口是87,这是一个特殊的端口,
在adobe上对该端口进行了过滤,详细链接:http://kb2.adobe.com/cps/402/kb402882.html
通过在单机配置访问站点的端口为87,就可以重现在服务器集群相同的现象,目前可以基本定位由于端口限制和跨域访问造成,具体处理结果等更新负载均衡配置后再确认。
A security change has been made in Adobe Flash Player 9.0.115.0 to block commonly reserved ports (to prevent malicious activity). If a port number is specified at the end of a URL (such as http://www.adobe.com:80), the port will be checked against a list of commonly reserved ports. If the port matches the following list, the network request will be rejected and a securityError event will be fired.
The following ports are considered reserved:
1 tcpmux
7 echo
9 discard
11 systat
13 daytime
15 netstat
17 qotd
19 chargen
20 ftp data
21 ftp control
22 ssh
23 telnet
25 smtp
37 time
42 name
43 nicname
53 domain
77 priv-rjs
79 finger
87 ttylink
95 supdup
101 hostriame
102 iso-tsap
103 gppitnp
104 acr-nema
109 POP2
110 POP3
111 sunrpc
113 auth
115 sftp
117 uucp-path
119 NNTP
123 NTP
135 loc-srv / epmap
139 netbios
143 IMAP2
179 BGP
389 LDAP
465 SMTP+SSL
512 print / exec
513 login
514 shell
515 printer
526 tempo
530 courier
531 chat
532 netnews
540 uucp
556 remotefs
563 NNTP+SSL
587 submission
601 syslog
636 LDAP+SSL
993 IMAP+SSL
995 POP3+SSL
2049 nfs
4045 lockd
6000 X11
Solution