Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Subprotocol/subScheme in URL #2101

Closed
itboy87 opened this issue Dec 31, 2023 · 3 comments · Fixed by #2110
Closed

Add Support for Subprotocol/subScheme in URL #2101

itboy87 opened this issue Dec 31, 2023 · 3 comments · Fixed by #2110

Comments

@itboy87
Copy link
Contributor

itboy87 commented Dec 31, 2023

The current URL lacks support for recognizing and handling subprotocols within URLs.

Example Use Cases:

  • jdbc:mysql://localhost:3306/database
  • jar:file:/path/to/archive.jar!/entry/in/jar
@itboy87
Copy link
Contributor Author

itboy87 commented Jan 1, 2024

Hi @soywiz , I need your suggestion. Is it a good idea to add one more variable, such as subScheme or subProtocol in the URL, for url parts like mysql or file from the above examples?

@soywiz
Copy link
Member

soywiz commented Jan 1, 2024

Umh. I was not aware of that, but makes sense. Because it would be simpler in terms of building to do something like $protocol:$subProtocol:. If it is empty, it would just work. So yeah.

@itboy87
Copy link
Contributor Author

itboy87 commented Jan 1, 2024

After reviewing the code, I've identified that implementing jdbc:mysql://localhost:3306/database can be easily achieved by adding a subScheme and making some minor adjustments. This will effectively handle the format <scheme>:<subscheme>://<host>:<port>/<path>?<query_parameters>#<fragment>.

However, the jar:file:/path/to/archive.jar!/entry/in/jar format is not a widely used standard. Considering its limited usage and potential major changes required, I recommend temporarily omitting this feature. Additionally, there are various jar: variations, some of which might involve URLs instead of files.

For now, I'll focus on fixing and supporting the standard format <scheme>:<subscheme>://<host>:<port>/<path>?<query_parameters>#<fragment>.

@itboy87 itboy87 changed the title Add Support for Subprotocols in URL Add Support for Subprotocol/subScheme in URL Jan 1, 2024
soywiz pushed a commit that referenced this issue Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants