Replace WebSocketSharpRequest.PathInfo custom URL query parsing with a framework function #491

Closed
opened 2026-02-06 19:46:15 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @EraYaN on GitHub (Mar 5, 2019).

Is your feature request related to a problem? Please describe.
Right now the code is littered with custom implementations for things that the framework has built in functions for.

Describe the solution you'd like
Probably something based on QueryHelper.ParseQuery

Originally created by @EraYaN on GitHub (Mar 5, 2019). **Is your feature request related to a problem? Please describe.** Right now the code is littered with custom implementations for things that the framework has built in functions for. **Describe the solution you'd like** Probably something based on `QueryHelper.ParseQuery`
OVERLORD added the enhancementbackendgood first issue labels 2026-02-06 19:46:15 +03:00
Author
Owner

@voodoos commented on GitHub (Apr 5, 2019):

I am having a look at it right now and it does seems like a lot of dead code to me:
If I am not mistaken the ResolvePathInfoFromMappedPath(string fullPath, string mappedPathRoot) function subtracts the prefix mappedPathRoot from the full path fullPath.

But the second argument is always nullor "" because it is used with the string HandlerFactoryPath member variable which is never initialized...

Thus in this state the ResolvePathInfoFromMappedPath does nothing more than the identity function.

Do you know what would be the role of HandlerFactoryPath ?
Should I just remove all that complexity or make is as flexible as it is now (but using more standard ways) even if it is of no use yet ?

PS: new dev here, hope I can help with some parts of this great adventure !

@voodoos commented on GitHub (Apr 5, 2019): I am having a look at it right now and it does seems like a lot of dead code to me: If I am not mistaken the [` ResolvePathInfoFromMappedPath(string fullPath, string mappedPathRoot)`](https://github.com/jellyfin/jellyfin/blob/79d9b8e693e4c53a56f610482f5f36f7a58f39f7/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs#L366) function subtracts the prefix `mappedPathRoot` from the full path `fullPath`. But the second argument is always `null`or `""` because it is used with the `string HandlerFactoryPath` member variable which is *never* initialized... Thus in this state the `ResolvePathInfoFromMappedPath` does nothing more than the identity function. Do you know what would be the role of `HandlerFactoryPath` ? Should I just remove all that complexity or make is as flexible as it is now (but using more standard ways) even if it is of no use yet ? PS: new dev here, hope I can help with some parts of this great adventure !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#491