Documentos de Académico
Documentos de Profesional
Documentos de Cultura
T3 Protocolos
T3 Protocolos
protocol://user:passwd@host:port/path/file?query#fragment
1.- Petición
2.- Respuesta
1. TCP SYN
3. TCP ACK
4. HTTP Request
5. HTTP Response
6. TCP FIN
7. TCP ACK
3. TCP ACK
4. HTTP Request
5. HTTP Response
6. HTTP Request
7. HTTP Response
8. TCP FIN
9. TCP ACK
3. TCP ACK
4. HTTP Request
5. HTTP Request
6. HTTP Response
7. HTTP Response
8. TCP FIN
9. TCP ACK
HTTP HTTP
Cliente
Servidor Proxy Servidor Web
Línea en blanco
Cuerpo del
mensaje
(opcional)
Línea en blanco
Cuerpo del
mensaje
(opcional)
<html>…
Igual que 301/302, excepto que si la petición original era POST, el documento redirigido
303 See Other (dado en la cabecera Location) debería ser recuperado mediante GET. (Nuevo en
HTTP 1.1)
Es idéntica a 302 ("Found" o "Temporarily Moved"). Fue añádido a HTTP 1.1 ya que
Temporary
307 muchos navegadores siguen erróneamente la redirección de una respuesta 302 incluso
Redirect si el mensaje original fue un POST. (Nuevo en HTTP 1.1)
Method Not El método de la petición (GET, POST, HEAD, DELETE, PUT, TRACE, etc.)
405 Allowed no estaba permitido para este recurso particular. (Nuevo en HTTP 1.1)
El recurso indicado genera un tipo MIME incompatible con el especificado
406 Not Acceptable
por el cliente mediante su cabecera Accept. (Nuevo en HTTP 1.1)
Proxy
Similar a 401, pero el servidor proxy debería devolver una cabecera Proxy-
407 Authentication
Authenticate. (Nuevo en HTTP 1.1)
Required
1b
abcdefghijklmnopqrstuvwxyz
10
1234567890abcdefg
0
1b
abcdefghijklmnopqrstuvwxyz
0
Expires: Tue, 15 Nov 1994 08:12:31 GMT
SI NO PONE NADA EL Q ES 1
• Servidor
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm=“/honeypot”
• Cliente
GET /secret/default.htm HTTP/1.1
Authorization: Basic QwhDtvSttS234SddvsaQ==
• Servidor
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm=“proxy”
• Cliente
GET http://server.es/secret/honeypot.htm HTTP/1.1
Proxy-Authorization: Basic QwhDtvSttS234SddvsaQ==
• Servidor 1
HTTP/1.1 302 Found
Location: http://www.host2.es/honeypot/default.htm
• Cliente
GET /honeypot/default.htm HTTP/1.1
Host: www.host2.es
• Servidor 2
HTTP/1.1 200 OK
• Servidor
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm=“/honeypot”
• Cliente
GET /secret/default.htm HTTP/1.1
Authorization: Basic QwhDtvSttS234SddvsaQ==
• Proxy
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm=“proxy”
• Cliente
GET http://server.es/secret/honeypot.htm HTTP/1.1
Proxy-Authorization: Basic QwhDtvSttS234SddvsaQ==
<html>
<body>
<p>Hello World!</p>
</body>
</html>
200 OK
ETag: “xxxx”
GET URI
200 OK
ETag: “xxxx”
200 OK
ETag: “yyyy”
PUT URI
If-Match: “xxxx”
GET URI
200 OK
200 OK Last-Modified: …
Last-Modified: …
GET URI
GET URI
If-Modified-Since
200 OK
Last-Modified: …
304 Not Modified
GET URI
200 OK
200 OK
ETag: “xxxx”
ETag: “xxxx”
GET URI
GET URI
If-None-Match: “xxxx”
200 OK
ETag: “xxxx”
304 Not Modified
Arquitectura y Prestaciones de la Web 79
If-Unmodified-Since pide que el servidor conteste, si
el recurso no ha sido modificado después de la fecha
indicada.
GET URI
If-Unmodified-Since: …
Range: …
GET URI
200 OK
Last-Modified: …
GET URI
200 OK
ETag: “xxxx”
GET URI
If-Match: “xxxx”
Range: …
200 OK
ETag: “yyyy”
GET URI
If-Range: “xxxx”
Range: …
200 OK
ETag: “yyyy”
…
El servidor que si soporte HTTP/2.0 contestará:
HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Upgrade: h2c
HEADERS
RESERVE RESERVE
D OPEN D
(local) (remote)
END_STREAM END_STREAM
HEADERS HEADERS
RST_STREAM
HALF HALF
CLOSED CLOSED
(remote) (local)
END_STREAM END_STREAM
RST_STREAM RST_STREAM
RST_STREAM RST_STREAM
CLOSED