diff --git a/context/problem.go b/context/problem.go index 25b61a00..a3c5369f 100644 --- a/context/problem.go +++ b/context/problem.go @@ -275,5 +275,7 @@ func (o *ProblemOptions) Apply(ctx Context) { retryAfterHeaderValue = o.parseRetryAfter(o.RetryAfter, timeLayout) } - ctx.Header("Retry-After", retryAfterHeaderValue) + if retryAfterHeaderValue != "" { + ctx.Header("Retry-After", retryAfterHeaderValue) + } }