Trouble with flex file-uploading and twisted.web2 FileSaver(烙铁)

来源:互联网 发布:电商运营数据指标 编辑:程序博客网 时间:2024/05/01 06:17

用Flex的FileReference来把文件post到twisted.web2写得服务端,这个看似很简单,却问题多多。

Flex总是报错“IO错误, #2038”

(代码很普通,文档中的实例)

服务段代码:

 

 

 

 

无奈之下,sniff了一把。(mac下free:CocoaPacketAnalyzer)

 

Flash Player post 了数据:

 

 

 

眼看着post完了,到了最后,twisted.web2返回:

 

 

 

这个错误很奇怪:

Bad Request

Unexpected data on same line as boundary: '--'

 

spotlight twisted 源码,只有web2, fileupload.py用了这样的字符:

 

 

 

exarkun回信说:


This sounds like it may be related to this ticket:

 http://twistedmatrix.com/trac/ticket/2113

Or it may be another unrelated error.  If you can try the patch attached
to that ticket and comment if it works, that might be helpful.
Development is not currently proceeding very rapidly on Twisted Web2,
though.  You may need to champion the ticket in order to get it
resolved.

 

 

还没实验到底能不能用.

 

原创粉丝点击