Merged
Conversation
ZackarySantana
commented
Sep 17, 2025
| log.Debug("No content encoding header found") | ||
| default: | ||
| h.log.Warn(unsupportedContentEncoding, slog.String("encoding", r.Header.Get("Content-Encoding"))) | ||
| log.Warn(unsupportedContentEncoding, slog.String("encoding", r.Header.Get("Content-Encoding"))) |
Contributor
Author
There was a problem hiding this comment.
This log line using the unwrapped logger seemed unintentional to me, so I changed it to use the wrapped one
Owner
There was a problem hiding this comment.
Correct! The log is updated on line 134 to add context to all log entries.
1f23182 to
407b960
Compare
Contributor
Author
|
I rebased on main to fix a failing test |
Owner
|
Sorry about the delay, got a bit of a backlog. I will get to this soon, and it sounds like a useful update! |
a-h
approved these changes
Dec 31, 2025
| log.Debug("No content encoding header found") | ||
| default: | ||
| h.log.Warn(unsupportedContentEncoding, slog.String("encoding", r.Header.Get("Content-Encoding"))) | ||
| log.Warn(unsupportedContentEncoding, slog.String("encoding", r.Header.Get("Content-Encoding"))) |
Owner
There was a problem hiding this comment.
Correct! The log is updated on line 134 to add context to all log entries.
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.
Description
When using streaming (e.g. the suspense example) and the proxy option from
templ generate, streamed in pages will not properly update. This is because they are loaded into memory completely then proxied.This pr adds some flushing, by sending over tokens as it reads them.
Screenshots
Before:
https://github.com/user-attachments/assets/9f15dc67-82ae-4fa6-8730-2688ee8fa07a
After:
https://github.com/user-attachments/assets/de6f51f3-04da-454d-be41-c636c64b53ca