In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Recently, I often contact testers. The script fails to run in jmeter 4.0, returning Response code: 400, HTTP returns 400, the official explanation is "Bad Request client request syntax error, the server cannot understand", and the execution is normal in jmeter 5.1. Here, this article records the solution.
JMeter4.0 is executed as follows:
Request as follows
The response data is as follows
The results of jmeter 5.1 are as follows
Request Body Request
Request Headers
Response data Response Body
Response headers
Response headers
III. Problem analysis
The script is as follows. Looking at the script, you can get that the script does not declare the HTTP header manager, so the default request header of the system call
By comparing the request header differences between jmeter 4.0 and jmeter 5.1, we can see that their request headers are different by default. The default Content-Type of the HTTP interface of jmeter 5.1 is text/plain; the default Content-Type of the HTTP interface of jmeter 4.0 is application/x-www-form-urlencoded. Since the header type of the HTTP interface of the performance test script is text/plain, the execution is successful.
So we just need to add a header manager in the script ourselves, and then declare it as text/plain, right click on the test plan "Add" Configuration element "HTTP header manager
In the header manager, add Content-Type=text/plain
Click the execute button and execute successfully.
If the article is helpful to you, you can click the attention function in the lower right corner. Welcome to forward and clap bricks. I will continue to publish articles related to testing and share testing technology with you. Each original article is carefully written to prevent plagiarism and copying. Weixin Official Accounts are synchronized with the articles on this platform for your convenience.
QQ technical exchange group: Add group Please enter verification information 51CTO
Wechat QR Code Follow Public Number:
After paying attention, reply to the resource download, you can get the download address of various resources I share
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.