Timeout-Access header always contains incorrect value "<function1>"
- Dominant language
- Scala
- Stars
- 1.4k
- Forks
- 584
- Avg merge
- 14h 33m
- Merged PRs (30d)
- 24
Description
**Issue by [nartamonov](https://github.com/nartamonov)**
_Tuesday Mar 22, 2016 at 16:00 GMT_
_Originally opened as https://github.com/akka/akka/issues/20120_
---
Following path returns response "Timeout-Access = ":
``` scala
path("test") {
get {
optionalHeaderValueByName("Timeout-Access") { timeout =>
complete(s"Timeout-Access = ${timeout.get}")
}
}
}
```
It's because [`TimeoutAccessImpl`](https://github.com/akka/akka/blob/master/akka-http-core/src/main/scala/akka/http/impl/engine/server/HttpServerBluePrint.scala#L309) does not override `toString` which inherited by default from `scala.Function1`.
Contributor guide
Research direction
Start in akka-http-core/src/main/scala/akka/http/impl/engine/server/HttpServerBluePrint.scala around TimeoutAccessImpl and reproduce the optionalHeaderValueByName example from the issue. Verify that the Timeout-Access response no longer renders as and add or update a focused regression test if the surrounding test location is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100