25.04.2013 Views

Xarxes de computadors - Universitat Oberta de Catalunya

Xarxes de computadors - Universitat Oberta de Catalunya

Xarxes de computadors - Universitat Oberta de Catalunya

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

© FUOC • XP06/M2005/01487<br />

ANOTACIONS<br />

272<br />

Programari lliure<br />

Valors <strong>de</strong>finits per a Content-Type<br />

Tipus Subtipus Paràmetres<br />

message<br />

rfc 822 —<br />

partial<br />

external-body<br />

id = ca<strong>de</strong>na;<br />

number = sencer<br />

[;total = sencer ]<br />

access-type = ftp | anon-ftp | tftp |<br />

afs | local-file | mail-server<br />

[;expiration = date-time ]<br />

[;size = sencer ]<br />

[;permission=read | read-write]<br />

[;name = ca<strong>de</strong>na ]<br />

[;site = ca<strong>de</strong>na ]<br />

[;dir = ca<strong>de</strong>na ]<br />

[;mo<strong>de</strong> = netascii | octet | mail |<br />

ascii | ebcdic | image | localn ]<br />

[;server = ca<strong>de</strong>na ]<br />

[;subject = ca<strong>de</strong>na ]<br />

Especificador <strong>de</strong>l tipus <strong>de</strong> codificació (Content-Transfer-<br />

Encoding)<br />

En alguns protocols, com l’SMTP, la informació que s’envia ha <strong>de</strong> ser<br />

en ASCII <strong>de</strong> 7 bits. A vega<strong>de</strong>s, les da<strong>de</strong>s originals no tindran aquest<br />

format i, llavors, els serà necessari aplicar algun tipus <strong>de</strong> codificació<br />

abans d’enviar-les.<br />

El camp <strong>de</strong> capçalera Content-Transfer-Encoding serveix per<br />

a especificar el tipus <strong>de</strong> codificació que s’ha aplicat al contingut <strong>de</strong>l<br />

missatge perquè el receptor pugui <strong>de</strong>scodificar-lo, si és necessari. La<br />

norma <strong>de</strong>fineix diferents tipus <strong>de</strong> codificació:<br />

Content-Transfer-Encoding: mecanisme<br />

mecanisme = 7bit | 8bit | binary | quoted-printable | base64<br />

a) Codificació 7bit | 8bit | binary<br />

Els mecanismes <strong>de</strong> codificació 7bit, 8bit i binary només serveixen<br />

per a indicar <strong>de</strong> quin tipus són les da<strong>de</strong>s transmeses. En<br />

aquests casos, les da<strong>de</strong>s no es codifiquen i, per norma general,<br />

s’utilitzen per a aplicacions que no restringeixen la representació<br />

<strong>de</strong> da<strong>de</strong>s en 8 bits.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!