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.

練 習 問 題 1. dataフォルダのq1フォルダ 内 のindex.htmlでブラウザで 正 しく 表 示 できない 状 態 にあ る 画 像 を 正 常 に 表 示 できるようにソースを 修 正 しなさい 修 正 したindex.htmlファイルなどは デスクトップのwdフォルダ 内 にt1と

Microsoft PowerPoint - servlet1.pptx

Microsoft PowerPoint - webapp.ppt [互換モード]

1. URL (Uniform Resource Locator) n プロトコル (http, https, ftp, mailto) 2. ドメイン 名 (FQDN) ホストの 識

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

wide94.dvi

HTML文書の作成

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

: 1/15( ): HTML web page (2) 1/18( ): (1) 1/25( ): (2) 1

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

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

A B C A B C Ctrl (S) 5 A B C 11.2: (F) (A) ( OK ) 3 (E) ( ) (E)


0序文‐1章.indd

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

5110-toku4-2c.indd

Untitled

~モバイルを知る~ 日常生活とモバイルコンピューティング

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

Lecture/CompPracR2003/12th

HTMLとは HyperText Markup Language ハイパーテキスト:テキストを 超 えたもの マークアップ:<...>で 指 示 する 規 格 厳 密 には htttp:// 他 に loose.dtd,frameset.d

httpredchk-j.pdf

変更履歴 版数 修正日 修正箇所 修正内容 /4/27 初版 /7/27 - クリップボードへのコピーで不要な文字が含まれる事象を修正 /4/ 暗号化プロトコルのサポートについて記載 /8/ ステータス

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

1/2

Microsoft PowerPoint ppt

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


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

Do No Track 実装ガイド

untitled

スライド 1

HTTP HTTP

橡ホームページの作り方

untitled

il15-internet.key

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

Gmail 利用者ガイド

untitled

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

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

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

HTTP2 HTTP2 http2fuzz ATS Firefox NodeJS

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

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

変更履歴 版数 修正日 修正箇所 修正内容 /10/19 初版 /2/ 処理受付 ID 保有数の上限値を記載処理受付 ID 保有数が上限値の場合のレスポンスコードを 400 へ変更 /4/ 暗号化プロトコルのサポートについて記載

■新聞記事

pdf

WIDE 1

textbook.indd

機 能 概 要 概 要 平 成 24 年 度 シームレスな 地 域 連 携 医 療 の 実 現 実 証 事 業 に 対 応 するため 地 域 連 携 システム( 能 登 北 部 版 )を 構 築 する 機 能 < 機 能 追 加 変 更 一 覧 > 1. 画 像 連 携 機 能 院 内 で 撮 影

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

Web のしくみと応用 ('15) 回テーマ 1 身近なWeb 2 Webの基礎 3 ハイパーメディアとHTML 4 HTMLとCSS 5 HTTP (1) 6 HTTP (2) 7 動的なWebサイト 8 クライアントサイドの技術 回 テーマ 9 リレーショナルデータベース 10 SQL とデータ

< B838B CC8F898AFA90DD92E82E786C73>

Microsoft PowerPoint - HTML1復習_1021.ppt

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

変更履歴 No 版数 更新日 変更箇所 変更内容 版 2017/6/26 - 新規作成 版 2018/3/ 法令 API 対象外の法令取得対象外となる法令データに係に関する事項る留意事項を追記 HTTP レスポンスコ 版 2018/3/

html_text

WebDAV WebDAV WebDAV WebDAV HTTP/

スライド 1

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

コンパイラ

PowerPoint プレゼンテーション

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

データベースS 演習資料

HTML は 本 来 文 書 の 構 造 を 定 義 文 書 の 見 栄 えはスタイルシートで 記 述 HTML HyperText Markup Language 出 典 : フリー 百 科 事 典 ウィキペディア(Wikipedia) HyperText Markup Language(ハイパー

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

インターネットマガジン1997年4月号―INTERNET magazine No.27

第2回 Web文書

WEB PARK 2014新規利用ガイド

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

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

Microsoft PowerPoint - 雇保氏名変更.pptx

<4D F736F F F696E74202D F82CC92B48AEE CE8DF4837D836A B2E707074>

WebDAVとは? Distributed Authoring and Versioning protocol for the WWW WWW 上 で 編 集 とバージョン 管 理 が 出 来 る プロトコル 1998 年 にRFC2291で 提 唱 されたHTTP1.1の 拡 張 仕 様

Microsoft Word - Active.doc

WEB PARK 2014 新規利用ガイド

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

InfoPros13_digest.key

Microsoft Word - mediawiki.doc

Microsoft Word - wsample.docx

Ver.30 改 版 履 歴 版 数 日 付 内 容 担 当 V /09/5 初 版 発 行 STS V /0/8 証 明 書 バックアップ 作 成 とインストール 手 順 追 加 STS V /0/7 文 言 と 画 面 修 正 STS V..30 0//6

PowerPoint Presentation

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

World Wide Webの 始 まり CREN( 欧 州 合 同 原 子 核 研 究 機 構 )には 多 く の 科 学 者 が 訪 れ それぞれが 異 なる 文 書 シス テムを 使 っていた 情 報 の 共 有 が 大 きな 課 題 12/05/09 2

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

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

SOC Report

<95CA8E A4F C B A C E786C7378>

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

2. 更 新 内 容 下 記 機 能 改 善 仕 様 変 更 不 具 合 対 応 を 行 いました 動 作 環 境 の 追 加 3.1. 受 講 者 / 管 理 者 クライアントの 動 作 環 境 に 下 記 の OS と Web ブラウザを 追 加 しました Windows 10 Microsof

情 報 教 育 センタ ー 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メソッド ステータスコード