Repository navigation
Conversation
This branch has not been deployed
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.
Fixes #242.
HTML responses with a closing
</head>beyond the first response chunk currently receive no reload script. Keep searching later chunks, retaining at most six trailing bytes so a case-insensitive closing tag split across chunks is recognized. Stop after the first injection; preserve the existing complete-first-chunk path and non-HTML behavior.For a streaming HTML response whose closing tag is not yet known, remove Content-Length before headers are sent and let Tornado select framing. This avoids the Content-Length overflow described in the Issue without buffering the entire page. If no closing tag appears, all original bytes are emitted.
Validation:
python -m pytest -qpasses 17 tests and 8 subtests.python -m unittest discover -vpasses 17 tests.git diff --checkpasses.Not run locally: Python 3.7/3.8, Linux, Windows, or the Makefile's legacy nosetests command. The repository currently has a tag publishing workflow but no PR test workflow; these results are local validation.