Uploaded image for project: 'Abdera'
  1. Abdera
  2. ABDERA-218

IRI.toString() doesn't preserve empty fragment identifiers and queries

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      Calling toString() on IRI objects doesn't preserve empty fragment identifiers and queries. According to RFC 3987 (from 3986), they should.

      The following two examples fail:

      IRI iri = new IRI("http://example.org/foo#");
      assertEquals(iri.toString(), "http://example.org/foo#");

      iri = new IRI("http://example.org/foo?");
      assertEquals(iri.toString(), "http://example.org/foo?");

      Also note the bullet in at RFC 4287, 4.2.6 <http://tools.ietf.org/html/rfc4287#section-4.2.6> which says "Preserve empty fragment identifiers and queries.".

      (This should be fixed by changing the relevant bits in IRI.buildSchemeSpecificPart to:
      if (query != null)) { ...
      if (fragment != null)) { ...
      .)

        Activity

        Hide
        jasnell James M Snell added a comment -

        Checked in

        Show
        jasnell James M Snell added a comment - Checked in

          People

          • Assignee:
            jasnell James M Snell
            Reporter:
            niklasl Niklas Lindström
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development