【问题标题】:apache bench keep alive got 0 document lengthapache bench keep alive得到0文档长度
【发布时间】:2016-06-09 03:28:07
【问题描述】:

我使用了以下命令: ab -k -n 1 -c 1 -v 5 $URL 并得到:

LOG: header received:
Blockquote

HTTP/1.1 200 OK

content-length: 228

content-type: application/octet-stream
date: Fri, 26 Feb 2016 03:09:27 GMT
expires: Fri, 26 Feb 2016 03:10:27 GMT
cache-control: private, max-age=60
last-modified: Thu, 18 Feb 2016 07:02:46 GMT
connection: keep-alive`


LOG: Response code = 200
..done

...

Document Length:        0 bytes

Concurrency Level:      1
Time taken for tests:   0.019 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Keep-Alive requests:    1
Total transferred:      263 bytes
HTML transferred:       0 bytes
Requests per second:    52.44 [#/sec] (mean)
Time per request:       19.068 [ms] (mean)
Time per request:       19.068 [ms] (mean, across all concurrent requests)
Transfer rate:          13.47 [Kbytes/sec] received

ab 收到标头:content-length: 228,但 Document Length 是 0 字节。 curl $URL 工作正常并获得 228 个字节。 那么它有什么问题呢?谢谢!

【问题讨论】:

    标签: http curl keep-alive apachebench


    【解决方案1】:

    原来是一个 ApacheBench 错误,它不接受小写的内容长度标头。

    【讨论】:

      猜你喜欢
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      • 2013-05-24
      • 2018-06-08
      • 2023-03-07
      • 2021-07-20
      • 2012-08-12
      相关资源
      最近更新 更多