Fixed streaming: removed Connection and Keep-Alive headers#700
Merged
AlexxIT merged 3 commits intoAlexxIT:masterfrom Sep 19, 2025
Merged
Fixed streaming: removed Connection and Keep-Alive headers#700AlexxIT merged 3 commits intoAlexxIT:masterfrom
Connection and Keep-Alive headers#700AlexxIT merged 3 commits intoAlexxIT:masterfrom
Conversation
AlexxIT
reviewed
Sep 18, 2025
AlexxIT
reviewed
Sep 18, 2025
Owner
|
Спасибо! Хорошая идея. Добавил пару замечаний к коду. |
Contributor
Author
|
Второй день тестирую, пока ни одного зависания воспроизведения на хромкаст устройствах. Можно дополнительно попросить потестировать в issue #637. |
AlexxIT
reviewed
Sep 18, 2025
| response.headers["Access-Control-Allow-Headers"] = "*" | ||
| response.headers["Access-Control-Allow-Origin"] = "*" | ||
|
|
||
| response.force_close() |
Contributor
Author
There was a problem hiding this comment.
Отключает Keep-Alive и в заголовках клиенту передается Connection: close
AlexxIT
approved these changes
Sep 19, 2025
Owner
|
Спасибо. Я оставил ваши идеи, но многое переписал. |
Contributor
Author
|
|
Owner
|
Я думал про них. Но запросить одинокую ссылку невозможно, там jwt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Исправляет #637
Пояснение: мы не должны прозрачно проксировать заголовки
ConnectionиKeep-Alive, т.к. они должны соответствовать соответствующим параметрам сервера.response.force_close()используется намеренно, дабы клиенты не ждали новых данных, если произошел выход из цикла чтения раньше, чем запрошенные данные были прочитаны:P.S. Т.к. добавил фильтрацию, то вырезал некоторые служебные заголовки яндекса, пользы от них нет.