abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Lindström (JIRA) <j...@apache.org>
Subject [jira] Created: (ABDERA-218) IRI.toString() doesn't preserve empty fragment identifiers and queries
Date Tue, 24 Feb 2009 02:12:02 GMT
IRI.toString() doesn't preserve empty fragment identifiers and queries
----------------------------------------------------------------------

                 Key: ABDERA-218
                 URL: https://issues.apache.org/jira/browse/ABDERA-218
             Project: Abdera
          Issue Type: Bug
    Affects Versions: 0.4.0
            Reporter: Niklas Lindström


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)) { ...
.)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message