diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-02-19 12:50:05 -0500 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-02-19 12:50:05 -0500 |
| commit | 8c09665c40776060a09655fb4ea04ec65bdffb73 (patch) | |
| tree | b1432a7315a7a7689be21fa2e3cc122350c778b2 /MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | 3cce8731614e6846096bbe54fca8336e7f5d98d9 (diff) | |
| parent | f2c3dade77878b48a9a333d745e5d92a0f913233 (diff) | |
Merge pull request #1016 from MediaBrowser/dev
3.0.5518.5
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 046941e3c..6e8ba1c1d 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -380,6 +380,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer Priority = route.Priority, Summary = route.Summary }); + + // TODO: This is a hack for iOS. Remove it asap. + routes.Add(new RouteAttribute(DoubleNormalizeRoutePath(route.Path), route.Verbs) + { + Notes = route.Notes, + Priority = route.Priority, + Summary = route.Summary + }); } return routes.ToArray(); @@ -395,6 +403,16 @@ namespace MediaBrowser.Server.Implementations.HttpServer return "mediabrowser/" + path; } + private string DoubleNormalizeRoutePath(string path) + { + if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase)) + { + return "/mediabrowser/mediabrowser" + path; + } + + return "mediabrowser//mediabrowser" + path; + } + /// <summary> /// Releases the specified instance. /// </summary> |
