gpt4 book ai didi

http - apachebench(ab) 为发布数据追加新行

转载 作者:可可西里 更新时间:2023-11-01 16:22:00 25 4
gpt4 key购买 nike

尝试使用 ab 对 post 请求进行基准测试,但查看文件中的 post 数据将附加一个新的空行。这个问题有什么解决方案吗?

$ cat d1
a=1&&b=2

ab命令是

ab -c 1 -n 1 -T application/x-www-form-urlencoded -p d1 -v 2 url

查看post数据,发现

'b': '2\n'

最佳答案

我在使用 Vim 粘贴文本时遇到了同样的问题。事实证明,默认情况下,Vim 会在文件中添加一个新行。参见 Why would Vim add a new line at the end of a file?供引用。

通过在 Sublime 中打开文件并删除新行来修复此问题。

关于http - apachebench(ab) 为发布数据追加新行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16556844/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com