这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mtiller
Copy link
Contributor

@mtiller mtiller commented Jan 10, 2023

This seems to address issue #88. As the standard library docs suggested, the problem is related to wrapping ResponseWriter instances. I went through and implemented a Flush method for the statusRecorder and huma.Context types. I tested this with a resource handler that was generated server side events (i.e., called ctx.Write(...) multiple times invoking .Flush() after each). Running curl -N ... showed that the output was, in fact, getting flushed (which was definitely not the case before these changes).

I haven't tested this with an SSE client, but just running curl -N seems like an adequate test of the functionality for now.

@mt35-rs mt35-rs mentioned this pull request Jan 10, 2023
@danielgtaylor danielgtaylor merged commit f64e616 into danielgtaylor:main Jan 13, 2023
@deo986
Copy link
Collaborator

deo986 commented Jan 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants