Open mbolli opened 5 months ago
Dorry did not see this earlier. I need to read the spec a bit and think about this. Probably could split the data to multiple Server-Timing
headers.
Some additional information: I think (I did not verify this) HPACK also reduces the bytes needed for the response, when multiple header fields are used.
I got a really indescriptive error message in my logs:
After some debugging I found that the
Server-Timing
header was way too large, due to having too many timing entries.On most apache configurations, the
LimitRequestFieldSize
variable is around 8 KB, although I don't know of a way to read it in PHP.My proposal here is to introduce a configurable option of e.g.
maxHeaderSize
. This rule would be best enforced in front of this line probably: https://github.com/tuupola/server-timing-middleware/blob/411b5a606b95cc95fec222cb2ae22d2ae4690885/src/ServerTimingMiddleware.php#L139