CRLF
)GET
, einem Leerzeichen, der reinen Adresse und dann der verwendeten HTTP-VersionGET /index.php HTTP/1.1
Host: www.htw-berlin.de
Connection: keep-alive
Accept: text/html, … ;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) …
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,de;q=0.6
HTTP/1.1 200 OK
Date: Mon, 06 Oct 2014 16:07:02 GMT
Server: Apache
X-Powered-By: PHP/5.3.15
Set-Cookie: fe_typo_user=7ffafacc72…; path=/; domain=.htw-berlin.de
Cache-Control: private
Vary: User-Agent,Accept-Encoding
Content-Encoding: gzip
Content-Length: 3253
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
GET | Anfragen einer Ressource |
POST | Anlegen einer Ressource (oder ändern) |
HEAD | Nur Header, nicht Body senden. |
PUT | Ersetzt eine Ressource (oder legt sie an) |
DELETE | Löschen einer Ressource |
TRACE | Echo der Anfrage |
OPTIONS | Liste der unterstützten Methoden |
CONNECT | Stellt einen Tunnel zur Verfügung und leitet weiter |
PATCH | Verändert eine Ressource (teilweise) |
JA: https://host.tld/search.php?q=Suchbegriff
NEIN: https://host.tld/login.php?name=admin&password=auchadmin
POST /wiki/Spezial:Search HTTP/1.1
Host: de.wikipedia.org
Content-Type: application/x-www-form-urlencoded
Content-Length: 24
search=Katzen&go=Artikel
HTTP/1.1 302 Found
Date: Fri, 13 Jan 2006 15:32:43 GMT
Location: https://de.wikipedia.org/wiki/Katzen
Code | Gruppe | Bedeutung |
---|---|---|
1xx | Informational | Bearbeitung der Anfrage dauert noch an |
2xx | Success | Anfrage war erfolgreich |
3xx | Redirection | Bearbeitung erfordert weitere Schritte des Clients |
4xx | Client Error | Ursache des Scheiterns liegt wohl bei Client |
5xx | Server Error | Ursache des Scheiterns liegt wohl bei Server |
Code | Nachricht | Bedeutung |
---|---|---|
200 | OK | Anfrage erfolgreich beendet |
201 | Created | Alles gut, Ressource angelegt. |
301 | Moved Permanently | Adresse nicht mehr gültig, Umleitung zu neuer Location |
307 | Temporary Redirect | Vorübergehend woanders vorhanden |
Code | Nachricht | Bedeutung |
---|---|---|
401 | Unauthorized | Authentifizierung erfordert |
403 | Forbidden | Client ist nicht berechtigt |
404 | Not Found | Ressource wurde nicht gefunden |
500 | Internal Server Error | Irgendwas ging auf dem Server schief |
503 | Service Unavailable | Server eventuell überlastet |
curl -v htw-berlin.de
GET / HTTP/1.1
User-Agent: curl/7.30.0
Host: htw-berlin.de
Accept: */*
HTTP/1.1 302 FOUND
Server: Apache
Location: http://www.htw-berlin.de/
Content-Length: 0
Content-Type: text/plain; charset=ISO-8859-1
GET / HTTP/1.1
User-Agent: curl/7.30.0
Host: www.htw-berlin.de
Accept: */*
HTTP/1.1 200 OK
Server: Apache
X-Powered-By: PHP/5.3.15
Set-Cookie: fe_typo_user=7dc990a5a…
Cache-Control: private
Content-Type: text/html; charset=utf-8
<!DOCTYPE html>
<html lang="de">
<head>
…
Magic Cookiesdurch Netscape
Set-Cookie: value[; expires=date][; domain=name][; path=path]
[; secure][; HttpOnly]
GET / HTTP/1.1
Host: www.facebook.com
HTTP/1.1 200 OK
Set-Cookie: datr=cQw8VCSHQe2BlCBjtE4JvYOa;
expires=Wed, 12-Oct-2016 17:31:55 GMT; Max-Age=63072000;
path=/; domain=.facebook.com; httponly
Set-Cookie: reg_ext_ref=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT;
Max-Age=0; path=/; domain=.facebook.com
Set-Cookie: reg_fb_ref=https%3A%2F%2Fwww.facebook.com%2F; path=/;
domain=.facebook.com
Set-Cookie: reg_fb_gate=https%3A%2F%2Fwww.facebook.com%2F; path=/;
domain=.facebook.com
GET / HTTP/1.1
Cookie: datr=cQw8VCSHQe2BlCBjtE4JvYOa;
reg_fb_ref=https%3A%2F%2Fwww.facebook.com%2F;
reg_fb_gate=https%3A%2F%2Fwww.facebook.com%2F
GET / HTTP/1.1
⇣
HTTP/1.1 401 Authorization Required
Server: Apache/2.2.16 (Debian)
WWW-Authenticate: Basic realm="Authorized personnel only."
⇣
GET / HTTP/1.1
Authorization: Basic YWRtaW46eW9sbw==