13 Caching in HTTP
HTTP多應用于分布式信息系統,通過使用response緩存來提高性能。HTTP/1.1包括許多元素來使緩存發揮作用成為可能。
Cache的目的和機制概述。
關于降低語義透明度。
13.1.1 Cache Correctness
返回最新response:滿足的條件
如果無法做到,那么應該返回error,warning
對stale的response的處理
13.1.2 Warnings
產生時機,目的
2類warning
13.1.3 Cache-control Mechanisms
可以在request和response提供顯示控制字段
13.1.4 Explicit User Agent Warnings
對于用戶指定的cache機制user agent應該加以warning
13.1.5 Exceptions to the Rules and Warnings
有些時候允許cache發回statle response;同時也允許user agent來通過1步1步地得到first-hand或者fresh的response。
13.1.6 Client-controlled Behavior
可以指定可以接受的response的expiration information。
13.2 Expiration Model
13.2.1 Server-Specified Expiration
HTTPserver如何讓緩存工作得很好,expiration time。
13.2.2 Heuristic Expiration
啟發式的時間標記
13.2.3 Age Calculations
13.2.4 Expiration Calculations
13.2.5 Disambiguating Expiration Values
出現了多個cache為同一個資源包含多個fresh values。
13.2.6 Disambiguating Multiple Responses
如果client從多個cache收到了多個response
13.3 Validation Model
校驗一個stale response是否可用,通過cache validators.
13.3.1 Last-Modified Dates
用來作為cache validators
13.3.2 Entity Tag Cache Validators
用來提供非last-modified date的校驗素
13.3.3 Weak and Strong Validators
語義上重大改變才改變的是weak Validators
13.3.4 Rules for When to Use Entity Tags and Last-Modified Dates
13.3.5 Non-validating Conditionals
為什么采用那種ET,而不用其他header
13.4 Response Cacheability
在什么情況下緩存response。
13.5 Constructing Responses From Caches
13.5.1 End-to-end and Hop-by-hop Headers
分成2類,一類是必須在client和server之間傳遞,一類是在一次連接2端傳遞
13.5.2 Non-modifiable Headers
不可修改的頭
13.5.3 Combining Headers
合并起來作為response的一部分
13.5.4 Combining Byte Ranges
Cache組合得到的range。
13.6 Caching Negotiated Responses
關于Negotiated Responses如何緩存
13.7 Shared and Non-Shared Caches
針對某一個user的cache是shared caches
13.8 Errors or Incomplete Response Cache Behavior
如何面對部分的response和server的5xx
13.9 Side Effects of GET and HEAD
對于get,head方法,旁效應和是否緩存的關系
13.10 Invalidation After Updates or Deletions
如果origin server變了,如何及時通知cache
13.11 Write-Through Mandatory
除了get 和head方法都必須要wirte through
13.12 Cache Replacement
插入新緩存替代舊緩存
13.13 History Lists
歷史并不試圖保證最新的請求資源
15 Security Considerations
關于HTTP1.1的安全考慮
15.1 Personal Information
關于客戶端隱私信息分發的問題
15.1.1 Abuse of Server Log Information
在server上存儲的客戶信息
15.1.2 Transfer of Sensitive Information
敏感信息的傳遞應該給user足夠的控制
15.1.3 Encoding Sensitive Information in URI’s
必須要考慮post和get方法在安全上的區別。Get方法是會編碼到URI中的
15.1.4 Privacy Issues Connected to Accept Headers
在Accept Headers一些隱私
15.2 Attacks Based On File and Path Names
不返回不想給的文件
15.3 DNS Spoofing
Client如果緩存dns,應該觀察ttl。
15.4 Location Headers and Spoofing
如果server是多organization,注意Location和Content-Location頭區。
15.5 Content-Disposition Issues
雖然不是http內容,但被廣泛實現,有很多安全考慮
15.6 Authentication Credentials and Idle Clients
關于認證緩存后可否再次更新
15.7 Proxies and Caching
受攻擊的對象;同時注意LOG系統;cache proxy更加容易受到攻擊;可以使用密碼術來增強安全性,但是這不屬于HTTP協議的內容。
15.7.1 Denial of Service Attacks on Proxies
還在研究