-1

URLRequestを使用して、変更された画像をFlexにアップロードします。正常に動作します。ただし、当面はContent-LengthをURLRequestHeaderとして追加する必要があり、エラー2096が発生します。次に、このヘッダーが許可されていないことがわかります。

どうすればこのケースを解決できますか。

アドバイスをお願いします、ありがとう。

更新:adobeのドキュメントによると:http: //help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequestHeader.html

FlashPlayerおよびアプリケーションセキュリティサンドボックス外のAdobeAIRコンテンツでは、次のリクエストヘッダーは使用できず、制限された用語では大文字と小文字が区別されません(たとえば、Get、get、およびGETはすべて許可されていません)。また、アンダースコア文字が使用されている場合は、ハイフン付きの用語が適用されます(たとえば、Content-LengthとContent_Lengthの両方は許可されていません)。

Accept-Charset、Accept-Encoding、Accept-Ranges、Age、Allow、Allowed、Authorization、Charge-To、Connect、Connection、Content-Length、Content-Location、Content-Range、Cookie、Date、Delete、ETag、Expect、 Get、Head、Host、If-Modified-Since、Keep-Alive、Last-Modified、Location、Max-Forwards、Options、Origin、Post、Proxy-Authenticate、Proxy-Authorization、Proxy-Connection、Public、Put、Range、 Referer、Request-Range、Retry-After、Server、TE、Trace、Trailer、Transfer-Encoding、Upgrade、URI、User-Agent、Vary、Via、Warning、WWW-Authenticate、x-flash-version。

4

2 に答える 2

1

私はこれを見つけました: http://blogs.adobe.com/koestler/2010/12/dealing-with-argumenterrors-while-pushing-urlrequestheaders.html

多分あなたの問題は改行も原因です。

がんばれ、ロブ

于 2011-03-21T14:47:58.373 に答える
0

This is a security sandbox issue. Is the url you're trying to post to in the same security sandbox? If not, do they have a crossdomain.xml on there. If not, you might want to look in a server solution like send the image to your server on the same domain, which in return sends the image with the proper headers to the service you're trying to connect to.

于 2011-03-21T19:53:37.557 に答える