GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    FenTiger (fentiger@zotum.net)'s status on Saturday, 09-Mar-2024 20:06:16 JST FenTiger FenTiger
    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{
        Scheme:"https",
        Opaque:"",
        Host:"example.social",
        Path:"/path/to/object",
        [...]
    }But parsing "did:ap: key:z6abcdef/path/to/object" gives me this:

    &url.URL{
        Scheme:"did",
        Opaque:"ap🔑z6abcdef/path/to/object",
        Host:"",
        Path:"",
        [...]
    }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
    In conversation about a year ago from zotum.net permalink

    Attachments


    • Embed this notice
      silverpill (silverpill@mitra.social)'s status on Saturday, 09-Mar-2024 20:06:15 JST silverpill silverpill
      in reply to

      @fentiger Rust url library says that ap🔑z6abcdef/path/to/object is a path. I guess DID URLs haven't seen much use before and we just need to file bug reports.

      In conversation about a year ago permalink
    • Embed this notice
      silverpill (silverpill@mitra.social)'s status on Saturday, 16-Mar-2024 20:22:50 JST silverpill silverpill
      in reply to
      • Grey Area

      @greyarea @fentiger Yes, you're right. I found the issue where this behavior was discussed:

      https://github.com/w3c/did-core/issues/556

      >the design of DID URL syntax was patterned after URN syntax
      >Parsing of the rootless path into the segment-nz component and the *( "/" segment) component must be done "manually" by the parser as with URNs.

      In conversation about a year ago permalink
    • Embed this notice
      Grey Area (greyarea@mitra.vpclmulqdq.moe)'s status on Saturday, 16-Mar-2024 20:22:51 JST Grey Area Grey Area
      in reply to
      • silverpill

      @silverpill @fentiger

      The Rust URL library is correct, according to spec (none of the updates change the behavior here).

      https://www.rfc-editor.org/rfc/rfc3986#section-3

      In conversation about a year ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.