Skip to content

[kio_http] Parse a FullyEncoded QUrl path with TolerantMode

Ahmad Samir requested to merge work/http-proxy-url-encoding into master

When using url.setPath(otherUrl.path(FullyEncoded)), we have to specify the TolerantMode parsing mode (setPath uses DecodedMode by default), otherwise we end up with a doubly encoded url:

otherUrl.path(FullyEncoded) would represent a space as %20 then url.setPath(otherUrl.path(FullyEncoded), DecodedMode) would represent the '%' character with '%25' so the path ends up with '%2520'.

AFAIU, either we use: url.setPath(otherUrl.path(FullyDecoded), DecodedMode) OR url.setPath(otherUrl.path(FullyEncoded), TolerantMode)

url.path() and url.setPath use FullyDecoded and DecodedMode by default, respectively.

Thanks to Andreas Schwab for figuring it out in the bug report.

BUG: 386406 FIXED-IN: 5.71.0

Merge request reports

Loading