The huge URLs are breaking Plebstr.

Reply to this note

Please Login to reply.

Discussion

Victor is S tier 10x developer!

nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z Why is Amethyst appending all that extra data? The original image URL is much shorter.

It's the NIP 54 proposal. It adds a bunch of tags to clearly define the content type, facilitate previews and size calculations before downloading the media. https://github.com/nostr-protocol/nips/pull/521

ugh. this feels very wrong.

we're gonna need a new term like cowboy coding that is applicable to adhoc spec development

This.

I definitely prefer NIP94, which is available since March on Amethyst. But here we are...

I'm confused. Are you saying there's a setting in Amethyst that can get rid of the ridiculous URLs?

I thought it was a server issue...

It's not a server issue. The extra parameters are needed to create previews and prepare the UI for the size of the image. There are multiple ways to do it, but in the end they will always be there.

It's better to have them in the URL directly if people are copying urls from post to post. Then they copy everything together.

Copying attachment URL that were longer than the user post / reply is absurd.

Why not handle it in HTTP header instead? (Like with `img_bitmap` http header representing the bitmap of image preview) or even via event tags?

Sure. You want to get this working well. But putting everything into a single URL creates a big burden for users.

Copying a url with all the tags in it is key. Lots of people copy the url from somebody else into their posts. If we place these tags in any other location, they are not going to be copied to the new post. In this way, users keep spreading the improved experience even in clients that do not support these tags.

But this is a mess.

Why? We have hundreds if not thousands of images already. Most things are working really well.

Neither of us really need to have this long URL just to get this working at all.

If it was on me we wouldn't have URLs at all. :)

What lies along the skewed lines? Some kind of density? I don't understand the numbers on that, the labels mention no units for that.

Nip 54 inline metadata. Not a terrible idea, but in practice much worse than Will's imeta tag.

today I learned you use plebstr

why ? idk

He's like a father, checking in on all of his children

It's the asterisk

Snort too

It begs the question of why it's breaking. This is a normal url. It shouldn't break anything. If this is breaking, lots of other urls are also breaking.

Well its not really broken, its just long and gets truncated, it should be supported ofc

What constitutes a normal URL is clearly not very well defined. People have been used half-assed regexes since always and everywhere and I think they should be able to continue to do that instead of conforming to some unworldly standard.

is it the length of the URL, or is it the asterisk that trips it up?

I don't know, I would guess the asterisk.

This position doesn't make any sense. Receiving clients can't control which type of URL the writing client is using. You have to deal with whatever comes in or your user will not have a good experience. Agreeing to use a simpler url scheme doesn't solve anything because it just takes one client to break it.

Exactly, one client can break everything, as is happening right now.

I am not dying on the hill of short simple URLs, but the fact remains that each client must tread carefully in order to be a good Nostr citizen. There is no world in which a decentralized protocol is robust against implementation attacks. It happens everywhere, HTML, RSS, HTTP, Fediverse, Bitcoin, probably many other places.

Thinking of regular web browsers like Firefox or Chrome, there is only a rule about URL formation. Nothing more than this.

probably json marshaling, which absolutely nobody seems to care about

But before next bug, happy Christmas ๐ŸŽ„

Pass it through and ellipsis function so itโ€™s like https://start[trimmed]:end

IIRC URLs have a length limit, could it be it?

Cc nostr:npub1atc6zwsr9nnyn0rq72g2qqznr3x4yhm20g50wsexjukygwrg9atqh0lssy

he should just use imeta like everyone else

Because of this bug i find myself switching btw 3 clients just to view the image. Frustrating. I'm sure you devs will get it sorted soon. In the meantime ๐Ÿ˜ฑ