Skip to content

Conversation

@etr
Copy link
Owner

@etr etr commented Jan 28, 2026

Summary

  • Fix the deferred_response constructor's content parameter which was documented to send initial content before callback data, but was never actually used
  • The content is now stored and sent first before calling the user's callback

Changes

  • Store content in initial_content member instead of passing to base class string_response
  • Track content_offset for proper chunking when content exceeds buffer size
  • Send initial content bytes before invoking user's cycle_callback
  • Update existing test expectations to include the initial content
  • Add new test for backward compatibility with empty content parameter

Test plan

  • Existing tests updated and passing (make check)
  • New empty-content backward compatibility test added and passing
  • All 12 tests pass

The deferred_response constructor accepts a content parameter that was
documented to send initial content before callback data, but was never
actually used. This fix stores the content and sends it first before
calling the user's callback.

Changes:
- Store content in initial_content member instead of passing to base class
- Track content_offset for proper chunking of large content
- Send initial content bytes before invoking user's cycle_callback
- Add test for backward compatibility with empty content parameter
@etr etr merged commit 54c800e into master Jan 28, 2026
38 checks passed
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.

2 participants