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

A few issues with ZnUrl>>withRelativeReference: #68

Closed
kasperosterbye opened this issue Nov 12, 2021 · 4 comments
Closed

A few issues with ZnUrl>>withRelativeReference: #68

kasperosterbye opened this issue Nov 12, 2021 · 4 comments

Comments

@kasperosterbye
Copy link

In rfc3986 section 5.4.1 and 5.4.2 there is a number of tests cases.
I implemented them in the attached file - there is a very few that do not pass. Just wanted to pass it on, I did not want to do a fork and a PR for this. It is a classic fileout.

ZnUrlwithRelativeReferenceTest.st.zip

@svenvc
Copy link
Owner

svenvc commented Nov 12, 2021

Did you see my comment in pharo-project/pharo#10328 in full ?

Did you see ZnUrlTest>>#testReferenceResolution ?

I think this was already done ;-)

@kasperosterbye
Copy link
Author

I bow in the ashes for the great master!
Awesome!

The resolution is needed for relative url resolution in microdown for images, links and inputfiles. I would like to reuse the functionality present in ZnUrl (which now seems both possible and attractive). In particular I like that the resolution works for both file and http(s).

Though unrelated to this issue I was wondering if you had any ideas for how to support the Memory filesystem. I was thinking about file://memory/path, but as one creates stores on the fly it becomes an issue which memory store is meant. Have you had any thought on that?
I was thinking of introducing naming scheme and a (weak) hash map, allowing file://foo.memory/path, which would be resolvable if one had registred a memory store under the name foo in some other way.

@svenvc
Copy link
Owner

svenvc commented Nov 12, 2021

Thx.

I am not very familiar with the memory file system, from what I hear it is mostly used for tests.

If anything, my first idea would be to use a new scheme, maybe mfile:// and use the host as identifier,

   mfile://foo/path

But maybe memory-file:// would even be better.

   memory-file://foo/path

I use such URLs as connection specifications for various protocols.

@kasperosterbye
Copy link
Author

Tx. Those are a good ideas too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants