简体   繁体   English

JMETER该站点未在P3P标头中指定策略错误

[英]JMETER This site does not specify a policy in the P3P header ERROR

I am trying to hit this URL https://subdomain.example.com in JMeter and recorded using the Blazemeter Chrome extension has all the necessary config elements but get an error: 我正在尝试在JMeter中访问此URL https://subdomain.example.com ,并使用Blazemeter Chrome扩展程序进行记录,该扩展具有所有必要的配置元素,但出现错误:

HTTP/1.1 429 Too Many Requests Content-Type: text/html; HTTP / 1.1 429太多请求Content-Type:text / html; charset=utf-8 Content-Length: 1031 Connection: keep-alive Cache-Control: private, no-cache, no-store, must-revalidate Date: Tue, 20 Aug 2019 01:21:35 GMT Expires: 0 p3p: CP="This site does not specify a policy in the P3P header" charset = utf-8内容长度:1031连接:keep-alive缓存控制:私有,无缓存,无存储,必须重新验证日期:周二,2019年8月20日01:21:35 GMT过期:0 p3p: CP =“此站点未在P3P标头中指定策略”

I have tried coping the Header Cookies from Browser Header Response which works for sometime but then start throwing an error 我尝试处理浏览器标题响应中的标题Cookie,该方法在一段时间内有效,但随后开始引发错误

在此处输入图片说明

As per HTTP Status Code 429 Too Many Requests description: 根据HTTP状态码429太多请求说明:

The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting"). HTTP 429太多请求响应状态代码指示用户在给定的时间内发送了太多请求(“速率限制”)。

A Retry-After header might be included to this response indicating how long to wait before making a new request. 此响应中可能包含Retry-After标头,指示在发出新请求之前要等待多长时间。

So there are following options: 因此,有以下选项:

  1. Your server is overloaded, in this case there is nothing you can do here apart from reporting the error as the bottleneck 您的服务器超载,在这种情况下,除了将错误报告为瓶颈之外,您无法在此处执行任何其他操作
  2. Your script doesn't have proper correlation implemented, ie you're sending recorded hard-coded values instead of getting dynamic parameters 您的脚本未实现适当的关联 ,即您正在发送记录的硬编码值,而不是获取动态参数
  3. Your server doesn't allow such amount of requests from a single IP address within the given timeframe, you could try implementing IP Spoofing so your server would "think" that the requests are coming from the different machines. 您的服务器在给定的时间内不允许来自单个IP地址的请求数量如此,您可以尝试实施IP欺骗,以便您的服务器“认为”这些请求来自不同的计算机。

Thanks for your reply. 感谢您的回复。 In the end I figured out that no limitation for number of calls implemented. 最后,我发现实现的呼叫数量没有限制。 Now come to answer this is how I managed to work this: 现在来回答这是我如何设法做到这一点:

  1. Opened the page in chrome and from the header section copied all the header elements into the header manager hard coded. 用chrome打开页面,然后从标题部分将所有标题元素复制到硬编码的标题管理器中。 First time it fails and returns p3p: CP="This site does not specify a policy in the P3P header" but also return the update variable value needed for next request which I extract and used in the next and subsequent Requests. 第一次失败并返回p3p:CP =“此站点未在P3P标头中指定策略”,但还返回了下一个请求所需的更新变量值,该值我提取并在下一个和后续请求中使用。 The way I was able to find out which variable is changing by using the string comparison of 2 Response Headers 通过使用2 Response Headers的字符串比较,我能够找出哪个变量正在更改

在此处输入图片说明

在此处输入图片说明

This was a difficult one but somehow worked with very minor change I also added the Header Manager to each request for safer side. 这是一个困难的过程,但是以某种方式进行了很小的改动,我还为每个要求更安全的方面都添加了Header Manager。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM