When considering the design of HTTP, it is easy to fall into a trap of thinking that all user agents are general-purpose browsers and all origin servers are large public websites. That is not the case in practice. Common HTTP user agents include household appliances, stereos, scales, firmware update scripts, command-line programs, mobile apps, and communication devices in a multitude of shapes and sizes. Likewise, common HTTP origin servers include home automation units, configurable networking components, office machines, autonomous robots, news feeds, traffic cameras, ad selectors, and video-delivery platforms.
在考慮 HTTP 的設(shè)計(jì)時(shí)致板,很容易掉進(jìn)一個(gè)思維陷阱:所有用戶代理(user agent)都是通用瀏覽器和所有原始服務(wù)器是大型公用網(wǎng)站交煞。這樣是不切實(shí)際的。常見(jiàn)的 HTTP 用戶代理包含各種形狀和尺寸的家用設(shè)備斟或,固件更新腳本素征,命令行程序,手機(jī)應(yīng)用程序萝挤,和通信設(shè)備御毅。同樣,常見(jiàn)的 HTTP 來(lái)源服務(wù)器包含家庭自動(dòng)化單元怜珍,可配置的網(wǎng)絡(luò)組件端蛆,辦公設(shè)備,獨(dú)立存在的機(jī)器人酥泛,新聞提要今豆,交通攝像機(jī),廣告選擇器柔袁,和視頻分發(fā)平臺(tái)晚凿。
The term "user agent" does not imply that there is a human user directly interacting with the software agent at the time of a request. In many cases, a user agent is installed or configured to run in the background and save its results for later inspection (or save only a subset of those results that might be interesting or erroneous). Spiders, for example, are typically given a start URI and configured to follow certain behavior while crawling the Web as a hypertext graph.
術(shù)語(yǔ) “用戶代理” 不意味著在發(fā)起請(qǐng)求時(shí)是由真人用戶直接交互軟件代理。在許多案例中瘦馍,用戶代理是安裝好或配置好的在后臺(tái)運(yùn)行或保存結(jié)果將來(lái)檢查(或只保存這些結(jié)果中他們可能感興趣的子集或錯(cuò)誤信息)歼秽。例如爬蟲(chóng),是典型的使用 URL 和經(jīng)過(guò)配置遵循某種行為的抓取網(wǎng)站超文本信息程序情组。
The implementation diversity of HTTP means that not all user agents can make interactive suggestions to their user or provide adequate warning for security or privacy concerns. In the few cases where this specification requires reporting of errors to the user, it is acceptable for such reporting to only be observable in an error console or log file. Likewise, requirements that an automated action be confirmed by the user before proceeding might be met via advance configuration choices, run-time options, or simple avoidance of the unsafe action; confirmation does not imply any specific user interface or interruption of normal processing if the user has already made that choice.
HTTP 的實(shí)現(xiàn)差異意味著不是所有用戶代理可以與它們的用戶交互反饋或?yàn)榘踩螂[私問(wèn)題提供充分警告燥筷。在少數(shù)案例本規(guī)范要求對(duì)用戶報(bào)告錯(cuò)誤,它可以接收這樣的錯(cuò)誤報(bào)告只在錯(cuò)誤控制臺(tái)或日志文件查看院崇。同樣肆氓,自動(dòng)化操作之前需要讓用戶確認(rèn),通過(guò)先進(jìn)的配置選擇底瓣,運(yùn)行時(shí)選項(xiàng)谢揪,或簡(jiǎn)單的避免不安全操作;確認(rèn)操作不意味著任何特定用戶接口或用戶做出選擇后中斷正常處理捐凭。