akka / akka/akka-http

Timeout-Access header always contains incorrect value "<function1>"

Open
#64 9 comments 0 reactions 0 assignees View on GitHub
1 - triaged help wanted nice-to-have (low-prio)
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.