使用围攻时,为什么接受编码请求标头不起作用?

时间:2019-08-13 13:49:22

标签: siege

有一个Api,如果不压缩,则为24196 bytes

$ curl 'http://172.31.100.190/v2/series/5190001' > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 24196  100 24196    0     0  31593      0 --:--:-- --:--:-- --:--:-- 31587  

但如果对其进行压缩,则仅3717个字节

$ curl 'http://172.31.100.190/v2/series/5190001' -H 'accept-encoding: gzip' > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3717    0  3717    0     0   5203      0 --:--:-- --:--:-- --:--:--  5205

现在,我想使用siege对其进行基准测试,但是为什么accept-encoding仍无法唤醒,它仍然是24196字节

$ siege -r1 -c1 -b 'http://172.31.100.190/v2/series/5190001' -H 'accept-encoding: gzip'
** SIEGE 4.0.2
** Preparing 1 concurrent users for battle.
The server is now under siege...
HTTP/1.1 200     0.85 secs:   24196 bytes ==> GET  /v2/series/5190001

0 个答案:

没有答案