<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiro_y</author_name>
  <author_url>https://blog.hatena.ne.jp/hiro_y/</author_url>
  <blog_title>hiroyのブログ</blog_title>
  <blog_url>https://hiroy.hatenadiary.jp/</blog_url>
  <categories>
    <anon>php</anon>
  </categories>
  <description>素朴な疑問。mb_check_encoding関数で入力パラメータのエンコーディングをチェックしてエラーだった場合、webアプリはHTTPのステータスコードとして何を返せばよいのだろう。 200: エラーメッセージ表示 403: アクセス禁止 406: 受け付けられない 追記: これはメディアタイプ関連のステータスなのでこの場合には適しませんね… 500: エラー扱いにする どれがいいかしら。追記:500だと「内部エラー」という情報を相手に与えてしまうことになるので、クライアント側のエラーということで40xを返すのがよさそう。403を返すか、思い切って404を返してしまう方向でよさげ。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiroy.hatenadiary.jp%2Fentry%2F20090105%2F1231135238&quot; title=&quot;入力パラメータのエンコーディングが不正な場合のHTTPのステータスコード - hiroyのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-01-05 15:00:38</published>
  <title>入力パラメータのエンコーディングが不正な場合のHTTPのステータスコード</title>
  <type>rich</type>
  <url>https://hiroy.hatenadiary.jp/entry/20090105/1231135238</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
