vert.x icon indicating copy to clipboard operation
vert.x copied to clipboard

use rawPath for HttpUtils resolveURIReference(vertx-web#1637)

Open zhbotong opened this issue 5 years ago • 7 comments

Fix Repeat redirects 301 same location

zhbotong avatar Jun 18 '20 08:06 zhbotong

can you give a proper explanation of what is changed and the reason

vietj avatar Jun 18 '20 09:06 vietj

@vietj Because the getPath method obtains the original data without encoding, for example: "http://exapmle/%E4%BD%A0%E5%A5%BD"

If use getPath, the value is chinese "你好",

but use getRawPath,the value is same location "/%E4%BD%A0%E5%A5%BD"

zhbotong avatar Jun 18 '20 10:06 zhbotong

If the path is "你好", then it is illegal in HttpUrl

zhbotong avatar Jun 18 '20 10:06 zhbotong

The reason for the repeated redirect 301 is that its target server does not recognize the illegal path in the URL. So always Response 301

zhbotong avatar Jun 18 '20 11:06 zhbotong

ISSUES 3456 Its target website address is : "https://apkcombo.com/천사티비-드라마-다시보기-tv/com.angelseries.angeltv/"

Replace "천사티비-드라마-다시보기" with other illegal characters, for example: "https://apkcombo.com/你好-tv/com.angelseries.angeltv/" It will still redirect to https://apkcombo.com/천사티비-드라마-다시보기-tv/com.angelseries.angeltv/

zhbotong avatar Jun 18 '20 11:06 zhbotong

Therefore, as long as we guarantee that the redirected URL is in the original point "Location", this will not happen

zhbotong avatar Jun 18 '20 11:06 zhbotong