You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor httpResponseHeaders to use Headers class from relic package #4102
The httpResponseHeaders should use the Headers class from the relic package instead of the current Map implementation for better type safety and API consistency.
Affected Files
packages/serverpod/lib/src/server/server.dart:180
Context
// TODO: Make httpResponseHeaders a Headers object from the get-go.// or better yet, use middlewarefinal headers =Headers.build((mh) {
for (var rh in httpResponseHeaders.entries) {
mh[rh.key] = ['${rh.value}'];
}
});
Suggested Implementation
Change httpResponseHeaders from Map<String, String> to use the Headers class from the relic package directly
Refactor code to use the Headers type throughout the codebase
Update related APIs to work with the new type
Consider using middleware as suggested in the comment
Ensure backward compatibility or provide migration guide
Add tests for header manipulation
Impact
Type safety, API consistency, better developer experience
Activity
feat: Update all TODOs to reference newly created GitHub issues
feat: Update all TODOs to reference newly created GitHub issues