Cheatsheet: Difference between revisions
Content added Content deleted
Line 410: | Line 410: | ||
== HTTP Headers == |
== HTTP Headers == |
||
{|class="wikitable" |
|||
|- |
|||
⚫ | |||
! Header !! Uses |
|||
Location: 1) Used to ask a web browser to load a different web page: |
|||
|- |
|||
Client request: |
|||
⚫ | |||
GET /index.html HTTP/1.1 |
|||
|- |
|||
Host: www.example.com |
|||
|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/> |
|||
Server response: |
|||
⚫ | |||
HTTP/1.1 302 Found |
|||
|- |
|||
Location: http://www.example.org/index.php |
|||
⚫ | |||
⚫ | |||
|- |
|||
⚫ | |||
|Accept|| |
|||
|- |
|||
|User-Agent|| |
|||
⚫ | |||
|- |
|||
⚫ | |||
⚫ | |||
⚫ | |||
|- |
|||
⚫ | |||
⚫ | |||
Authorization: Basic access authentication is used to provide a user name and password when making a request. |
|||
|- |
|||
Credentials are the base64 encoding of id and password joined by a single colon |
|||
⚫ | |||
Base64-encoding of 'Aladdin:OpenSesame' is 'QWxhZGRpbjpPcGVuU2VzYW1l' |
|||
|- |
|||
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l |
|||
⚫ | |||
https://Aladdin:OpenSesame@www.example.com/index.html ==> This will not ask for the credentials;deprecated now |
|||
|- |
|||
⚫ | |||
|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 |
|||
⚫ | |||
|- |
|||
⚫ | |||
⚫ | |||
|- |
|||
|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 = |
= FTP = |