[an error occurred while processing this directive]Flash Player から任意のヘッダがリモートドメインに送信されない(Flash Player 9)[an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive]

TechNote

[an error occurred while processing this directive][an error occurred while processing this directive]

[an error occurred while processing this directive]Flash Player から任意のヘッダがリモートドメインに送信されない(Flash Player 9)


この情報は、米国アドビシステムズ社が提供している情報をもとにローカライズし、作成したものです。

日本語環境での動作保証はしておりませんのでご了承ください。

問題点 (Issue)

ActionScript 2.0 の XML.addRequestHeader() および LoadVars.addRequestHeader()、または ActionScript 3.0 の URLRequest.requestHeaders で定義した任意の HTTP リクエストヘッダを GET および POST を使用して送信する際に、Adobe Flash Player 9,0,115,0 以降のバージョンではこれらのリクエストに失敗し、ヘッダが送信されません。

理由 (Reason)

Web サイトのセキュリティを向上し、異なるドメインからコンテンツによって送信される悪意のある HTTP ヘッダから防御するために、Flash Player は SWF ファイルが異なるドメインにヘッダを送信するのを許可する前に、クロスドメインポリシーファイルを確認します。

リモートドメイン用のクロスドメインポリシーファイルは、Flash Player がヘッダを送信するために指定されたドメインからどのヘッダを受け付けるか指定する必要があります。

 注意 : 一部のヘッダは Flash Player から送信することができません。送信できないヘッダの詳細については、文書番号 233428 特定の HTTP ヘッダを含むアクションを送信すると ActionScript エラーが発生する(Flash Player 9)を参照してください。

解決方法 (Solution)

リモート SWF ファイルからヘッダを受け付けるドメインを指定するには、Flash Player がどのヘッダを受け付けるかについてクロスドメインポリシーファイルを使用します。<allow-http-request-headers-from> タグは、クロスドメインポリシーファイルに許可するドメインを記述するために追加されました。ポリシーファイルの <allow-access-from> タグとは異なり、テキストファイルなどから引き出される情報よりもサーバ(ヘッダ)に提供する情報に許可を与えます。

<allow-http-request-headers-from> タグには、以下の 3 つの属性があります。

domain(推奨) : ヘッダ属性で指定されたヘッダを許可するドメインを指定します。ワイルドカード(* アスタリスク)は、特定ドメインのすべて、またはすべてのサブドメインを指定するために使用することができます。

header(推奨) : domain 属性で指定されたヘッダの、大文字と小文字を区別しないカンマ(,)で区切られたリストです。使用可能な文字は、RFC822 に基づき ASCII 33-41、42-57、59-126 となります。使用可能な文字には、ヘッダ名を終了するコロン(:)およびワイルドカードとして使用するアスタリスク(*)以外の印刷可能なスペースを含まない ASCII 文字が含まれます。ワイルドカードは、すべてのヘッダを指定する際に使用するか、アスタリスクの後に許可するドメインを接尾辞として記述し、1 つのヘッダ名として使用することができます。

secure(オプション) : HTTPS URL に非 HTTPS リクエストを送信することができるかどうかを指定します。true および false がサポートされ、true は HTTPS ポリシーファイルの初期値となり、その他すべてのポリシーファイルは false となります。

例 :

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>

<!-- This domain can accept a MyHeader header from a SWF file on www.example.com -->

<allow-http-request-headers-from domain="www.example.com" headers="MyHeader"/>

</cross-domain-policy>

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>

<!-- This domain can accept an AnotherHeader header and

all headers that begin with "X-MyPrefix-" from any SWF file-->

<allow-http-request-headers-from domain="*" headers="AnotherHeader,X-MyPrefix-*"/>

</cross-domain-policy>

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>

<!-- This domain can accept any header from a SWF file on

any subdomain of example.com and supports https requests -->

<allow-http-request-headers-from domain="*.example.com" headers="*" secure="true"/>

</cross-domain-policy>

Web サービスのための SOAPAction ヘッダの許可

Flash Player を Web サービスと共に使用する場合、SOAPAction ヘッダが許可されているか確認します。以下の例は、「crossdomain.xml」ファイルがドメイン「www.example.com」上の SWF ファイルによって行われるリクエストのために SOAPAction を有効にします。

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>

<!--This domain can accept the SOAPAction header from a SWF file from www.example.com -->

<allow-http-request-headers-from domain="www.example.com" headers="SOAPAction"/>

</cross-domain-policy>

クロスドメインポリシーファイルに関する詳細情報については、文書番号 233454 外部ドメインのデータにアクセスできない(Flash Player 9)を参照してください。


関連ドキュメント (Related Records)

RELATED RECORDS

[an error occurred while processing this directive]

[an error occurred while processing this directive]
[an error occurred while processing this directive]

Creative Commons License

[an error occurred while processing this directive][an error occurred while processing this directive]

サポート情報検索 (Search Support)

[an error occurred while processing this directive]

ドキュメント情報 (Document Details)

最終更新 (Last Update): 2008-03-20
文書番号 (ID):233450
プラットフォーム (OS):Macintosh, Windows
http://go.adobe.com/kb/ts_233450_ja-jp

関連製品 (Product Affected)

flash player
[an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive]