[mythtv-commits] Ticket #13315: Use fully-decoded URL paths when translating to local paths

MythTV noreply at mythtv.org
Sun Nov 18 15:04:31 UTC 2018

#13315: Use fully-decoded URL paths when translating to local paths
 Reporter:  ijc               |          Owner:  Peter Bennett
     Type:  Patch - Bug Fix   |         Status:  assigned
 Priority:  minor             |      Milestone:  30.0
Component:  MythTV - General  |        Version:  Master Head
 Severity:  medium            |     Resolution:
 Keywords:                    |  Ticket locked:  0

Comment (by ijc):

 OK, so I'm now fairly convinced that the issue is that myth is treating
 `myth://Videos@iranon/temp/ticker_1080i%25.mkv` as a URL referring to the
 file `temp/ticker_1080i%25.mkv`.

 The correct URL to refer to that file would be
 `myth://Videos@iranon/temp/ticker_1080i%2525.mkv` (i.e. the literal % has
 been encoded).

 I think we've got a situation where two wrongs are making a (partially)
 right in that the incorrect URL can sometimes be accepted because the
 backend is reencoding the path.

 I'm debating what to do here -- finding all the places which call into
 `RemoteFile::*` and ensuring that they properly URL encode things
 correctly seems like a pretty large (if not impossible) task, but would be
 the correct thing to do I think.

 Declaring that `RemoteFile` URLs are not exactly the same as regular ones,
 wrt %encoding and the handling of query&fragment parts might be simpler
 but feels very ugly :-/

Ticket URL: <https://code.mythtv.org/trac/ticket/13315#comment:9>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list