HTTP2请求不遵循JMeter 5.0中的重定向 [英] HTTP2 Request doesn't follow redirects in JMeter 5.0

查看:231
本文介绍了HTTP2请求不遵循JMeter 5.0中的重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Blazemeter的JMeter的HTTP2插件,但无法使HTTP2请求遵循重定向.我尝试选中跟随重定向"框和同步请求",但它不起作用.

I'm using the HTTP2 plugin for JMeter from Blazemeter and I'm unable to make the HTTP2 request follow the redirects. I tried checking the "Follow Redirects" box and "Synchronized Request" and it doesn't work.

我得到响应代码:301&响应消息:HTTP/2.0 301永久移动,响应头中应该重定向的位置=>"location".

I get the Response code: 301 & Response message: HTTP/2.0 301 Moved Permanently and the location where it should redirect in the Response headers => "location".

我正在尝试向"www.aoro.ro"发出HTTP2请求(获取 https://www. aoro.ro/)应该将我重定向到" https://www.notino.ro/",但不遵循它从响应"标头获得的位置: HTTP/2.0 301永久移动 位置: https://www.notino.ro/ 并且我对此响应感到困惑,并且无法基于重定向使用断言.

I am trying to make a HTTP2 request to "www.aoro.ro" (GET https://www.aoro.ro/) which should redirect me to "https://www.notino.ro/" but does not follow the location it gets from the Reponse headers: HTTP/2.0 301 Moved Permanently location: https://www.notino.ro/ and I'm stuck with this response and cannot use assertions based on the redirects.

我还尝试使用"HTTP标头管理器"并从浏览器发送所有标头.我读到HTTP2版本的HTTP协议是异步的,这可能会干扰重定向.

I also tried to use "HTTP Header Manager" and send all the headers from the browser. I read that HTTP2 version of HTTP protocol is asynchronous and this may interfere with the redirect.

您了解有关使用HTTP2插件在JMeter上进行重定向的任何信息吗?

Do you know anything regarding the Redirecting on JMeter with HTTP2 plugin?

推荐答案

我确认这是

I confirm it's a bug of HTTP2 Request that I reported here (as there is no issue reporting in their github):

您可以使用正则表达式提取器自己进行处理:

What you can do is handle it yourself using Regular Expression Extractor:

并像这样添加它:

然后在另一个HTTP2请求的路径字段中使用$ {REDIRECT}:

Then use ${REDIRECT} in path field of another HTTP2 Request:

这篇关于HTTP2请求不遵循JMeter 5.0中的重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆