refactor(httpheader): extract header parsing into dedicated package
Docker Build and Push / build-and-push-tags (push) Has been skipped
Docker Build and Push / build-and-push-branches (push) Successful in 11m19s

Moved HTTP header parsing and building logic from server package to internal/httpheader
This commit is contained in:
2026-01-20 21:15:34 +07:00
parent e3ead4d52f
commit 9a4539cc02
7 changed files with 141 additions and 125 deletions
+30
View File
@@ -0,0 +1,30 @@
package httpheader
type ResponseHeader interface {
Value(key string) string
Set(key string, value string)
Remove(key string)
Finalize() []byte
}
type responseHeader struct {
startLine []byte
headers map[string]string
}
type RequestHeader interface {
Value(key string) string
Set(key string, value string)
Remove(key string)
Finalize() []byte
GetMethod() string
GetPath() string
GetVersion() string
}
type requestHeader struct {
method string
path string
version string
startLine []byte
headers map[string]string
}