![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 1 707 Pomógł: 266 Dołączył: 3.07.2012 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Stosunkowo często używam Content-Type: text/plain, głównie dla moich własnych narzędzi. Tak się zastanawiam - czy jest jakiś standard jaki powinien być znak nowej linii dla zwykłego tekstu wysyłanego do przeglądarki? Jak jeszcze byłem lamusem, używałem do tego celu PHP_EOL, co jest absolutną bzdurą, bo przecież odpowiedź do przeglądarki nie ma nic wspólnego z systemem używanym na serwerze. Teraz używam \n, ale być może jakieś standardy zalecają \r\n?
Oczywiście działa jedno i drugie. Pytam jako pedant. (IMG:style_emoticons/default/smile.gif) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 460 Pomógł: 49 Dołączył: 5.06.2011 Ostrzeżenie: (0%) ![]() ![]() |
Jak szukać jakiejś bardziej konkretnej podkładki, to jeszcze to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
Cytat Headers can be grouped according to their contexts: General header: Headers applying to both requests and responses but with no relation to the data eventually transmitted in the body. Request header: Headers containing more information about the resource to be fetched or about the client itself. Response header: Headers with additional information about the response, like its location or about the server itself (name and version etc.). Entity header: Headers containing more information about the body of the entity, like its content length or its MIME-type. Cytat Content negotiation
Accept Informs the server about the types of data that can be sent back. It is MIME-type. Accept-Charset Informs the server about which character set the client is able to understand. Accept-Encoding Informs the server about the encoding algorithm, usually a compression algorithm, that can be used on the resource sent back. Accept-Language Informs the server about the language the server is expected to send back. This is a hint and is not necessarily under the full control of the user: the server should always pay attention not to override an explicit user choice (like selecting a language in a drop down list). Ten post edytował trzczy 25.01.2018, 14:48:20 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 4.10.2025 - 18:58 |