HTTPの 規 格

Similar documents
コンテントネゴシエーション

Web のクライアントサーバモデル

ict7.key

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ

Copyright 2006 Mitsui Bussan Secure Directions, Inc. All Rights Reserved. 3 Copyright 2006 Mitsui Bussan Secure Directions, Inc. All Rights Reserved.

Microsoft PowerPoint - servlet1.pptx

第 7 回の内容 動的な Web サイト フォーム Web システムの構成

wide94.dvi

コンピュータサイエンス 4. ウェブプログラミング

Microsoft PowerPoint - 03ポート番号とプロトコル.pptx

HTTP Web Web RFC2616 HTTP/1.1 Web Apache Tomcat (Servlet ) XML Xindice Tomcat 6-2


0序文‐1章.indd

コンピュータサイエンス 1. ウェブの基本

Untitled

Servlet JSP JSP Servlet/JSP における 日 本 語 の 処 理 - 1

httpredchk-j.pdf

…l…b…g…‘†[…N…v…“…O…›…~…fi…OfiÁŸ_

Microsoft PowerPoint ppt

エラー 時 のリダイレクトと 同 じテクニックを 用 いて ロードマスターは URL 内 のプロトコ ルを 書 き 換 えることを 許 しています これは HTTP より HTTPS へ のプロトコル 変 換 を 強 制 させるために 役 立 つオプションです 例 えば クライアントが 貴 社 のウ


Cisco CSS HTTP キープアライブと ColdFusion サーバの連携

スライド 1

HTTP HTTP

橡ホームページの作り方

迷惑メールフィルタリングコントロールパネル利用者マニュアル

Gmail 利用者ガイド

MIRACLE LoadBalancerを使用したネットワーク構成と注意点

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ

図解でわかるVoIPのすべて - IP電話の技術から構築まで -

HTTP2 HTTP2 http2fuzz ATS Firefox NodeJS

iStorage ソフトウェア VMware vSphere Web Client Plug-in インストールガイド

コンテンツキャッシュを活用してWebサーバーの負荷を下げたい:IDCFクラウド活用マニュアル

pdf

textbook.indd

用語 バケット / Bucket オブジェクト / Object オブジェクトストレージに作成された保存領域です オブジェクトストレージに保存されたファイルです 機能一覧 オブジェクトの操作 PUT GET HEAD DELETE PUT COPY Initiating Multipart Uplo

目 次 機 能 運 用 上 の 注 意 処 理 手 順 画 面 説 明 ログイン 直 送 先 選 択

html_text

スライド 1

『HTML5プロフェッショナル認定資格 レベル1 教科書』サンプルPDF

サーバサイドスクリプトPHPを実感しよう

CDNext ガイドライン:アクセスログ提供機能について

前 書 き 広 域 機 関 システム System for Organization for Cross-regional Coordination of Transmission Operators(OCCTO) rev: 商 標 類 Windows Office Excel

/ 0/0/ : 実 結 果 HTMLファイルを 表 します 下 図 の 画 が 表 されます " 出 し"の 部 分 をクリックすると"コンテンツですよ "の 字 が 表 されます もう 度 " 出 し"をクリックすると"コンテンツですよ "の 字 が 非 表 になります 折 りたたみパネルの 基

Microsoft Word - Active.doc

ホームページ制作スターターズ

Microsoft Word - mediawiki.doc

共済会_Kねっと利用マニュアル.indd

端 末 型 払 い 出 しの 場 合 接 続 構 成 図 フレッツ グループから 払 出 されたIPアドレス /32 NTT 西 日 本 地 域 IP 網 フレッツ グループ フレッツ グループから 払 出 されたIPアドレス /

サイボウズ リモートサービス ユーザーマニュアル

<95CA8E A4F C B A C E786C7378>

雇用保険被保険者資格取得届(様式)編

情 報 教 育 センタ ー 1 の 設 定 説 明 は で 行 います. 他 のバージョンの を 利 用 されたい 方 は 適 宜 読 み 替 えてください. ft での 設 定 なります. の 起 動 を 起 動 します.この 時 点 で, 次 の 新 しいプロファイル 画 面 が 表 示 される

C.1 共 有 フォルダ 接 続 操 作 の 概 要 アクセスが 許 可 されている 研 究 データ 交 換 システムの 個 人 用 共 有 フォルダまたは メーリングリストの 共 有 フォルダに 接 続 して フォルダを 作 成 したり ファイル をアップロードまたはダウンロードしたりすることがで

PC 移 行 は 以 下 の 流 れで 行 います 次 ページ 以 降 に 各 手 順 を 記 載 しますのでご 確 認 ください ( をクリックすると 該 当 の 説 明 にジャンプします ) 移 行 元 のPCでの 作 業 Step1 移 行 するデータをバックアップする (3ページ) [データ

Transcription:

第 5 回 の 内 容 HTTPの 規 格 HTTPメッセージの 基 本

HTTPの 規 格

HTTPの 規 格 Internet Engineering Task Force (IETF) Request for Comments (RFC) 年 バージョン RFC 1996 年 HTTP/1.0 RFC 1945 Hypertext Transfer Protocol -- HTTP/1.0 1997 年 HTTP/1.1 RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1 1999 年 HTTP/1.1 ( 改 訂 版 ) RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1

RFC 2616の 改 訂 RFC 7230 Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing RFC 7231 Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content RFC 7232 Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests RFC 7233 Hypertext Transfer Protocol (HTTP/1.1): Range Requests RFC 7234 Hypertext Transfer Protocol (HTTP/1.1): Caching RFC 7235 Hypertext Transfer Protocol (HTTP/1.1): Authentication

RFC 内 容 RFC URI RFC 3986 Uniform Resource Identifier (URI): Generic Syntax HTTP 認 証 RFC 2617 HTTP Authentication: Basic and Digest Access Authentication RFC 7235 Hypertext Transfer Protocol (HTTP/1.1): Authentication CGI RFC 3875 The Common Gateway Interface (CGI) Version 1.1 クッキー RFC 6265 HTTP State Management Mechanism

HTTPメッセージの 基 本

HTTPメッセージの 構 造 リクエストメッセージ リクエストライン メッセージヘッダ レスポンスメッセージ ステータスライン メッセージヘッダ 空 行 メッセージボディ 空 行 メッセージボディ

メッセージヘッダ フィールド 名 : フィールド 値 Content-Type: text/html; charset=utf-8 フィールド 名 フィールド 値

リクエストメッセージの 例 リクエストライン メッセージヘッダ GET /test.html HTTP/1.1 Host: www.example.ac.jp 空 行 メッセージボディ

リクエストメッセージの 例 リクエストライン メッセージヘッダ GET /test.html HTTP/1.1 Host: www.example.ac.jp 空 行 メッセージボディ

リクエストメッセージの 例 リクエストライン メッセージヘッダ GET /test.html HTTP/1.1 Host: www.example.ac.jp 空 行 メッセージボディ

リクエストメッセージの 例 リクエストライン メッセージヘッダ GET /test.html HTTP/1.1 Host: www.example.ac.jp 空 行 メッセージボディ

リクエストメッセージの 例 リクエストライン メッセージヘッダ GET /test.html HTTP/1.1 Host: www.example.ac.jp 空 行 メッセージボディ

レスポンスメッセージの 例 ステータスライン メッセージヘッダ 空 行 メッセージボディ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

レスポンスメッセージの 例 ステータスライン メッセージヘッダ 空 行 メッセージボディ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

レスポンスメッセージの 例 ステータスライン メッセージヘッダ 空 行 メッセージボディ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

レスポンスメッセージの 例 ステータスライン メッセージヘッダ 空 行 メッセージボディ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

レスポンスメッセージの 例 ステータスライン メッセージヘッダ 空 行 メッセージボディ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

リクエストライン GET /test.html HTTP/1.1 Host: www.example.ac.jp GET /test.html HTTP/1.1 HTTPメソッド HTTPのバージョン URIのパスとクエリ

Hostヘッダ GET /test.html HTTP/1.1 Host: www.example.ac.jp Host: www.example.ac.jp ホスト 名 (:ポート 番 号 ) http://www.example.ac.jp/test.html

名 前 ベースのバーチャルホスト http://www.ouj.ac.jp/ www.ouj.ac.jp 172.19.0.1 www.example.ac.jp 192.168.18.3 test.example.ac.jp 192.168.18.5

名 前 ベースのバーチャルホスト http://www.example.ac.jp/ www.ouj.ac.jp 172.19.0.1 www.example.ac.jp 192.168.18.3 test.example.ac.jp 192.168.18.5

名 前 ベースのバーチャルホスト http://test.example.ac.jp/ www.ouj.ac.jp 172.19.0.1 www.example.ac.jp 192.168.18.3 test.example.ac.jp 192.168.18.5

名 前 ベースのバーチャルホスト http://www.ouj.ac.jp/ http://www.example.ac.jp/ http://test.example.ac.jp/ www.ouj.ac.jp www.example.ac.jp test.example.ac.jp 172.19.0.1 Host: www.example.ac.jp

ステータスライン HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

ステータスライン HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 ) HTTPのバージョン HTTP/1.1 200 OK ステータスコード ステータスコードの 説 明

ステータスコード ステータ スコード 説 明 意 味 200 OK リクエストに 成 功 した 404 Not Found リソースが 存 在 しない 403 Forbidden 権 限 がない 500 Internal Server Error サーバ 側 でエラーが 起 こった

レスポンスメッセージのヘッダ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

レスポンスメッセージのヘッダ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> ヘッダ 意 味 <html lang="ja"> Date ( 以 下 略 ) メッセージが 作 成 された 日 時

レスポンスメッセージのヘッダ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> ヘッダ 意 味 <html lang="ja"> Date ( 以 下 略 ) メッセージが 作 成 された 日 時 Content-Length 送 り 返 すリソースのサイズ (バイト)

レスポンスメッセージのヘッダ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> ヘッダ 意 味 <html lang="ja"> Date ( 以 下 略 ) メッセージが 作 成 された 日 時 Content-Length 送 り 返 すリソースのサイズ (バイト) Content-Type 送 り 返 すリソースのメディアタイプ

レスポンスメッセージのヘッダ HTTP/1.1 200 OK Date: Tue, 01 Oct 2013 09:17:32 GMT Content-Length: 244 Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html lang="ja"> ( 以 下 略 )

HTTPメッセージの 実 例 <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="./style.css" type="text/css"> <title> 放 送 太 郎 の 自 己 紹 介 </title> </head> <body> <h1> 放 送 太 郎 の 自 己 紹 介 </h1> <h2> 略 歴 </h2> <p> 神 奈 川 県 横 浜 市 出 身 1983 年 生 まれの29 歳 です 大 学 では 英 文 学 を 学 びました 現 在 は 千 葉 県 の<a href="http://www.ouj.ac.jp/"> 放 送 大 学 </a> 本 部 で 勤 務 しています <img src="./ouj.jpg" alt=" 放 送 大 学 本 部 を 正 門 側 から 撮 った 写 真 右 の 建 物 の 屋 上 に 電 波 塔 が 見 える "> </p> <h2> 趣 味 </h2> <ul> <li> 読 書 </li> <li>オートバイ</li> <li>プラモデル 製 作 </li> </ul> <address> 連 絡 先 : <a href="mailto:taro@example.com">taro@example.com</a></address> </body> </html>

HTTPメッセージの 実 例 http://www.example.ac.jp/taro.html

HTTPメッセージの 実 例

1 回 目 のHTTPリクエスト レスポンス GET /taro.html HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Thu, 12 Jun 2014 01:58:09 GMT Etag: "37c-4fb99e47fee40" Accept-Ranges: bytes Content-Length: 892 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 レスポンス

取 得 したHTML 文 書 <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="./style.css" type="text/css"> <title> 放 送 太 郎 の 自 己 紹 介 </title> </head> <body> <h1> 放 送 太 郎 の 自 己 紹 介 </h1> <h2> 略 歴 </h2> <p> 神 奈 川 県 横 浜 市 出 身 1983 年 生 まれの29 歳 です 大 学 では 英 文 学 を 学 びました 現 在 は 千 葉 県 の<a href="http://www.ouj.ac.jp/"> 放 送 大 学 </a> 本 部 で 勤 務 しています <img src="./ouj.jpg" alt=" 放 送 大 学 本 部 を 正 門 側 から 撮 った 写 真 右 の 建 物 の 屋 上 に 電 波 塔 が 見 える "> </p> <h2> 趣 味 </h2> <ul> <li> 読 書 </li> <li>オートバイ</li> <li>プラモデル 製 作 </li> </ul> <address> 連 絡 先 : <a href="mailto:taro@example.com">taro@example.com</a></address> </body> </html>

2 回 目 のHTTPリクエスト レスポンス GET /style.css HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/css,*/*;q=0.1 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Mon, 02 Jun 2014 07:37:14 GMT Etag: "86-4fad576be3e80" Accept-Ranges: bytes Content-Length: 134 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/css レスポンス

3 回 目 のHTTPリクエスト レスポンス GET /ouj.jpg HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Tue, 10 Jun 2014 02:08:27 GMT Etag: "9fca-4fb71cda71cc0" Accept-Ranges: bytes Content-Length: 40906 Keep-Alive: timeout=5, max=98 Connection: Keep-Alive Content-Type: image/jpeg レスポンス

1 回 目 のHTTPリクエスト レスポンス GET /taro.html HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 3 HTTPメソッド Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト 1 持 続 的 接 続 HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Thu, 12 Jun 2014 01:58:09 GMT 4 ステータスコード Etag: "37c-4fb99e47fee40" Accept-Ranges: bytes Content-Length: 892 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 2 メッセージボディのサイズ 1 持 続 的 接 続 レスポンス

持 続 的 接 続 クライアント サーバ クライアント サーバ 持 続 的 接 続 な し 持 続 的 接 続 あ り

1 回 目 のHTTPリクエスト レスポンス GET /taro.html HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Thu, 12 Jun 2014 01:58:09 GMT Etag: "37c-4fb99e47fee40" Accept-Ranges: bytes Content-Length: 892 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 レスポンス

1 回 目 のHTTPリクエスト レスポンス GET /taro.html HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Thu, 12 Jun 2014 01:58:09 GMT Etag: "37c-4fb99e47fee40" Accept-Ranges: bytes Content-Length: 892 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 Connection: keep-alive Connection: close レスポンス

1 回 目 のHTTPリクエスト レスポンス GET /taro.html HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Thu, 12 Jun 2014 01:58:09 GMT Etag: "37c-4fb99e47fee40" Accept-Ranges: bytes Content-Length: 892 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 2 メッセージボディのサイズ レスポンス

レスポンス メッセージボディのサイズ HTTP/1.1 200 OK Content-Length: 892 Content-Type: text/html; charset=utf-8 リクエスト POST /test HTTP/1.1 Host: www.example.ac.jp Content-Type: application/x-www-form-urlencoded Content-Length: 19 qt=%e3%81%82&page=1

チャンク 転 送 The Open University of Japan was founded in 1983. HTTP/1.1 200 OK Content-Type: text/plain Content-Length: 49 レスポンス The Open University of Japan was founded in 1983.

チャンク 転 送 The Open University of Japan was founded in 1983. HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/plain レスポンス 13 The Open University d of Japan was 11 founded in 1983. 0

チャンク 転 送 The Open University of Japan was founded in 1983. HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/plain レスポンス 13 The Open University d of Japan was 11 founded in 1983. 0

チャンク 転 送 The Open University of Japan was founded in 1983. HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/plain チャンクサイズ ( 十 六 進 数 ) レスポンス 13 The Open University d of Japan was 11 founded in 1983. 0 チャンクデータ

チャンク 転 送 The Open University of Japan was founded in 1983. HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/plain レスポンス 13 The Open University d of Japan was 11 founded in 1983. 0

チャンク 転 送 The Open University of Japan was founded in 1983. HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/plain レスポンス 13 The Open University d of Japan was 11 founded in 1983. 0

チャンク 転 送 The Open University of Japan was founded in 1983. HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/plain レスポンス 13 The Open University d of Japan was 11 founded in 1983. 0

1 回 目 のHTTPリクエスト レスポンス GET /taro.html HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 3 HTTPメソッド Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Thu, 12 Jun 2014 01:58:09 GMT Etag: "37c-4fb99e47fee40" Accept-Ranges: bytes Content-Length: 892 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 レスポンス

HTTPメソッド GET POST DELETE OPTIONS HEAD PUT CONNECT TRACE

GET リソースの 取 得 HTTPメソッド アドレスバーにURIを 入 力 ハイパーリンクをクリック POST 多 目 的 PUT リソースの 作 成 更 新 DELETE リソースの 削 除

POSTメソッド メッセージボディを 持 った リクエストを 送 信

1 回 目 のHTTPリクエスト レスポンス GET /taro.html HTTP/1.1 Host: www.example.ac.jp User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: ja,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive リクエスト HTTP/1.1 200 OK Date: Thu, 12 Jun 2014 10:26:23 GMT Server: Apache Last-Modified: Thu, 12 Jun 2014 01:58:09 GMT 4 ステータスコード Etag: "37c-4fb99e47fee40" Accept-Ranges: bytes Content-Length: 892 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 レスポンス

ステータスコード 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported

ステータスコードの 分 類 先 頭 の 数 字 意 味 説 明 1xx 2xx 3xx 4xx 5xx 情 報 提 供 (Informational) 成 功 (Successful) リダイレクト (Redirection) クライアントエラー (Client Error) サーバエラー (Server Error) リクエストは 受 け 付 けられて 処 理 を 継 続 中 である リクエストは 成 功 した リクエストを 完 了 するためには さらなる 動 作 が 必 要 である リクエストの 方 法 を 間 違 えてい るか 受 け 入 れられない サーバ 側 で 処 理 に 失 敗 した

ステータスコード 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported

ステータスコードの 分 類 先 頭 の 数 字 意 味 説 明 1xx 2xx 3xx 4xx 5xx 情 報 提 供 (Informational) 成 功 (Successful) リダイレクト (Redirection) クライアントエラー (Client Error) サーバエラー (Server Error) リクエストは 受 け 付 けられて 処 理 を 継 続 中 である リクエストは 成 功 した リクエストを 完 了 するためには さらなる 動 作 が 必 要 である リクエストの 方 法 を 間 違 えてい るか 受 け 入 れられない サーバ 側 で 処 理 に 失 敗 した

ステータスコード 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported

ステータスコード 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported

ステータスコード404 レスポンス HTTP/1.1 404 Not Found Content-Length: 206 Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>not Found</h1> <p>the requested URL /notfound was not found on this server.</p> </body></html>

ステータスコード404 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>not Found</h1> <p>the requested URL /notfound was not found on this server.</p> </body></html>

ステータスコードの 分 類 先 頭 の 数 字 意 味 説 明 1xx 2xx 3xx 4xx 5xx 情 報 提 供 (Informational) 成 功 (Successful) リダイレクト (Redirection) クライアントエラー (Client Error) サーバエラー (Server Error) リクエストは 受 け 付 けられて 処 理 を 継 続 中 である リクエストは 成 功 した リクエストを 完 了 するためには さらなる 動 作 が 必 要 である リクエストの 方 法 を 間 違 えてい るか 受 け 入 れられない サーバ 側 で 処 理 に 失 敗 した

ステータスコード 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported

ステータスコード301 リソースが 恒 久 的 に 移 動 した Locationヘッダの 値 に 移 動 先 のURI

ステータスコード301 http://www.example.ac.jp/oldpath http://www.example.ac.jp/newpath GET /oldpath HTTP/1.1 Host: www.example.ac.jp HTTP/1.1 301 Moved Permanently Location: http://www.example.ac.jp/newpath Content-Length: 240 Content-Type: text/html; charset=iso-8859-1 リクエスト レスポンス <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>moved Permanently</h1> <p>the document has moved <a href="http://www.example.ac.jp/newpath">here</a>.</p> </body></html>

ステータスコード301

ステータスコードの 分 類 先 頭 の 数 字 意 味 説 明 1xx 2xx 3xx 4xx 5xx 情 報 提 供 (Informational) 成 功 (Successful) リダイレクト (Redirection) クライアントエラー (Client Error) サーバエラー (Server Error) リクエストは 受 け 付 けられて 処 理 を 継 続 中 である リクエストは 成 功 した リクエストを 完 了 するためには さらなる 動 作 が 必 要 である リクエストの 方 法 を 間 違 えてい るか 受 け 入 れられない サーバ 側 で 処 理 に 失 敗 した

ステータスコード 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported

ステータスコード 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported

ステータスコード503 GET / HTTP/1.1 Host: www.example.ac.jp リクエスト HTTP/1.1 503 Service Unavailable Date: Sun, 15 Jun 2014 06:20:53 GMT Content-Length: 299 Retry-After: Sun, 15 Jun 2014 09:59:59 GMT Content-Type: text/html; charset=iso-8859-1 レスポンス <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Unavailable</title> ( 以 下 略 )

ステータスコード503

ステータスコード503 GET / HTTP/1.1 Host: www.example.ac.jp リクエスト HTTP/1.1 503 Service Unavailable Date: Sun, 15 Jun 2014 06:20:53 GMT Content-Length: 299 Retry-After: Sun, 15 Jun 2014 09:59:59 GMT Content-Type: text/html; charset=iso-8859-1 レスポンス <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Unavailable</title> ( 以 下 略 )

リクエスト GET /taro.html HTTP/1.1 Host: www.example.ac.jp レスポンス メディアタイプ HTTP/1.1 200 OK Content-Length: 892 Content-Type: text/html; charset=utf-8

リクエスト GET /taro.html HTTP/1.1 Host: www.example.ac.jp レスポンス メディアタイプ HTTP/1.1 200 OK Content-Length: 892 Content-Type: text/plain; charset=utf-8

第 5 回 の 内 容 HTTPの 規 格 HTTPメッセージの 基 本 メッセージの 構 造 持 続 的 接 続 メッセージボディのサイズとチャンク 転 送 HTTPメソッド ステータスコード