From 980fe00a74a9ad013b945755415ace2e5429c3c2 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 27 Oct 2021 02:31:24 +0300 Subject: [RU] Remove notranslate (#2874) --- files/ru/web/http/caching/index.html | 14 ++++---- .../corsalloworiginnotmatchingorigin/index.html | 6 ++-- files/ru/web/http/cors/index.html | 38 +++++++++++----------- files/ru/web/http/csp/index.html | 22 ++++++------- .../ru/web/http/headers/accept-language/index.html | 4 +-- files/ru/web/http/headers/accept-patch/index.html | 4 +-- files/ru/web/http/headers/accept-ranges/index.html | 4 +-- files/ru/web/http/headers/accept/index.html | 4 +-- .../headers/access-control-allow-origin/index.html | 8 ++--- files/ru/web/http/headers/authorization/index.html | 4 +-- files/ru/web/http/headers/connection/index.html | 2 +- .../ru/web/http/headers/content-length/index.html | 2 +- files/ru/web/http/headers/content-type/index.html | 6 ++-- files/ru/web/http/headers/date/index.html | 4 +-- files/ru/web/http/headers/expires/index.html | 4 +-- files/ru/web/http/headers/set-cookie/index.html | 10 +++--- .../headers/strict-transport-security/index.html | 4 +-- files/ru/web/http/methods/connect/index.html | 4 +-- files/ru/web/http/methods/patch/index.html | 6 ++-- files/ru/web/http/overview/index.html | 4 +-- files/ru/web/http/status/301/index.html | 6 ++-- files/ru/web/http/status/307/index.html | 6 ++-- files/ru/web/http/status/400/index.html | 2 +- files/ru/web/http/status/401/index.html | 4 +-- files/ru/web/http/status/403/index.html | 4 +-- files/ru/web/http/status/404/index.html | 4 +-- files/ru/web/http/status/405/index.html | 2 +- files/ru/web/http/status/408/index.html | 2 +- files/ru/web/http/status/425/index.html | 2 +- files/ru/web/http/status/429/index.html | 4 +-- files/ru/web/http/status/500/index.html | 2 +- files/ru/web/http/status/502/index.html | 2 +- files/ru/web/http/status/503/index.html | 2 +- 33 files changed, 98 insertions(+), 98 deletions(-) (limited to 'files/ru/web/http') diff --git a/files/ru/web/http/caching/index.html b/files/ru/web/http/caching/index.html index 3cad10d56f..9fd355dfed 100644 --- a/files/ru/web/http/caching/index.html +++ b/files/ru/web/http/caching/index.html @@ -61,7 +61,7 @@ original_slug: Web/HTTP/Кеширование

В кеше не должно сохраняться ничего — ни по запросам клиента, ни по ответам сервера. Запрос всегда отправляется на сервер, ответ всегда загружается полностью.

-
Cache-Control: no-store
+
Cache-Control: no-store
 Cache-Control: no-cache, no-store, must-revalidate
 
@@ -69,13 +69,13 @@ Cache-Control: no-cache, no-store, must-revalidate

Перед тем, как выдать копию, кеш запрашивает исходный сервер на предмет актуальности ресурса.

-
Cache-Control: no-cache
+
Cache-Control: no-cache

Приватные (private) и общие (public) кеши

Директива "public" указывает, что ответ можно сохранять в любом кеше. Это бывает полезно, если возникает потребность сохранить страницы с HTTP-аутентификацией, или такими кодами ответа, которые обычно не кешируются. Директива же "private" указывает, что ответ предназначен отдельному пользователю и не должен храниться в кеше совместного использования. В этом случае ответ может сохраняться приватным кешем браузера.

-
Cache-Control: private
+
Cache-Control: private
 Cache-Control: public
 
@@ -85,13 +85,13 @@ Cache-Control: public

Подробнее об этом рассказывается в разделе Свежесть ресурса.

-
Cache-Control: max-age=31536000
+
Cache-Control: max-age=31536000

Проверка актуальности

При использовании директивы "must-revalidate" кеш обязан проверять статус ресурсов с истёкшим сроком действия. Те копии, что утратили актуальность, использоваться не должны. Подробнее об этом рассказано ниже, в разделе Валидация кеша.

-
Cache-Control: must-revalidate
+
Cache-Control: must-revalidate

Заголовок Pragma

@@ -108,7 +108,7 @@ Cache-Control: public

Срок действия (freshnessLifetime) вычисляется на основании нескольких заголовков. Если задан заголовок "Cache-control: max-age=N", то срок действия равен N. Если его нет, а это бывает очень часто, проверяется заголовок {{HTTPHeader("Expires")}}, и, если он есть, то срок действия берётся равным значению заголовка Expires минус значение заголовка Date. Наконец, если нет ни того ни другого, смотрят заголовок Last-Modified.  Если он есть, то срок действия равен значению заголовка Date минус значение заголовка Last-modified разделить на 10.
Время устаревания (expirationTime) вычисляется следующим образом:

-
expirationTime = responseTime + freshnessLifetime - currentAge
+
expirationTime = responseTime + freshnessLifetime - currentAge
 

где responseTime — это время получения ответа по часам браузера, а currentAge — текущий возраст кеша.

@@ -149,7 +149,7 @@ Cache-Control: public

Это может быть полезно, например, при динамическом предоставлении контента. При использовании заголовка Vary: User-Agent кеширующие сервера, принимая решение об использовании страницы из кеша, должны учитывать агент пользователя. Так можно избежать ситуации, когда пользователи мобильных устройств по ошибке получат десктопную версию вашего сайта. Вдобавок, это может помочь Google и другим поисковым системам обнаружить мобильную версию страницы, и может также указать им на то, что здесь нет никакой подмены контента с целью поисковой оптимизации (Cloaking).

-
Vary: User-Agent
+
Vary: User-Agent

Поскольку значение заголовка {{HTTPHeader("User-Agent")}} различается ("varies") у мобильных и десктопных клиентов, закешированный мобильный контент не будет по ошибке отсылаться пользователям десктопов и наоборот.

diff --git a/files/ru/web/http/cors/errors/corsalloworiginnotmatchingorigin/index.html b/files/ru/web/http/cors/errors/corsalloworiginnotmatchingorigin/index.html index 1a69c7a3d0..7aba8d390f 100644 --- a/files/ru/web/http/cors/errors/corsalloworiginnotmatchingorigin/index.html +++ b/files/ru/web/http/cors/errors/corsalloworiginnotmatchingorigin/index.html @@ -19,7 +19,7 @@ translation_of: Web/HTTP/CORS/Errors/CORSAllowOriginNotMatchingOrigin

Reason

-
Причина: CORS заголовок 'Access-Control-Allow-Origin' не соответствует 'xyz'
+
Причина: CORS заголовок 'Access-Control-Allow-Origin' не соответствует 'xyz'

Что пошло не так?

@@ -31,11 +31,11 @@ translation_of: Web/HTTP/CORS/Errors/CORSAllowOriginNotMatchingOrigin

К примеру, в Apache, вы можете добавить следующую строку в конфигурацию веб-сервера (в пределах одной из секций - <Directory>, <Location>, <Files> или <VirtualHost>). Обычно конфигурация находиться в файле .conf (наиболее частые имена для него - httpd.conf и apache.conf) или в файле .htaccess.

-
Header set Access-Control-Allow-Origin 'origin-list'
+
Header set Access-Control-Allow-Origin 'origin-list'

В Nginx, для установки такого заголовка можно воспользоваться следующей командой: 

-
add_header 'Access-Control-Allow-Origin' 'origin-list'
+
add_header 'Access-Control-Allow-Origin' 'origin-list'

See also

diff --git a/files/ru/web/http/cors/index.html b/files/ru/web/http/cors/index.html index a4d1f6204f..b3392bc0e3 100644 --- a/files/ru/web/http/cors/index.html +++ b/files/ru/web/http/cors/index.html @@ -87,7 +87,7 @@ translation_of: Web/HTTP/CORS

Например, представьте, что содержимое домена http://foo.example хочет обратиться к содержимому http://bar.other. На домене foo.example может использоваться следующий Javascript код:

-
var invocation = new XMLHttpRequest();
+
var invocation = new XMLHttpRequest();
 var url = 'http://bar.other/resources/public-data/';
 
 function callOtherDomain() {
@@ -105,7 +105,7 @@ function callOtherDomain() {
 
 

Посмотрим, что браузер отправит в таком случае на сервер, а также проверим ответ сервера:

-
GET /resources/public-data/ HTTP/1.1
+
GET /resources/public-data/ HTTP/1.1
 Host: bar.other
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081130 Minefield/3.1b3pre
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
@@ -181,7 +181,7 @@ Content-Type: application/xml
 
 

Ниже приведён пример запроса, который будет предварительно просмотрен.

-
var invocation = new XMLHttpRequest();
+
var invocation = new XMLHttpRequest();
 var url = 'http://bar.other/resources/post-here/';
 var body = '<?xml version="1.0"?><person><name>Arun</name></person>';
 
@@ -209,7 +209,7 @@ function callOtherDomain(){
 
 

Давайте посмотрим на полный обмен между клиентом и сервером. Первый обмен - это предварительный запрос/ответ:

-
OPTIONS /resources/post-here/ HTTP/1.1
+
OPTIONS /resources/post-here/ HTTP/1.1
 Host: bar.other
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081130 Minefield/3.1b3pre
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
@@ -239,7 +239,7 @@ Content-Type: text/plain
 
 

Как только предварительный запрос завершён, отправляется настоящий запрос:

-
POST /resources/post-here/ HTTP/1.1
+
POST /resources/post-here/ HTTP/1.1
 Host: bar.other
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081130 Minefield/3.1b3pre
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
@@ -274,7 +274,7 @@ Content-Type: text/plain
 
 

Строки 1 - 12 выше представляют предварительный запрос с {{HTTPMethod("OPTIONS")}} методом. Браузер определяет, что ему нужно отправить это, основываясь на параметрах запроса, которые использовались во фрагменте кода JavaScript выше, чтобы сервер мог ответить, допустимо ли отправить запрос с фактическими параметрами запроса. OPTIONS - это метод HTTP/1.1, который используется для определения дополнительной информации от серверов, и является {{Glossary("safe")}} методом, что означает, что его нельзя использовать для изменения ресурса. Обратите внимание, что вместе с запросом OPTIONS отправляются два других заголовка запроса (строки 10 и 11 соответственно):

-
Access-Control-Request-Method: POST
+
Access-Control-Request-Method: POST
 Access-Control-Request-Headers: X-PINGOTHER, Content-Type
 
@@ -282,7 +282,7 @@ Access-Control-Request-Headers: X-PINGOTHER, Content-Type

Строки 14 - 26 выше - это ответ, который сервер отправляет обратно, указывая, что метод запроса (POST) и заголовки запроса (X-PINGOTHER) являются приемлемыми. В частности, давайте посмотрим на строки 17-20:

-
Access-Control-Allow-Origin: http://foo.example
+
Access-Control-Allow-Origin: http://foo.example
 Access-Control-Allow-Methods: POST, GET, OPTIONS
 Access-Control-Allow-Headers: X-PINGOTHER, Content-Type
 Access-Control-Max-Age: 86400
@@ -329,7 +329,7 @@ Access-Control-Max-Age: 86400

В этом примере контент, изначально загруженный из http://foo.example, выполняет простой GET запрос к ресурсу  http://bar.other, который устанавливает файлы cookie. Содержимое на foo.example может содержать такой JavaScript:

-
var invocation = new XMLHttpRequest();
+
var invocation = new XMLHttpRequest();
 var url = 'http://bar.other/resources/credentialed-content/';
 
 function callOtherDomain(){
@@ -347,7 +347,7 @@ function callOtherDomain(){
 
 

Вот пример обмена между клиентом и сервером:

-
GET /resources/access-control-with-credentials/ HTTP/1.1
+
GET /resources/access-control-with-credentials/ HTTP/1.1
 Host: bar.other
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081130 Minefield/3.1b3pre
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
@@ -398,14 +398,14 @@ Content-Type: text/plain
 
 

Возвращаемый ресурс может иметь один заголовок {{HTTPHeader("Access-Control-Allow-Origin")}}, синтаксис которого:

-
Access-Control-Allow-Origin: <origin> | *
+
Access-Control-Allow-Origin: <origin> | *
 

Access-Control-Allow-Origin определяет либо один источник, что указывает браузеру разрешить этому источнику доступ к ресурсу; либо — для запросов без учётных данных — значение "*", которое говорит браузеру разрешить запросы из любых источников.

Например, чтобы разрешить http://mozilla.org доступ к ресурсу, можно указать:

-
Access-Control-Allow-Origin: http://mozilla.org
+
Access-Control-Allow-Origin: http://mozilla.org

Если сервер возвращает название хоста, вместо "*", также может быть указан заголовок Vary со значением Origin, чтобы показать клиентам, что ответы с сервера будут отличаться в зависимости от значения заголовка запроса Origin.

@@ -413,7 +413,7 @@ Content-Type: text/plain

The {{HTTPHeader("Access-Control-Expose-Headers")}} header lets a server whitelist headers that browsers are allowed to access. For example:

-
Access-Control-Expose-Headers: X-My-Custom-Header, X-Another-Custom-Header
+
Access-Control-Expose-Headers: X-My-Custom-Header, X-Another-Custom-Header
 

This allows the X-My-Custom-Header and X-Another-Custom-Header headers to be exposed to the browser.

@@ -422,7 +422,7 @@ Content-Type: text/plain

The  {{HTTPHeader("Access-Control-Max-Age")}} header indicates how long the results of a preflight request can be cached. For an example of a preflight request, see the above examples.

-
Access-Control-Max-Age: <delta-seconds>
+
Access-Control-Max-Age: <delta-seconds>
 

The delta-seconds parameter indicates the number of seconds the results can be cached.

@@ -431,7 +431,7 @@ Content-Type: text/plain

The {{HTTPHeader("Access-Control-Allow-Credentials")}} header Indicates whether or not the response to the request can be exposed when the credentials flag is true.  When used as part of a response to a preflight request, this indicates whether or not the actual request can be made using credentials. Note that simple GET requests are not preflighted, and so if a request is made for a resource with credentials, if this header is not returned with the resource, the response is ignored by the browser and not returned to web content.

-
Access-Control-Allow-Credentials: true
+
Access-Control-Allow-Credentials: true
 

Credentialed requests are discussed above.

@@ -440,7 +440,7 @@ Content-Type: text/plain

The {{HTTPHeader("Access-Control-Allow-Methods")}} header specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request. The conditions under which a request is preflighted are discussed above.

-
Access-Control-Allow-Methods: <method>[, <method>]*
+
Access-Control-Allow-Methods: <method>[, <method>]*
 

An example of a preflight request is given above, including an example which sends this header to the browser.

@@ -449,7 +449,7 @@ Content-Type: text/plain

The {{HTTPHeader("Access-Control-Allow-Headers")}} header is used in response to a preflight request to indicate which HTTP headers can be used when making the actual request.

-
Access-Control-Allow-Headers: <field-name>[, <field-name>]*
+
Access-Control-Allow-Headers: <field-name>[, <field-name>]*
 

The HTTP request headers

@@ -460,7 +460,7 @@ Content-Type: text/plain

The {{HTTPHeader("Origin")}} header indicates the origin of the cross-site access request or preflight request.

-
Origin: <origin>
+
Origin: <origin>
 

The origin is a URI indicating the server from which the request initiated.  It does not include any path information, but only the server name.

@@ -473,7 +473,7 @@ Content-Type: text/plain

The {{HTTPHeader("Access-Control-Request-Method")}} is used when issuing a preflight request to let the server know what HTTP method will be used when the actual request is made.

-
Access-Control-Request-Method: <method>
+
Access-Control-Request-Method: <method>
 

Examples of this usage can be found above.

@@ -482,7 +482,7 @@ Content-Type: text/plain

The {{HTTPHeader("Access-Control-Request-Headers")}} header is used when issuing a preflight request to let the server know what HTTP headers will be used when the actual request is made.

-
Access-Control-Request-Headers: <field-name>[, <field-name>]*
+
Access-Control-Request-Headers: <field-name>[, <field-name>]*
 

Examples of this usage can be found above.

diff --git a/files/ru/web/http/csp/index.html b/files/ru/web/http/csp/index.html index 9141ba8341..174c098790 100644 --- a/files/ru/web/http/csp/index.html +++ b/files/ru/web/http/csp/index.html @@ -38,7 +38,7 @@ translation_of: Web/HTTP/CSP

Вы можете начать настройку {{HTTPHeader("Content-Security-Policy")}} с определения HTTP-заголовка и указания какую политику использовать:

-
Content-Security-Policy: policy
+
Content-Security-Policy: policy

Где policy - это строка, содержащая директивы, описывающие вашу Content Security Policy.

@@ -54,19 +54,19 @@ translation_of: Web/HTTP/CSP

Вы хотите ограничить источники контента только исходным сервером (исключая поддомены)

-
Content-Security-Policy: default-src 'self'
+
Content-Security-Policy: default-src 'self'

Пример 2

Вы хотите разрешить получение контента с доверенного домена и всех его поддоменов (доверенный домен не обязательно должен совпадать с тем, на котором настраиваются CSP.)

-
Content-Security-Policy: default-src 'self' *.trusted.com
+
Content-Security-Policy: default-src 'self' *.trusted.com

Пример 3

Вы хотите разрешить пользователям приложения вставлять в создаваемый ими контент картинки из любого источника, но при этом ограничить источники аудио- и видео-файлов списком доверенных провайдеров. Получение скриптов должно происходить только с конкретного сервера, содержащего доверенный код.

-
Content-Security-Policy: default-src 'self'; img-src *; media-src media1.com media2.com; script-src userscripts.example.com
+
Content-Security-Policy: default-src 'self'; img-src *; media-src media1.com media2.com; script-src userscripts.example.com

При такой настройке, весь контент доступен для получения только с исходного домена, со следующими исключениями:

@@ -80,7 +80,7 @@ translation_of: Web/HTTP/CSP

Вы хотите удостовериться, что весь получаемый контент для онлайн-банкинга идёт по SSL и атакующий не сможет обрабатывать запросы:

-
Content-Security-Policy: default-src https://onlinebanking.jumbobank.com
+
Content-Security-Policy: default-src https://onlinebanking.jumbobank.com

При данной настройке сервер будет позволять загрузку страниц только по HTTPS и только из одного источника - onlinebanking.jumbobank.com.

@@ -88,7 +88,7 @@ translation_of: Web/HTTP/CSP

Для просмотра писем в почтовом клиенте вы хотите разрешить использование HTML внутри письма, а также позволить загрузку изображений из любых источников, но запретить использование любого JavaScript-кода и прочий потенциально опасный контент.

-
Content-Security-Policy: default-src 'self' *.mailsite.com; img-src *
+
Content-Security-Policy: default-src 'self' *.mailsite.com; img-src *

Заметьте, что в настройке политики отсутствует директива {{CSP("script-src")}}; при такой настройке CSP при загрузке скриптов будут использоваться настройки, определяемые директивой {{CSP("default-src")}}, следовательно все скрипты могут быть загружены только с исходного домена.

@@ -98,7 +98,7 @@ translation_of: Web/HTTP/CSP

Для определения вашей политики вы можете использовать заголовок {{HTTPHeader("Content-Security-Policy-Report-Only")}} следующим образом:

-
Content-Security-Policy-Report-Only: policy 
+
Content-Security-Policy-Report-Only: policy 

В случае, если оба заголовка ({{HTTPHeader("Content-Security-Policy-Report-Only")}} и {{HTTPHeader("Content-Security-Policy")}}) были определены одновременно в одном ответе сервера, обе политики будут обработаны. Политики, описанные в заголовке Content-Security-Policy будут применены, в то время как политики, описанные в заголовке Content-Security-Policy-Report-Only, создадут отчёты, но применены не будут.

@@ -106,7 +106,7 @@ translation_of: Web/HTTP/CSP

По умолчанию, отправка отчётов не производится.  Для того чтобы включить отправку отчётов, необходимо в вашей политике определить директиву {{CSP("report-uri")}} и указать как минимум один URI, куда будут направляться отчёты:

-
Content-Security-Policy: default-src 'self'; report-uri http://reportcollector.example.com/collector.cgi
+
Content-Security-Policy: default-src 'self'; report-uri http://reportcollector.example.com/collector.cgi

Кроме того, необходимо настроить свой сервер на получение этих отчётов; вы можете хранить и обрабатывать эти отчёты как считаете нужным.

@@ -143,12 +143,12 @@ translation_of: Web/HTTP/CSP
Возьмём страницу, расположенную по адресу http://example.com/signup.html. Для неё используется следующая политика, запрещающая загрузку всего кроме CSS-файлов с cdn.example.com.
-
Content-Security-Policy: default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports
+
Content-Security-Policy: default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports
HTML-код страницы signup.html выглядит следующим образом:
-
<!DOCTYPE html>
+
<!DOCTYPE html>
 <html>
   <head>
     <title>Sign Up</title>
@@ -161,7 +161,7 @@ translation_of: Web/HTTP/CSP
 
 
Можете заметить ошибку? CSS разрешено загружать только с cdn.example.com, в то время как веб-сайт пытается загрузить его используя основной домен (http://example.com). Браузер поддерживающий CSP отправит отчёт о нарушении политики в POST-запросе к http://example.com/_/csp-reports в момент обращения к странице (signup.html):
-
{
+
{
   "csp-report": {
     "document-uri": "http://example.com/signup.html",
     "referrer": "",
diff --git a/files/ru/web/http/headers/accept-language/index.html b/files/ru/web/http/headers/accept-language/index.html
index 1d2d719976..c1d99c9899 100644
--- a/files/ru/web/http/headers/accept-language/index.html
+++ b/files/ru/web/http/headers/accept-language/index.html
@@ -33,7 +33,7 @@ original_slug: Web/HTTP/Заголовки/Accept-Language
 
 

Синтаксис

-
Accept-Language: <language>
+
Accept-Language: <language>
 Accept-Language: <locale>
 Accept-Language: *
 
@@ -53,7 +53,7 @@ Accept-Language: fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5

Примеры

-
Accept-Language: *
+
Accept-Language: *
 
 Accept-Language: de
 
diff --git a/files/ru/web/http/headers/accept-patch/index.html b/files/ru/web/http/headers/accept-patch/index.html
index 17bc2ae125..a0bde94595 100644
--- a/files/ru/web/http/headers/accept-patch/index.html
+++ b/files/ru/web/http/headers/accept-patch/index.html
@@ -37,7 +37,7 @@ original_slug: Web/HTTP/Заголовки/Accept-Patch
 
 

Синтаксис

-
Accept-Patch: application/example, text/example
+
Accept-Patch: application/example, text/example
 Accept-Patch: text/example;charset=utf-8
 Accept-Patch: application/merge-patch+json
 
@@ -48,7 +48,7 @@ Accept-Patch: application/merge-patch+json

Примеры

-
Accept-Patch: application/example, text/example
+
Accept-Patch: application/example, text/example
 
 Accept-Patch: text/example;charset=utf-8
 
diff --git a/files/ru/web/http/headers/accept-ranges/index.html b/files/ru/web/http/headers/accept-ranges/index.html
index 1fa42401f6..8999e94252 100644
--- a/files/ru/web/http/headers/accept-ranges/index.html
+++ b/files/ru/web/http/headers/accept-ranges/index.html
@@ -29,7 +29,7 @@ original_slug: Web/HTTP/Заголовки/Accept-Ranges
 
 

Синтаксис

-
Accept-Ranges: bytes
+
Accept-Ranges: bytes
 Accept-Ranges: none

Указания

@@ -45,7 +45,7 @@ Accept-Ranges: none

Примеры

-
Accept-Ranges: bytes
+
Accept-Ranges: bytes
 

Спецификации

diff --git a/files/ru/web/http/headers/accept/index.html b/files/ru/web/http/headers/accept/index.html index fe6c26b8a0..9be1f22eeb 100644 --- a/files/ru/web/http/headers/accept/index.html +++ b/files/ru/web/http/headers/accept/index.html @@ -31,7 +31,7 @@ original_slug: Web/HTTP/Заголовки/Accept

Синтаксис

-
Accept: <MIME_type>/<MIME_subtype>
+
Accept: <MIME_type>/<MIME_subtype>
 Accept: <MIME_type>/*
 Accept: */*
 
@@ -53,7 +53,7 @@ Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8

Примеры

-
Accept: text/html
+
Accept: text/html
 
 Accept: image/*
 
diff --git a/files/ru/web/http/headers/access-control-allow-origin/index.html b/files/ru/web/http/headers/access-control-allow-origin/index.html
index a13dd40f06..2ca8fd6ae7 100644
--- a/files/ru/web/http/headers/access-control-allow-origin/index.html
+++ b/files/ru/web/http/headers/access-control-allow-origin/index.html
@@ -23,7 +23,7 @@ original_slug: Web/HTTP/Заголовки/Access-Control-Allow-Origin
 
 

Синтаксис

-
Access-Control-Allow-Origin: *
+
Access-Control-Allow-Origin: *
 Access-Control-Allow-Origin: <origin>
 Access-Control-Allow-Origin: null
 
@@ -45,11 +45,11 @@ Access-Control-Allow-Origin: null

Ответ, который указывает браузеру разрешить доступ к ресурсу из любого источника:

-
Access-Control-Allow-Origin: *
+
Access-Control-Allow-Origin: *

Ответ, который указывает браузеру разрешить доступ к ресурсу только из источника https://developer.mozilla.org:

-
Access-Control-Allow-Origin: https://developer.mozilla.org
+
Access-Control-Allow-Origin: https://developer.mozilla.org

Чтобы ограничить Access-Control-Allow-Origin разрешённым набором значений, необходимо реализовать логику на стороне сервера для проверки значения заголовка {{HTTPHeader("Origin")}} запроса, сравнить его с разрешённым списком источников, а затем, если значение {{HTTPHeader("Origin")}} присутствует в списке, задать значение Access-Control-Allow-Origin, равное значению {{HTTPHeader("Origin")}}.

@@ -57,7 +57,7 @@ Access-Control-Allow-Origin: null

Если сервер послал ответ со значением Access-Control-Allow-Origin, которое содержит явное указание источника (а не шаблонное значение "*"), тогда ответ также должен включать в себя заголовок {{HTTPHeader("Vary")}} со значением Origin — чтобы указать браузеру, что ответы с сервера могут отличаться в зависимости от заголовка запроса Origin.

-
Access-Control-Allow-Origin: https://developer.mozilla.org
+
Access-Control-Allow-Origin: https://developer.mozilla.org
 Vary: Origin

Спецификации

diff --git a/files/ru/web/http/headers/authorization/index.html b/files/ru/web/http/headers/authorization/index.html index 04e65d2079..d8a93de1f6 100644 --- a/files/ru/web/http/headers/authorization/index.html +++ b/files/ru/web/http/headers/authorization/index.html @@ -28,7 +28,7 @@ original_slug: Web/HTTP/Заголовки/Authorization

Синтаксис

-
Authorization: <тип> <данные пользователя>
+
Authorization: <тип> <данные пользователя>

Директивы

@@ -55,7 +55,7 @@ original_slug: Web/HTTP/Заголовки/Authorization

Примеры

-
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
+
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
 

Смотрите также HTTP авторизацию для примеров конфигураций веб-серверов Apache или nginx с защитой вашего сайта паролем с Базовой HTTP авторизацией.

diff --git a/files/ru/web/http/headers/connection/index.html b/files/ru/web/http/headers/connection/index.html index 5bf2f5ad82..935d9c1e98 100644 --- a/files/ru/web/http/headers/connection/index.html +++ b/files/ru/web/http/headers/connection/index.html @@ -34,7 +34,7 @@ original_slug: Web/HTTP/Заголовки/Connection

Синтаксис

-
Connection: keep-alive
+
Connection: keep-alive
 Connection: close
 
diff --git a/files/ru/web/http/headers/content-length/index.html b/files/ru/web/http/headers/content-length/index.html index 0fd6d9ff77..919fc20b0c 100644 --- a/files/ru/web/http/headers/content-length/index.html +++ b/files/ru/web/http/headers/content-length/index.html @@ -30,7 +30,7 @@ original_slug: Web/HTTP/Заголовки/Content-Length

Синтаксис

-
Content-Length: <длина>
+
Content-Length: <длина>
 

Директивы

diff --git a/files/ru/web/http/headers/content-type/index.html b/files/ru/web/http/headers/content-type/index.html index 7096fe0fa1..7c194e6224 100644 --- a/files/ru/web/http/headers/content-type/index.html +++ b/files/ru/web/http/headers/content-type/index.html @@ -31,7 +31,7 @@ original_slug: Web/HTTP/Заголовки/Content-Type

Синтаксис

-
Content-Type: text/html; charset=utf-8
+
Content-Type: text/html; charset=utf-8
 Content-Type: multipart/form-data; boundary=something
 
@@ -52,7 +52,7 @@ Content-Type: multipart/form-data; boundary=something

В {{HTTPMethod("POST")}} запросе, сгенерированном в результате отправки HTML формы, Content-Type запроса определяется в атрибуте enctype тега {{HTMLElement("form")}}.

-
<form action="/" method="post" enctype="multipart/form-data">
+
<form action="/" method="post" enctype="multipart/form-data">
   <input type="text" name="description" value="some text">
   <input type="file" name="myFile">
   <button type="submit">Submit</button>
@@ -61,7 +61,7 @@ Content-Type: multipart/form-data; boundary=something
 
 

Запрос в этом случае может выглядеть так (менее интересные заголовки опущены):

-
POST /foo HTTP/1.1
+
POST /foo HTTP/1.1
 Content-Length: 68137
 Content-Type: multipart/form-data; boundary=---------------------------974767299852498929531610575
 
diff --git a/files/ru/web/http/headers/date/index.html b/files/ru/web/http/headers/date/index.html
index bfd7a52acc..a91717006a 100644
--- a/files/ru/web/http/headers/date/index.html
+++ b/files/ru/web/http/headers/date/index.html
@@ -28,7 +28,7 @@ original_slug: Web/HTTP/Заголовки/Date
 
 

Синтаксис

-
Date: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
+
Date: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
 

Директивы

@@ -56,7 +56,7 @@ original_slug: Web/HTTP/Заголовки/Date

Примеры

-
Date: Wed, 21 Oct 2015 07:28:00 GMT
+
Date: Wed, 21 Oct 2015 07:28:00 GMT
 

Спецификации

diff --git a/files/ru/web/http/headers/expires/index.html b/files/ru/web/http/headers/expires/index.html index 825f586182..9a9756aeb9 100644 --- a/files/ru/web/http/headers/expires/index.html +++ b/files/ru/web/http/headers/expires/index.html @@ -36,7 +36,7 @@ original_slug: Web/HTTP/Заголовки/Expires

Синтаксис

-
Expires: <http-date>
+
Expires: <http-date>
 

Директивы

@@ -50,7 +50,7 @@ original_slug: Web/HTTP/Заголовки/Expires

Примеры

-
Expires: Wed, 21 Oct 2015 07:28:00 GMT
+
Expires: Wed, 21 Oct 2015 07:28:00 GMT

Спецификация

diff --git a/files/ru/web/http/headers/set-cookie/index.html b/files/ru/web/http/headers/set-cookie/index.html index 20e2bee4e4..03fab68b3b 100644 --- a/files/ru/web/http/headers/set-cookie/index.html +++ b/files/ru/web/http/headers/set-cookie/index.html @@ -26,7 +26,7 @@ original_slug: Web/HTTP/Заголовки/Set-Cookie

Синтаксис

-
Set-Cookie: <cookie-name>=<cookie-value>
+
Set-Cookie: <cookie-name>=<cookie-value>
 Set-Cookie: <cookie-name>=<cookie-value>; Expires=<date>
 Set-Cookie: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit>
 Set-Cookie: <cookie-name>=<cookie-value>; Domain=<domain-value>
@@ -120,26 +120,26 @@ Set-Cookie: <cookie-name>=<cookie-value>; Domain=<domain-value>
 
 

Сессионные cookies будут удалены после отключения клиента. В них не указываются директивы Expires или Max-Age. Учитывайте, что часто в браузере включено восстановление сессии.

-
Set-Cookie: sessionid=38afes7a8; HttpOnly; Path=/
+
Set-Cookie: sessionid=38afes7a8; HttpOnly; Path=/

Вместо истечения срока действия, когда клиент закрыт, срок действия постоянных файлов cookie истекает в определённую дату (Expires) или по истечении определённого промежутка времени (Max-Age).

-
Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly
+
Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly
 

Неверные домены

Файл cookie, принадлежащий домену, который не включает исходный сервер, должен быть отклонён пользовательским. Следующий cookie будет отклонён, если он был установлен сервером, размещённым на originalcompany.com.

-
Set-Cookie: qwerty=219ffwef9w0f; Domain=somecompany.co.uk; Path=/; Expires=Wed, 30 Aug 2019 00:00:00 GMT
+
Set-Cookie: qwerty=219ffwef9w0f; Domain=somecompany.co.uk; Path=/; Expires=Wed, 30 Aug 2019 00:00:00 GMT

Cookies names with the prefixes __Secure- and __Host- can be used only if they are set with the secure directive from a secure (HTTPS) origin. In addition, cookies with the __Host- prefix must have a path of "/" (the entire host) and must not have a domain attribute. For clients that don't implement cookie prefixes, you cannot count on having these additional assurances and the cookies will always be accepted.

-
// Both accepted when from a secure origin (HTTPS)
+
// Both accepted when from a secure origin (HTTPS)
 Set-Cookie: __Secure-ID=123; Secure; Domain=example.com
 Set-Cookie: __Host-ID=123; Secure; Path=/
 
diff --git a/files/ru/web/http/headers/strict-transport-security/index.html b/files/ru/web/http/headers/strict-transport-security/index.html
index 4ade62c5dd..35835a88e8 100644
--- a/files/ru/web/http/headers/strict-transport-security/index.html
+++ b/files/ru/web/http/headers/strict-transport-security/index.html
@@ -23,7 +23,7 @@ original_slug: Web/HTTP/Заголовки/Strict-Transport-Security
 
 

Syntax

-
Strict-Transport-Security: max-age=<expire-time>
+
Strict-Transport-Security: max-age=<expire-time>
 Strict-Transport-Security: max-age=<expire-time>; includeSubDomains
 Strict-Transport-Security: max-age=<expire-time>; preload
 
@@ -74,7 +74,7 @@ Strict-Transport-Security: max-age=<expire-time>; preload

Все текущие и будущие субдомены будут HTTPS по max-age на 1 год. Это блокирует доступ к страницам или субдоменам, которые могут быть доступны только по HTTP.

-
Strict-Transport-Security: max-age=31536000; includeSubDomains
+
Strict-Transport-Security: max-age=31536000; includeSubDomains

Specifications

diff --git a/files/ru/web/http/methods/connect/index.html b/files/ru/web/http/methods/connect/index.html index 65ab7c1889..c38ecb940d 100644 --- a/files/ru/web/http/methods/connect/index.html +++ b/files/ru/web/http/methods/connect/index.html @@ -42,14 +42,14 @@ translation_of: Web/HTTP/Methods/CONNECT

Синтаксис

-
CONNECT www.example.com:443 HTTP/1.1
+
CONNECT www.example.com:443 HTTP/1.1
 

Пример

Некоторые прокси сервера могут запросить авторизацию для создания туннеля. Смотрите также {{HTTPHeader("Proxy-Authorization")}}.

-
CONNECT server.example.com:80 HTTP/1.1
+
CONNECT server.example.com:80 HTTP/1.1
 Host: server.example.com:80
 Proxy-Authorization: basic aGVsbG86d29ybGQ=
diff --git a/files/ru/web/http/methods/patch/index.html b/files/ru/web/http/methods/patch/index.html index 06700f5653..9cd49d35d4 100644 --- a/files/ru/web/http/methods/patch/index.html +++ b/files/ru/web/http/methods/patch/index.html @@ -53,14 +53,14 @@ translation_of: Web/HTTP/Methods/PATCH

Синтаксис

-
PATCH /file.txt HTTP/1.1
+
PATCH /file.txt HTTP/1.1
 

Пример

Запрос

-
PATCH /file.txt HTTP/1.1
+
PATCH /file.txt HTTP/1.1
 Host: www.example.com
 Content-Type: application/example
 If-Match: "e0023aa4e"
@@ -72,7 +72,7 @@ Content-Length: 100
 
 

Успешный ответ указывается с помощью кода ответа {{HTTPStatus("204")}}, поскольку ответ в примере не содержит тела сообщения. А если бы содержал, то код был бы {{HTTPStatus("200")}}.

-
HTTP/1.1 204 No Content
+
HTTP/1.1 204 No Content
 Content-Location: /file.txt
 ETag: "e0023aa4f"
diff --git a/files/ru/web/http/overview/index.html b/files/ru/web/http/overview/index.html index 8b35300ebd..53d83362ab 100644 --- a/files/ru/web/http/overview/index.html +++ b/files/ru/web/http/overview/index.html @@ -106,12 +106,12 @@ translation_of: Web/HTTP/Overview
  1. Открытие TCP соединения: TCP-соединение будет использоваться для отправки запроса (или запросов) и получения ответа. Клиент может открыть новое соединение, переиспользовать существующее или открыть несколько TCP-соединений к серверу.
  2. Отправка HTTP-сообщения: HTTP-сообщения (до HTTP/2) являются человекочитаемыми. Начиная с HTTP/2, простые сообщения инкапсулируются во фреймы, делая невозможным их чтение напрямую, но принципиально остаются такими же. -
    GET / HTTP/1.1
    +  
    GET / HTTP/1.1
     Host: developer.mozilla.org
     Accept-Language: fr
  3. Читает ответ от сервера: -
    HTTP/1.1 200 OK
    +  
    HTTP/1.1 200 OK
     Date: Sat, 09 Oct 2010 14:28:02 GMT
     Server: Apache
     Last-Modified: Tue, 01 Dec 2009 20:18:22 GMT
    diff --git a/files/ru/web/http/status/301/index.html b/files/ru/web/http/status/301/index.html
    index b96ed33889..c49682e9a8 100644
    --- a/files/ru/web/http/status/301/index.html
    +++ b/files/ru/web/http/status/301/index.html
    @@ -15,18 +15,18 @@ translation_of: Web/HTTP/Status/301
     
     

    Статус

    -
    301 Moved Permanently
    +
    301 Moved Permanently

    Пример

    Запрос клиента

    -
    GET /index.php HTTP/1.1
    +
    GET /index.php HTTP/1.1
     Host: www.example.org

    Ответ сервера

    -
    HTTP/1.1 301 Moved Permanently
    +
    HTTP/1.1 301 Moved Permanently
     Location: http://www.example.org/index.asp

    Характеристики

    diff --git a/files/ru/web/http/status/307/index.html b/files/ru/web/http/status/307/index.html index 9e42dd15ea..cf1233a97a 100644 --- a/files/ru/web/http/status/307/index.html +++ b/files/ru/web/http/status/307/index.html @@ -17,20 +17,20 @@ translation_of: Web/HTTP/Status/307

    Статус

    -
    307 Temporary Redirect
    +
    307 Temporary Redirect
     

    Пример

    Запрос клиента

    -
    DELETE /cars/oldest HTTP/1.1
    +
    DELETE /cars/oldest HTTP/1.1
     Host: www.example.org
     

    Ответ сервера

    -
    HTTP/1.1 307 Temporary Redirect
    +
    HTTP/1.1 307 Temporary Redirect
     Location: http://www.example.org/cars/id/123456
     
    diff --git a/files/ru/web/http/status/400/index.html b/files/ru/web/http/status/400/index.html index 14939c0e29..96c5de6e73 100644 --- a/files/ru/web/http/status/400/index.html +++ b/files/ru/web/http/status/400/index.html @@ -9,7 +9,7 @@ translation_of: Web/HTTP/Status/400

    Статус

    -
    400 Bad Request 
    +
    400 Bad Request 

    Характеристики

    diff --git a/files/ru/web/http/status/401/index.html b/files/ru/web/http/status/401/index.html index e9312bc330..cd194a7fbf 100644 --- a/files/ru/web/http/status/401/index.html +++ b/files/ru/web/http/status/401/index.html @@ -13,11 +13,11 @@ translation_of: Web/HTTP/Status/401

    Статус

    -
    401 Unauthorized
    +
    401 Unauthorized

    Пример ответа

    -
    HTTP/1.1 401 Unauthorized
    +
    HTTP/1.1 401 Unauthorized
     Date: Wed, 21 Oct 2015 07:28:00 GMT
     WWW-Authenticate: Basic realm="Access to staging site"
    diff --git a/files/ru/web/http/status/403/index.html b/files/ru/web/http/status/403/index.html index a1972dac7a..d3b66c5d52 100644 --- a/files/ru/web/http/status/403/index.html +++ b/files/ru/web/http/status/403/index.html @@ -11,11 +11,11 @@ translation_of: Web/HTTP/Status/403

    Статус

    -
    403 Forbidden
    +
    403 Forbidden

    Пример ответа

    -
    HTTP/1.1 403 Forbidden
    +
    HTTP/1.1 403 Forbidden
     Date: Wed, 21 Oct 2015 07:28:00 GMT
     
    diff --git a/files/ru/web/http/status/404/index.html b/files/ru/web/http/status/404/index.html index 874c7c8284..206157642d 100644 --- a/files/ru/web/http/status/404/index.html +++ b/files/ru/web/http/status/404/index.html @@ -11,13 +11,13 @@ translation_of: Web/HTTP/Status/404

    Статус

    -
    404 Not Found
    +
    404 Not Found

    Пользовательские страницы ошибок

    Многие веб-сайты настраивают внешний вид страницы 404, чтобы быть более полезными для пользователя и давать рекомендации. Серверы Apache могут быть настроены с использованием файла .htaccess и фрагмента кода, например, такого, как этот.

    -
    ErrorDocument 404 /notfound.html
    +
    ErrorDocument 404 /notfound.html

    Вы можете взять MDN's 404 page в качестве вдохновения.

    diff --git a/files/ru/web/http/status/405/index.html b/files/ru/web/http/status/405/index.html index 8259e60b6d..07abd56576 100644 --- a/files/ru/web/http/status/405/index.html +++ b/files/ru/web/http/status/405/index.html @@ -11,7 +11,7 @@ translation_of: Web/HTTP/Status/405

    Статус

    -
    405 Method Not Allowed
    +
    405 Method Not Allowed

    Спецификации

    diff --git a/files/ru/web/http/status/408/index.html b/files/ru/web/http/status/408/index.html index d7950cd91c..064ac1c8df 100644 --- a/files/ru/web/http/status/408/index.html +++ b/files/ru/web/http/status/408/index.html @@ -13,7 +13,7 @@ translation_of: Web/HTTP/Status/408

    Статус

    -
    408 Request Timeout
    +
    408 Request Timeout

    Спецификации

    diff --git a/files/ru/web/http/status/425/index.html b/files/ru/web/http/status/425/index.html index 6489e40b2b..3143b562b2 100644 --- a/files/ru/web/http/status/425/index.html +++ b/files/ru/web/http/status/425/index.html @@ -14,7 +14,7 @@ translation_of: Web/HTTP/Status/425

    Статус

    -
    425 Too Early
    +
    425 Too Early

    Спецификации

    diff --git a/files/ru/web/http/status/429/index.html b/files/ru/web/http/status/429/index.html index 33984a0b41..82b02e0e60 100644 --- a/files/ru/web/http/status/429/index.html +++ b/files/ru/web/http/status/429/index.html @@ -11,11 +11,11 @@ translation_of: Web/HTTP/Status/429

    Статус

    -
    429 Too Many Requests
    +
    429 Too Many Requests

    Пример

    -
    HTTP/1.1 429 Too Many Requests
    +
    HTTP/1.1 429 Too Many Requests
     Content-Type: text/html
     Retry-After: 3600
    diff --git a/files/ru/web/http/status/500/index.html b/files/ru/web/http/status/500/index.html index a722882efc..f676e573e0 100644 --- a/files/ru/web/http/status/500/index.html +++ b/files/ru/web/http/status/500/index.html @@ -15,7 +15,7 @@ translation_of: Web/HTTP/Status/500

    Статус

    -
    500 Internal Server Error (Внутренняя ошибка сервера)
    +
    500 Internal Server Error (Внутренняя ошибка сервера)

    Спецификации

    diff --git a/files/ru/web/http/status/502/index.html b/files/ru/web/http/status/502/index.html index ad3d25909f..4984b27142 100644 --- a/files/ru/web/http/status/502/index.html +++ b/files/ru/web/http/status/502/index.html @@ -16,7 +16,7 @@ translation_of: Web/HTTP/Status/502

    Статус

    -
    502 Bad Gateway
    +
    502 Bad Gateway

    Спецификации

    diff --git a/files/ru/web/http/status/503/index.html b/files/ru/web/http/status/503/index.html index c8a6882b34..4f70ede335 100644 --- a/files/ru/web/http/status/503/index.html +++ b/files/ru/web/http/status/503/index.html @@ -13,7 +13,7 @@ translation_of: Web/HTTP/Status/503

    Статус

    -
    503 Service Unavailable
    +
    503 Service Unavailable

    Спецификации

    -- cgit v1.2.3-54-g00ecf