fentiger, to random

Oh, joy: it turns out that Go's net/url package doesn't understand that DID URLs can have paths.

Parsing "https://example.social/path/to/object" gives me a useful result:

&url.URL{<br></br>    Scheme:"https",<br></br>    Opaque:"",<br></br>    Host:"example.social",<br></br>    Path:"/path/to/object",<br></br>    [...]<br></br>}

But parsing "did:ap: key:z6abcdef/path/to/object" gives me this:

&url.URL{<br></br>    Scheme:"did",<br></br>    Opaque:"ap:key:z6abcdef/path/to/object",<br></br>    Host:"",<br></br>    Path:"",<br></br>    [...]<br></br>}

So I need some kind of wrapper to detect DID URLs and parse the paths out of them. That's easy enough, I suppose, but then I need to actually use that wrapper, in all the relevant places...

#ActivityPub #FediDev #BangHeadHere

mariusor,
@mariusor@metalhead.club avatar

@fentiger and the net/url documentation expresses the problem directly in the URL section:
> URLs that do not start with a slash after the scheme are interpreted as:
>
> scheme:opaque[?query][]

https://pkg.go.dev/net/url#URL

AmazingMeagen, to history
@AmazingMeagen@historians.social avatar

On the conservation bench today, yes on Saturday for our once a month weekend opening, is a from 1552 for which I am writing an exhibition condition report.

The left endleaf is paper . Beneath the pastedown and just visible at the tail is a parchment manuscript .

Lambeth Palace Library
1552.1**




@histodons
@bookhistodons
@fragmentarium

Book open at left endleaf that is manuscript waste rotated 90 degrees. Manuscript is iron gall ink. Right page is the title page The Christen State of Matrymonye
Parchment stub made of recycled manuscript waste.

ghickman, to random
@ghickman@mastodon.social avatar

Yet again django-slippers has a useful tool, this time it's the fragment tag: https://mitchel.me/slippers/docs/template-tags-filters/#fragment

cc @carlton might be of interest to you too?

mcc, to random
@mcc@mastodon.social avatar

Is an HTML hash/anchor allowed to contain a #? Like if I go to website/file.html#one#two and that reads window.location.hash from Javascript will it be the string "one#two"?

dcreager,

@mcc My reading of the spec is that either are allowed but you need to percent-encode them both

website/file.html#arg1=1%23arg2=2

or

website/file.html#arg1=1%3farg2=2

https://url.spec.whatwg.org/#fragment-state

ono, to linux in KDE : Where bugfixes and new features come from

I was confused because there was no article visible at that link. Then I noticed you included the part that skips the article and jumps straight to the comments, and scrolled up to find it. Here’s the corrected link: pointieststick.com/…/where-bugfixes-and-new-featu…

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • tacticalgear
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • provamag3
  • ethstaker
  • GTA5RPClips
  • modclub
  • tester
  • Leos
  • osvaldo12
  • cisconetworking
  • everett
  • cubers
  • normalnudes
  • anitta
  • megavids
  • lostlight
  • All magazines