Merge 051e9100ac85526d329dc049c2891d61921c6d20 into ef68fa032c0e6ce637db56e89ec734c0de0a9f5e

This commit is contained in:
Needrima 2025-05-15 09:14:11 +02:00 committed by GitHub
commit 7dd4c2cb94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -982,7 +982,7 @@ func (c *Context) Status(code int) {
// Header is an intelligent shortcut for c.Writer.Header().Set(key, value). // Header is an intelligent shortcut for c.Writer.Header().Set(key, value).
// It writes a header in the response. // It writes a header in the response.
// If value == "", this method removes the header `c.Writer.Header().Del(key)` // If value == "", this method removes the header `c.Writer.Header().Del(key)`
func (c *Context) Header(key, value string) { func (c *Context) SetHeader(key, value string) {
if value == "" { if value == "" {
c.Writer.Header().Del(key) c.Writer.Header().Del(key)
return return