Вы находитесь на странице: 1из 56

LOS SERVICIOS WEB

�����������������

� ��������������������������������
����������������������
� ������������������������ �������������������
������������������������������
� �������������������������������������������������
���
� �������������������������
� �������������������������� �������������������
���������
� �����������������������������������������������
��������������������������� ��������� ���������
� ����������������������������������������������������
��������������������������� ������ ���������
�����������

� ������������ �������� �����������


� ����������� �����
� ��� �������� �������� ��������
� ��� �������� �������� �����
� ����������
� ���������������������������������������
� ����������������������������������������������
� ���������
ftp://ftp.is.co.za/rfc/rfc1808.txt
http://www.math.uio.no/compression-fag/part1.html
mailto:mduers@ifi.unizh.ch
telnet://melvyl.ucop.edu/
���

� ���������
<esquema>:<parte especifica del esquema>

� �����������������������������
� ��������������� ��������������������������������
� �����������������������������������������������������
�������
� ������������������������
<esquema>://<autoridad><path>?<consulta>

� ���� ����������
� ������������ ���������
� ��������������������
���

� ���������������������
� �������������������������
� ��������������������������������������
� ���������������������������������������

��������������������� ������������
���������� ������������������������������������������
���������� ������������������������������������������
������������������������
���

� �����������������������������������������������
����������������������������
� �����������������������������������������������
������������
� ���������������������������������

���������������������������������

������� ����������� �������������

� ��������
�������������������������������
���

� �����������������
<esquema>://<usuario>:<clave>@<host>:<puerto>/<path>

� ��������������������������������������
� �����������������������������������������������
� ������������������������������������������
�������
���������

� ������������
http://<host>:<puerto>/<path>?<consulta>

���� �������������������
�������������������
�������
��������������������� ������������������������
���������������������

� ���������
���������������������������������������������������
��������������������������������
���������������������������������������������������������

� ������������������������ ��������������
����������������
�����������������

� �������������������������������� ������������
�������������

� ��������������������������������������

� ��������������������������� �����������������
�������������������������������

� ���������������������������������������
�����

� �������������������� ���������������������
��������������������������������������������
��������������������������
�����������������

� �������������������� �������������
�������������

�������
��������������

� �������������������������������������
����������
� �����������������������������������������������
� ���������������������� ������������������������������
������
�����������������

������������������������
������������������������������ ��������������������������

������������������������

��������������
�������������

������������� ��������������
�������
������������� ����������

������� �������

����������

�������� ��������

��������������� ���������������

���������������������
�����������������

������������������

�������
������������

�������������������

������������������

� �

�������������������

������������������

� �

�������������������
���������������������

� �����������������������������������������������
�������������������������� ����������������
��������

� ������� �����������������������������������
�����������

� �������������������������������������������
����
� ���������������������
� ������������������
� ��������������
�������������

� ���������������������������������������������
�����������������������������������
� �������������������������������������������������������
������������������������������������

�������������

������������ ������������

� �������������� �������������������������������������������
��������������
�������������������������������������
����������������������������������������
����������

� ������������������������������������

�������������
������
������������� �������������
��������

� ���������������������������� �������������������
��������
��������

� ������������������������������������������������
����������������������������������������

� �����������������������������������������
�������������������������������������������
�������

� �����������������������������������������������
������������������
� ������������������������������������
� ����������������
����������

� ������������������������������������

��������
������
�������������� ��������������
��������

� ���������������������������������

��������
���������������� �������������
�����

� ��������������������������������������������������
�������������������������������������
��������

� ������������������������������������� ������
������������������

� ������������������������������������������
������������������������������������������������
�����������������������������������������������
�����������
�����

� ������������������������������������������������
����������������������������������������������������
� ���������������������������������������������������������
�������������������������������������
� �������� �����������������������������������������������
�����������������������������������������
� ������������������������������������������������������
�����������������������������������������������

������������������

����� �����
������� �������

�������������������
�����������������
�����

� ������������������
� �����������������������
� �����������������������������������������������������
������
� ��������������������������������������������
� ��������������������
� ����������� ��������������������������������
������������
� �����������������������������������������������
�����������
������������������

� �������������������������������

� �������������������������������������������
������������

� �������������������������������������������������
�����������������������
� ������������������������������������������������
���������� �����������������������������
� ��������������������
��������

� ���������������������������
� ������������������������������������������ ��������
�������
� ������������������������������������������������������
� ������������������������������������������������������

�������������������������������������������

����������������� ���������������

������������������� �������������������

��������������������� ����������������������

�������������������� ��������������������

������� �������
��������

� ���������

Mensaje-HTTP = Solicitud-Sencilla | Respuesta-Sencilla


| Solicitud-Completa | Respuesta-Completa

Solicitud-Completa = Línea-Solicitud
*(Cabecera-General | Cabecera-Solicitud | Cabecera-Entidad)
CRLF [Cuerpo-Entidad]

Respuesta-Completa = Línea-Estado
*(Cabecera-General | Cabecera-Respuesta | Cabecera-Entidad)
CRLF [Cuerpo-Entidad]

Solicitud-Sencilla = “GET” SP URL-Solicitado CRLF


��������������
Respuesta-Sencilla = [Cuerpo-Entidad]
��������

� ����������������������������������������������������
������������������
� ������������������������������������������������������
��������������
� ������������������������������������� ���������������
��������������������������������������������� �������
�����������
� ��������������������������������������������������
��������������������������������������������������������
� ��������������������������������������������������
�������������������������������������������������������
� ������������������������������������������������
�������������������������������������������������������������
������������������������������������������������������
� ��������������������������������������������������
���������

� ��������������

������� ���������������������������

�������� ��������������������������������������
����������������������������������������
��������� ��������������������������������������

������� ���������������������������������������
�����������������������������

� ����������������������������������������������
�����������������
� �������������������������
� ���������������������������
� ���
� �����������������������������������������
� ������������������������������������������������
���������
� ��������������������
��������������������

� ���������������������������������������
������������������������������������������

Linea-Solicitud = Método SP URL-Petición SP Versión-HTTP CRLF

OPTIONS http://156.35.162.4/index.html HTTP/1.1

�����������������������������������������������������
��������������������

� �����������������������������������������������
���������������������������������������������������
��������

OPTIONS http://156.35.162.4/index.html HTTP/1.1


Host:156.35.162.4

HTTP/1.1 200 OK
���������
Date: Sun, 19 Jan 2003 18:49:12 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Allow: GET,HEAD,POST,OPTIONS,TRACE
Content-Length: 0
Connection: close
Content-Type: text/html; charset=ISO-8859-1
��������������������

� ���������������������������������������
������������������������������� ����
���������������������������������������
��������������������

� ���� �����������������������������������������
��������������������������������������������
����������������������
HTTP/1.1 200 OK
Date: Sun, 19 Jan 2003 18:55:49 GMT ���������
Server: Apache/2.0.40 (Red Hat Linux)
Last-Modified: Wed, 18 Dec 2002 12:11:06 GMT
ETag: "27ae90-44-9221aa80"
Accept-Ranges: bytes
Content-Length: 68
Connection: close
Content-Type: text/html; charset=ISO-8859-1

<html> <!–- codigo de la página -->


��������������������

� ����������������������������������������������
������������������
� ���������������������������������������������������
��������������������������������
� ���������������������������������������������������������
������������������������������������������

GET //css/contenidos.css HTTP/1.1


….
If-Modified-Since: Fri, 23 Jun 2006 08:45:05 GMT

HTTP/1.1 304 Not Modified


Date: Fri, 25 Aug 2006 13:49:41 GMT
Server: Apache/2.0.54 (Ubuntu) PHP/5.0.5-2ubuntu1.3

��������������������

� �������������������������������������������
��������������������������������� �������������
����������������������������
��������
GET /index.php?usuario=21&tipo=34 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, application/x-shockwave-flash, */*
Accept-Language: es
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: xilgueru.edv.uniovi.es:11500
Connection: Keep-Alive
��������������������

� �����������������������������������������������������
�����������������������������������������������������
�������������
����������
����
����������
�������������������������������������������

������
������
�������
������
����������������� ������
���� �����������������������
�������
�������
��������������������

GET http://156.35.162.4/fotos/paul.jpg HTTP/1.1


�������� �
Host:156.35.162.4

HTTP/1.1 200 OK
���������
Date: Sun, 19 Jan 2003 19:14:42 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Last-Modified: Sun, 19 Jan 2003 19:04:38 GMT
ETag: "27ae93-aa9-13f6bd80"
Accept-Ranges: bytes
Content-Length: 2729
Connection: close
Content-Type: image/jpeg
X-Pad: avoid browser bug
<!– FOTOGRAFÍA -->
��������������������

� ������������������������������������������������������
�������������������������������������������������������
������������������������������������������������
����������������������������������

HTTP/1.1 200 OK
Date: Sun, 19 Jan 2003 19:00:33 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Last-Modified: Wed, 18 Dec 2002 12:11:06 GMT
ETag: "27ae90-44-9221aa80"
Accept-Ranges: bytes
Content-Length: 68
Connection: close
Content-Type: text/html; charset=ISO-8859-1
��������������������

� ����
� �����������
� ���������������������� �����������������������
����������������������
� �������������������
��������������������

� ���������������������������������������������
������������������������������������������������
�����������������������������������������������
��������������
� ������������������������������������������������������
��������������������������
� ������������������������������������������������������
��������
�����
�����
�������

������������������

�������
������������

�������������������

������
������������������������

���������������������
������������������������

���������������������������
<form
action="http://xilgueru.edv.uniovi.es:11500/notificacion.php"
method="post" >
<input type="hidden" name="Entamu" value="Rustiques">
<td><b>Nombre:</b> </td>
<td><input type="TEXT" size = 35 name="nome"></td>
<td><b>Tel&eacute;fono:</b> </td>
<td><input type="TEXT" size = 30 name="telefonu"></td>
...............
<td align="RIGHT" ><input type="RESET"
value="Borrar"></td>
<td><input type="SUBMIT" value="Enviar"></td>
</table>
���������������������
</form>
������������������������

POST /notificacion.php HTTP/1.1


Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, application/x-shockwave-flash, */*
Referer: http://www.coala.uniovi.es/~xabi/clase/formRust.html
Accept-Language: es
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: xilgueru.edv.uniovi.es:11500
Content-Length: 171
��������������������
Connection: Keep-Alive
Cache-Control: no-cache

Entamu=Rustiques&nome=Xabiel+Garc%EDa&telefonu=3439349853&direucion=Viesque
s&email=xabiel@correo.uniovi.es&tipu=Casa&carauter=300+m+&fastera=La+Provid
encia&perres=30000000
�������

� ������ ������� ���������


� ������������������������������������
����������������������������������
� ���������������������������������� ������ ����������
������������������������������ �������������
���������������������

���������� �����������������������
������������

������������������

�������
������������

�������������������

����������
�������

� ����������������������������������������������������
�������������

� ��������������������������� ������������������������
�������� �������������

� ���������������������
� ����������������� ��������������
� ������������
� ������������������ �����������������������

� ��������������
� ������������������������������������� ����������
� ���������������������������������������������������
� ��������������������������
��������

����������� ��������� ��� �������� �������������

�������� ��������� �����������������

����������
������� ���
���������� ��������� ��������� �������������� �������� �����

�������
������� ����
�������� ���������� ������������ �����
�������

� ����������������������

# cabecera HTTP
print (“Content-Type: text/html\n\n”);
# Generación del documento
print (“<head><title>Resultado</title></head>\n”);
print (“<body>\n”);
print <<“HEADFORM”;
<h1> Anuario Telefónico </h1>
<p> Claves de búsqueda </p>
<form method=“post” action=“/cgi-bin/scripts/phone.pl”>
<input type=“text” name=“keys” size=“40” value=“$Keys”>
<input type=“submit” value=“Iniciar la búsqueda”>
</form>
HEADFORM
....
���������������������

� ���������������������������������
����������������������������������������

Línea-de-estado = Versión-HTTP SP Código-Estado SP


Frase-de-Razón CRLF

HTTP/1.1 200 OK

HTTP/1.1 501 Method Not Implemented

HTTP/1.1 404 Not Found


�����������������

� ��������������������
� ��������������
� ������
� ������� ���
� ���
� ��������������������
� ��������������������������
� ��� ������� ���
� ������������ ���
� ��� ����� ���
� ������ ��� ������� ���
� ���
� ���������������������������
� ��� ����������� ���
� ������������ ��� ��������� ���
� ���
�������������������������������

� ������������������������������������������������
���������������������������
� ��������������������������������������������������
�������������������������������������������������

Server: Apache/2.0.40 (Red Hat Linux)


��������������������������������

� �����������������������������������������
�������������
� ��������������������������������������������
�������������������������������� �������������
���
� ����������������������������������������
� ����������������������������������������
� ����������������������������������
�����������
� ���������������������������������������������
��������
� �����������������������������������������
�����������������������
�����������

� �����������������������
����������� ����
� ���������������������������� ���
������������

� ���������������������

� ������������������������������
�������� ����������������������
����������

� ������������������������������
��������������������������
����������
�����������

� ��������������������������������������������������
��������� ��������������������������
� ��������������
� ��������������������������
��

� ���������������������� ������������������
��������������

� ����������������������������������
� ������������������������������� ���������������������
��������������������

� ���������������������������
Hypertext Transfer Protocol
HTTP/1.1 200 OK\r\n
Date: Fri, 25 Aug 2006 08:10:54 GMT\r\n
Server: Apache\r\n
Set-Cookie: JSESSIONID=82818520216567447A4FFA18D02F8A9D;
Path=/\r\n
Vary: Accept-Encoding\r\n
Content-Encoding: gzip\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Transfer-Encoding: chunked\r\n
Content-Type: text/html;charset=ISO-8859-1\r\n
\r\n
HTTP chunked response
Content-encoded entity body (gzip): 928 bytes -> 1817 bytes
��������������������

� ���������������������������� ������������������
������������������
GET /nada.jsp HTTP/1.1\r\n
Host: www.lne.es\r\n

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
Keep-Alive: 300\r\n
Connection: keep-alive\r\n
Referer: http://www.lne.es/\r\n
Cookie:
__utma=184110843.1800093202.1155130588.1156405623.1156489485.10;
JSESSIONID=82818520216567447A4FFA18D02F8A9D;
__utmc=184110843\r\n
\r\n

���������������� ������������������������������
�������������������

� �����������������������
� ���������������������������������������������������
����������������������

� ������������������ ������������

� ��������������������������������������

� �����������������������������������������connection:
close

� ������������������������������������������������������
��������������������������������TIME_WAIT
�������������������

� ���������� �������������
� �������������������������������������������

� ������������������������������������� ���
������ ����������������������������

� ��������������������������������������
���������������������� ��������������
�������������������

� ����������������������
� ��������������������� ���������� �������������
���������������������������� �������������������

� ��������������������������������������� �����
������������������������������������������ ���������
������������������������������������������������������
�������������

� �������� ����������������������������������������������
���

� ���������������������������������������
�������������������

� �����������������������
� �������������������������������������������������
� ������������������������Transfer-Encoding: chunked
� ������������������������������������������������������
������
� ����������������������������������������������������
�����
HTTP/1.1 200 OK
Server: Apache/1.2.7-dev
Date: Sun, 18 Jul 2004 05:28:00 GMT
Transfer-Encoding: chunked
Content-Type: text/html

21E
< ….. 542 bytes de datos …>
61
< ….. 97 bytes de datos …>
0

Вам также может понравиться