[携帯電話] HTTPのLocation ヘッダによるリダイレクトに失敗する

メッセージ

編集の更新でeditプラグインが呼ばれますが、こいつがHTTP 304を返して表示のためのリダイレクトします。
このときのLocationヘッダのURLが、完全修飾のURLでないため、携帯(N503i)だとリダイレクトしてくれません。

私は以下の修正をしましたが、適切かどうか不明です。

-header("Location: $script?".rawurlencode($post['page']));
+$url = get_script_uri();
+header("Location: ".$url."?".rawurlencode($post['page']);

ちょっと確認:

14.30 Location

  The Location response-header field is used to redirect the recipient
  to a location other than the Request-URI for completion of the
  request or identification of a new resource. For 201 (Created)
  responses, the Location is that of the new resource which was created
  by the request. For 3xx responses, the location SHOULD indicate the
  server's preferred URI for automatic redirection to the resource. The
  field value consists of a single absolute URI.

      Location       = "Location" ":" absoluteURI


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2004-10-11 (月) 12:16:33
Site admin: PukiWiki Development Team

PukiWiki 1.5.4+ © 2001-2022 PukiWiki Development Team. Powered by PHP 8.2.12. HTML convert time: 0.222 sec.

SourceForge