Cheatsheet: Difference between revisions
→HTTP Headers
Line 410:
== HTTP Headers ==
{|class="wikitable"
|-
Set-cookie:▼
! Header !! Uses
|-
|-
|Location ||1) Used to ask a web browser to load a different web page<br/>Client request:<br/>''GET /index.html HTTP/1.1''<br/>''Host: www.example.com''<br/>Server response:<br/>''HTTP/1.1 302 Found''<br/>''Location: http://www.example.org/index.php.''<br/>
|-
▲ 2) To provide info about location of a newly created resource, the Location header should be sent with an HTTP status code of 201 or 202.
|-
▲ Host: The host Header tells the webserver which virtual host to use if same virtual host is using several aliases
|-
content-type:▼
|-
content-length:▼
date:▼
|-
expires:▼
|-
|-
|-
Referrer: When a user clicks a hyperlink in a web browser, the browser sends a request to the server holding the destination webpage. ▼
|Authorization||Basic access authentication is used to provide a user name and password when making a request.<br/>Credentials are the base64 encoding of id and password joined by a single colon<br/>Base64-encoding of 'Aladdin:OpenSesame' is 'QWxhZGRpbjpPcGVuU2VzYW1l'<br/>''Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l''<br/>''https://Aladdin:OpenSesame@www.example.com/index.html'' ==> This will not ask for the credentials; deprecated now
The request may include the referer field, which indicates the last page the user was on (the one where they clicked the link).▼
|-
▲
▲
|-
|X-Forwarded-For (XFF)||Common method for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer.
|}
= FTP =
|