用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.
还没实验到底能不能用.

本文记录了使用Flex的FileReference组件将文件上传至Twisted.web2服务器过程中遇到的问题及调试过程。主要问题是Flex客户端出现“IO错误,#2038”的异常,并且服务器返回BadRequest错误,指出数据在同一行上与边界符冲突。

被折叠的 条评论
为什么被折叠?



