gpt4 book ai didi

ssl - 切换到 SSL 时,JMeter 停止发送 JSESSIONID cookie

转载 作者:太空宇宙 更新时间:2023-11-03 12:46:50 24 4
gpt4 key购买 nike

我有一个在 http 下运行良好的测试计划,并且 Cookie 管理器正确地保持了我的 session 。当切换到 SSL 时,它还能够与同一台服务器通信,甚至认为一切正常,因为它收到 200 响应以及我们关于未登录的自定义消息。

要重现该行为,我需要做的就是从 http 切换到 https。测试仍然能够与服务器对话,但我可以在“View Results in Table”日志中看到,cookie 在 http 下有一个 JSESSIONID,而在 https 下是空的。并且 ssl 下的每个请求都使用 JSESSIONID 的 Set-Cookie 来回答。

最佳答案

有趣的场景。 Jmeter 日志文件是否提供任何线索?

会不会是 Jmeter 需要证书副本才能正确存储 SSL cookie?控制台会显示握手问题,可以通过将证书添加到 keystore 来解决: http://www.java-samples.com/showtutorial.php?tutorialid=210

您可以通过将 cookie 值写入变量并记录其值来做一些进一步的调试:

Received Cookies can be stored as JMeter thread variables (versions of JMeter after 2.3.2 no longer do this by default). To save cookies as variables, define the property "CookieManager.save.cookies=true". Also, cookies names are prefixed with "COOKIE_" before they are stored (this avoids accidental corruption of local variables) To revert to the original behaviour, define the property "CookieManager.name.prefix= " (one or more spaces). If enabled, the value of a cookie with the name TEST can be referred to as ${COOKIE_TEST}.

来源:http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Cookie_Manager

编辑:有人问我的具体问题是如何解决的。结果证明与 ssl 没有任何关系,但其他不相关的 header 在格式上发生了非常轻微的变化,因此我们用来匹配它们的正则表达式开始失败。所以我会从查看您的 header 开始,并比较您发布 http 和 https 之间的区别

关于ssl - 切换到 SSL 时,JMeter 停止发送 JSESSIONID cookie,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5096959/

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