ハイパーテキスト転送プロトコル (HTTP/1.1): メッセージ構文とルーティング
Document Information / 文档信息
- RFC Number: 7230
- Title: HTTP/1.1: Message Syntax and Routing
- Published: June 2014
- Authors: R. Fielding (Adobe), J. Reschke (greenbytes)
- Status: Standards Track
- Obsoletes: RFC 2616, RFC 2145
- Updates: RFC 2817, RFC 2818
Abstract / 摘要
ハイパーテキスト転送プロトコル (HTTP) は、分散型の協調的なハイパーテキスト情報システムのための状態レスなアプリケーション層プロトコルです。
This document provides an overview of HTTP architecture and its associated terminology, defines the "http" and "https" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.
Table of Contents / 目录
Main Sections / 主要章节
-
Introduction (简介)
- 1.1 Requirements Notation
- 1.2 Syntax Notation
-
Architecture (架构)
- 2.1 Client/Server Messaging
- 2.2 Implementation Diversity
- 2.3 Intermediaries
- 2.4 Caches
- 2.5 Conformance and Error Handling
- 2.6 Protocol Versioning
- 2.7 Uniform Resource Identifiers
-
Message Format (消息格式)
- 3.1 Start Line
- 3.2 Header Fields
- 3.3 Message Body
-
Transfer Codings (传输编码)
- 4.1 Chunked Transfer Coding
- 4.2 Compression Codings
- 4.3 TE Header Field
- 4.4 Trailer Header Field
-
Message Routing (消息路由)
- 5.1 Identifying a Target Resource
- 5.2 Connecting Inbound
- 5.3 Request Target
- 5.4 Host Header Field
- 5.5 Effective Request URI
- 5.6 Associating a Response to a Request
- 5.7 Message Forwarding
-
Connection Management (连接管理)
- 6.1 Connection Header Field
- 6.2 Establishment
- 6.3 Persistence
- 6.4 Concurrency
- 6.5 Failures and Timeouts
- 6.6 Tear-down
- 6.7 Upgrade Header Field
-
ABNF List Extension (ABNF 列表扩展)
-
IANA Considerations (IANA 考虑事项)
-
Security Considerations (安全考虑事项)
Appendices / 附录
- Appendix A - HTTP Version History
- Appendix B - Collected ABNF
- References (参考文献)
HTTP/1.1 Specification Series / HTTP/1.1 规范系列
RFC 7230 is the first part of the HTTP/1.1 specification series:
- RFC 7230 - Message Syntax and Routing (本文档)
- RFC 7231 - Semantics and Content
- RFC 7232 - Conditional Requests
- RFC 7233 - Range Requests
- RFC 7234 - Caching
- RFC 7235 - Authentication
Core Concepts / 核心概念
Key Terms / 关键术语
- Client: Program that establishes a connection to send HTTP requests
- Server: Program that accepts connections to service HTTP requests
- User Agent: Client program that initiates requests (browsers, crawlers, etc.)
- Origin Server: Program that can originate authoritative responses
- Intermediary: Proxy, gateway, or tunnel
- Cache: Local storage of previous responses
HTTP Message Structure / HTTP 消息结构
HTTP-message = start-line
*( header-field CRLF )
CRLF
[ message-body ]
Request Example / 请求示例
GET /hello.txt HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept-Language: ja
Response Example / 响应示例
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache
Content-Length: 51
Content-Type: text/plain
Hello World! My payload includes a trailing CRLF.
Important Features / 重要特性
- Stateless Protocol - Each request is processed independently
- Persistent Connections - HTTP/1.1 uses persistent connections by default
- Chunked Transfer Encoding - Allows sending data without knowing total length
- Intermediary Support - Supports proxies, gateways, and tunnels
- Protocol Upgrade - Supports upgrading to other protocols (e.g., WebSocket)
Security Considerations / 安全考虑
- Input Validation - Always validate and sanitize user input
- Length Limits - Implement limits on request line and header field lengths
- Use HTTPS - Use TLS encryption for sensitive communications
- Prevent Request Smuggling - Strictly follow message parsing rules
- Intermediary Security - Carefully handle proxies and gateways
- Privacy Protection - Protect personal information in server logs
Copyright Notice / 版权声明
Copyright © 2014 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions.
Related Resources / 相关资源
- Official Document: https://www.rfc-editor.org/rfc/rfc7230.html
- Errata: https://www.rfc-editor.org/errata_search.php?rfc=7230
📌 Start Reading: Begin with Section 1 - Introduction