Skip to content

Commit 288cbbe

Browse files
authored
remove unnecessary interpolation (apache#578)
1 parent 41e4f46 commit 288cbbe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpHeader.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ object HttpHeader {
103103
case e: ParseError => parser.parseError(e)
104104
case e => parser.failure(e)
105105
}).info
106-
ParsingResult.Error(info.withSummaryPrepended(s"Illegal HTTP header value"))
106+
ParsingResult.Error(info.withSummaryPrepended("Illegal HTTP header value"))
107107
}
108-
} else ParsingResult.Error(ErrorInfo(s"Illegal HTTP header name", name))
108+
} else ParsingResult.Error(ErrorInfo("Illegal HTTP header name", name))
109109

110110
/** INTERNAL API */
111111
@InternalApi

http-core/src/test/scala/org/apache/pekko/http/impl/model/parser/HttpHeaderSpec.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ class HttpHeaderSpec extends AnyFreeSpec with Matchers {
877877
ErrorInfo("Illegal HTTP header 'User-Agent': Illegal header value", "Header comment nested too deeply")
878878
}
879879

880-
"should not broken when header-value is null" in {
880+
"not break when header-value is null" in {
881881
val errors = parse("Content-Disposition", null).errors
882882
errors should have size 1
883883
errors.head shouldBe an[ErrorInfo]

0 commit comments

Comments
 (0)