Бляди тоже ок, ага. Войти !bnw Сегодня Клубы
посоны, поясните по хардкору, когда серверу приходит Content-Encoding, который ему не нравится, то как сервер может сказать какие Encoding ему нравятся? Я джва раза уже rfc7231 перечитал. По идее можно выставить заголовок Accept-Encoding, но вот только везде написано, что это заголовок запроса, а не ответ
#3JMI52 / @hirthwork / 3504 дня назад

>это заголовок запроса, а не ответ Да. >как сервер может сказать какие Encoding ему нравятся? в бади.
#3JMI52/35D / @muromec / 3504 дня назад
палю: 10.4.7 406 Not Acceptable The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request. Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed automatically. However, this specification does not define any standard for such automatic selection. Note: HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept headers sent in the request. In some cases, this may even be preferable to sending a 406 response. User agents are encouraged to inspect the headers of an incoming response to determine if it is acceptable. If the response could be unacceptable, a user agent SHOULD temporarily stop receipt of more data and query the user for a decision on further actions.
#3JMI52/GK7 / @anonymous / 3504 дня назад
@anonymous // это из 2616 но в 7231 та же хуйня, ну ты понел
#3JMI52/Y52 / @anonymous --> #3JMI52/GK7 / 3504 дня назад
@anonymous тут так и не указано в каком виде отдавать поддерживаемык сжатия. алсо, рфс явно пишет, что при неподдерживаемом Content-Encoding нужно отдавать 415 Unsupported Media Type
#3JMI52/JDG / @hirthwork --> #3JMI52/Y52 / 3504 дня назад
@hirthwork В http://tools.ietf.org/html/rfc7231#section-5.3 всё описано. AFAIU кейс -- клиент запрашивает какую-то информацию, в этом случае 406. 415 -- когда post/put делается с кривым content-type/etc, в этом случае #3JMI52/35D
#3JMI52/GZQ / @anonymous --> #3JMI52/JDG / 3504 дня назад
@muromec формат бади сложно специфицировать. проще было разрешить Acceptы в реплаях указывать, но почему-то этого не сделали
#3JMI52/RS5 / @hirthwork --> #3JMI52/35D / 3504 дня назад
@anonymous если у тебя указан Content-Encoding, то это автоматически означает, что у тебя POST/PUT (или OPTIONS)
#3JMI52/QPA / @hirthwork --> #3JMI52/GZQ / 3504 дня назад
ipv6 ready BnW для ведрофона BnW на Реформале Викивач Котятки

Цоперайт © 2010-2016 @stiletto.