Commit graph

12 commits

Author SHA1 Message Date
wjqserver
121679b44e fix: preserve IPv6 brackets in redirects
Re-wrap bare IPv6 hosts after stripping ports so HTTPS redirect URLs stay valid. Add a regression test covering bracketed IPv6 hosts in redirect responses.
2026-04-07 20:31:10 +08:00
wjqserver
9e57f5a5f5 fix: stop redirect siblings on shutdown
Make the non-graceful HTTPS redirect path shut down all sibling servers after any server returns, so cleanup stays consistent with the graceful path and partial shutdowns do not leave the redirect listener running.
2026-04-07 20:00:58 +08:00
wjqserver
e2cf08d5dd feat: add redirect host selection options
Support explicit redirect host source selection for HTTP-to-HTTPS redirects with ordered header lookup, fixed host mode, and strict validation. Document the new redirect option relationships and add focused tests for 426 fallback, conflict checks, and non-graceful startup errors.
2026-04-07 19:49:13 +08:00
wjqserver
e4d3eed379 feat: redesign server startup around Run options
Replace the old RunShutdown and RunTLS style entry points with a single Run(opts...) API for v1. Add focused startup semantics tests, keep TLS and graceful shutdown independent, ensure sibling servers are cleaned up on startup failure, and update docs to match the new option-based startup model.
2026-04-07 17:44:55 +08:00
wjqserver
d12e887858 fix: keep RunShutdown on HTTP path 2026-04-07 07:46:06 +08:00
WJQSERVER
a98fb27058 fix: correctly propagate custom Protocols to http.Server
- Implemented \`applyDefaultServerConfig\` in \`Engine\` to apply \`serverProtocols\` to \`http.Server\`.
- Uncommented all calls to \`applyDefaultServerConfig\` in \`serve.go\`.
- Refactored \`SetProtocols\` and added internal \`setProtocols\` to ensure user-defined protocols are not overwritten by framework defaults in \`RunTLS\`.
- Added exhaustive tests in \`protocols_test.go\` to verify protocol inheritance and persistence.
2026-03-27 17:27:22 +00:00
WJQSERVER
2e55db4e2d docs: add comprehensive documentation and fix SSE graceful shutdown
- Created a detailed \`docs\` directory with Chinese documentation for all major features.
- Implemented \`BaseContext\` propagation in \`Engine\` to allow long-lived connections (like SSE) to receive shutdown signals.
- Added \`Engine.Context()\` to provide access to the shutdown context.
- Updated \`docs/sse.md\` with a guide on handling graceful shutdowns.
- Cleaned up temporary build/update scripts.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-02-18 15:52:42 +00:00
wjqserver
3cd8ef84a2 add RunShutdownWithContext 2025-07-31 20:18:24 +08:00
google-labs-jules[bot]
504089b748 feat: add MPL 2.0 license headers to all go files 2025-07-24 08:07:38 +00:00
wjqserver
803a6747f6 update serve && add custom srv configure 2025-06-12 09:40:46 +08:00
wjqserver
899d3ff48b add logreco 2025-06-04 20:44:23 +08:00
wjqserver
484f2f016b init(v0.0.1) 2025-05-28 18:25:28 +08:00