- Web Penetration Testing with Kali Linux(Third Edition)
- Gilberto Najera Gutierrez Juned Ahmed Ansari
- 351字
- 2021-06-24 18:44:51
The response header
Upon receiving a request and processing its contents, the server may respond with a message such as the one shown here:

The first line of the response header contains the status code (200), which is a three-digit code. This helps the browser understand the status of operation. The following are the details of a few important fields:
Status code: There is no field named status code, but the value is passed in the header. The 2xx series of status codes are used to communicate a successful operation back to the web browser. The 3xx series is used to indicate redirection when a server wants the client to connect to another URL when a web page is moved. The 4xx series is used to indicate an error in the client request and that the user will have to modify the request before resending. The 5xx series indicates an error on the server side, as the server was unable to complete the operation. In the preceding header, the status code is 200, which means that the operation was successful. A full list of HTTP status codes can be found at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status.
Set-Cookie: This field, if defined, will establish a cookie value in the client that can be used by the server to identify the client and store temporary data.
Cache-Control: This indicates whether or not the contents of the response (images, script code, or HTML) should be stored in the browser's cache to reduce page loading times and how this should be done.
Server: This field indicates the server type and version. As this information may be of interest for potential attackers, it is good practice to configure servers to omit its responses, as is the case in the header shown in the preceding screenshot.
Content-Length: This field will contain a value indicating the number of bytes in the body of the response. It is used so that the other party can know when the current request/response has finished.
The exhaustive list of all of the header fields and their usage can be found at the following URL: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html.
- Linux Mint Essentials
- Linux內(nèi)核完全注釋(20周年版·第2版)
- 嵌入式Linux系統(tǒng)開發(fā):基于Yocto Project
- Windows Server 2012 Hyper-V Cookbook
- 構(gòu)建可擴(kuò)展分布式系統(tǒng):方法與實踐
- 新手易學(xué):系統(tǒng)安裝與重裝
- 異質(zhì)結(jié)原理與器件
- Linux內(nèi)核觀測技術(shù)BPF
- Kali Linux 2018:Windows Penetration Testing
- Linux命令行大全(第2版)
- Linux系統(tǒng)最佳實踐工具:命令行技術(shù)
- Hands-On GPU Programming with Python and CUDA
- bash shell腳本編程經(jīng)典實例(第2版)
- Linux內(nèi)核分析及應(yīng)用
- 大規(guī)模Linux集群架構(gòu)最佳實踐:如何管理上千臺服務(wù)器