Handle invalid Uri in HttpSeeds
See original GitHub issueWorking with some torrents from archive.org I’m seeing they have an invalid absolute Uri in their torrent file. E.g. this torrent https://archive.org/download/latinmass2/latinmass2_archive.torrent has an entry for /8/items/
which throws an exception in MonoTorrent.Client.Modes.Mode.DownloadLogic
.
Unexpected main loop exception: System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at MonoTorrent.Client.Modes.Mode.DownloadLogic(Int32 counter)
at MonoTorrent.Client.Modes.Mode.Tick(Int32 counter)
at MonoTorrent.Client.Modes.DownloadMode.Tick(Int32 counter)
at MonoTorrent.Client.ClientEngine.LogicTick()
at MonoTorrent.Client.ClientEngine.<.ctor>b__77_0()
MonoTorrent.Client.MainLoop.<>c__DisplayClass10_0.<QueueTimeout>g__Callback|0(Object state)
… MonoTorrent.Client.MainLoop.Loop()
I could create a PR that uses Uri.TryCreate
but I’m not sure if the best place to put the logic would be in the DownloadLogic
to just ignore these entries, or in the torrent loading logic.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
visual studio 2015 - Invalid URI error during web test run
I've managed to catch the invalid URI value in VS debugger: Generate code for the webtest (with a toolbar button) Set debugger to...
Read more >Invalid URI: - Common causes and quick fixes
This can be caused by a variety of issues, such as invalid characters, incorrect syntax, or an incorrect port number. To resolve this...
Read more >Receiving error Invalid URI: on the response · Issue #928
Hello, I am receiving an Invalid URI exception when process the response on /Salm2/Acs and I have gone through every configuration to understand ......
Read more >TorrentHandle (jlibtorrent 1.2.0.16-RC2 API) - javadoc.io
Generates a magnet URI from the specified torrent. If the torrent handle is invalid, null is returned. Returns: getUploadLimit. public int getUploadLimit() ...
Read more >SSL torrents
List of url-seed URLs used by this torrent. The URLs are expected to be properly encoded and not contain any illegal url characters....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suspect GH ate part of your comment there when talking about the List. I was going to assume you were thinking about exposing it as a
List<Uri>
rather than aList<string>
. I already created a PR that tidies up HTTP list with #429 but I could change this to aList<Uri>
pretty easily. Doesn’t look like there would be much of a change internally, but this would obviously be a breaking change. I guess now’s the time for that if you want to go that routeGreat stuff. I just merged that in! Thanks for taking the time to make those changes