Thread IE+andere Browser: Code (dl-Link) im Forum wird als HTML angezeigt (42 answers)
Opened by GwenDragon at 2011-01-10 09:50

GwenDragon
 2011-01-11 14:34
#144463 #144463
User since
2005-01-17
14510 Artikel
Admin1
[Homepage]
user image
RFC 2616 besagt aber in 7.2.1:
Quote
Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream".

Dabei bedeutet: "If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. "
Wenn und nur wenn der Medientyp nicht im Headerfeld Content-Type angegeben ist, darf der Empfänger den Medientyp druch Inspektion des Inhalts oder der Dateinamenerweiterungen der URI erraten.

Wenn Browser trotzdem MIME-Type erraten, brechen sie die RFC 2616 des HTTP/1.1-Protokolls.

Tolles "Feature" wenn der Browser sich nicht um die wichtigen Regeln kümmern muss.

//EDIT: Typo
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread IE+andere Browser: Code (dl-Link) im Forum wird als HTML angezeigt