小编tse*_*van的帖子

maxTotalHeaderLength 是否按预期工作?

Warp 有一个settingsMaxTotalHeaderLength默认为 50*1024的字段:https : //hackage.haskell.org/package/warp-3.3.10/docs/src/Network.Wai.Handler.Warp.Settings.html#defaultSettings

我想这意味着 50KB?但是,当我尝试发送一个 ~33KB 的标头时,服务器会抛出错误的请求:

curl -v -w '%{size_request} %{size_upload}' -H @temp.log localhost:8080/v1/version
Run Code Online (Sandbox Code Playgroud)

结果:

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /v1/version HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.58.0
> Accept: */*
> myheader2: <big header snipped>
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad Request
< Date: Wed, 22 Jul 2020 13:15:19 GMT
< Server: Warp/3.3.10
< Content-Type: text/plain; …
Run Code Online (Sandbox Code Playgroud)

haskell yesod haskell-warp

6
推荐指数
1
解决办法
79
查看次数

标签 统计

haskell ×1

haskell-warp ×1

yesod ×1