Closed burkasaurusrex closed 2 years ago
Hi,
at the time I wrote that code I verified that it works properly via this test case:
It takes this test data as input which I extracted from my own plex database:
https://github.com/mynttt/UpdateTool/blob/master/src/test/resources/uritestdata.txt
Upon running the code I found out how the Java implementation of URLEncoder and what Plex requires differ. The strange replaces behind it are just there to fix these imbalances so Plex causes no errors. In this case =
is treated as =
by the encoder here. /
and %2F
should also be treated correctly as else the test case would have produced an error.
https://github.com/mynttt/UpdateTool/blob/901ca070e4cd2acf3d9bd15eef674642f7550835/src/main/java/updatetool/common/ExtraData.java#L67-L75
I don't know Java that well, but I found the C# default URLencoder encodes
=
which turns out Plex does not like - it looks like=
should be passed as-is. Also seems like/
should be passed as%2F
.No idea why they did any of this ... I'll let you know if I find any others ...