Ticket #2408 (closed defect: fixed)

Opened 9 months ago

Last modified 6 months ago

Partial IRI (RFC 3987) support

Reported by: pjd Assigned to: pjd
Priority: highest Milestone:
Component: Nevow Severity: normal
Keywords: IRI Cc:
Author: pjd Branch: branches/partial-IRI-support-2408

Description (Last modified by pjd)

Blendix currently explodes in the face of Unicode people names.

The most expedient fix is to implement enough of the IRI standard (RFC 3987) to support such names.

Full IRI support is a bigger task: see #2409.

Change History

11/18/07 19:28:28 changed by pjd

  • description changed.

(note #2409)

11/18/07 19:29:56 changed by pjd

  • branch set to branches/partial-IRI-support-2408.
  • author set to pjd.

(In [14305]) Branching to 'partial-IRI-support-2408'

11/18/07 19:59:30 changed by pjd

  • keywords set to review.
  • owner changed from pjd to glyph.

This should be enough to make blendix.com work for Unicode names.

The SharingIndex.locateChild change is not currently backed by a test, but:

  • The impact of this change is limited to making it consistent with the existing behavior of its parent, UserIndexPage.locateChild.
  • I don't see a way to properly test this aspect of them that's not pretty involved; it's better covered by #2409.

(follow-up: ↓ 6 ) 11/19/07 11:44:47 changed by glyph

  • owner changed from glyph to pjd.
  • author deleted.

The change doesn't seem hard, or involved, to test at all. Here's a simple example:

  • Mantissa/xmantissa/test/test_websharing.py

    old new  
    391391        self.assertIdentical(result, rend.NotFound) 
    392392 
    393393 
     394    def test_unicodeShareID(self): 
     395        """ 
     396        Verify that the shareID segment of the URL will be interpreted as 
     397        UTF-8. 
     398        """ 
     399        utf8ID = '\xc5\x9bhare\xc3\x8dD' 
     400        unicodeID = utf8ID.decode('utf-8') 
     401        sharingIndex = websharing.SharingIndex(self.userStore) 
     402        sharing.shareItem(self.shareable, shareID=unicodeID) 
     403        result, segments = sharingIndex.locateChild(None, (utf8ID,)) 
     404        self.assertEquals(result.fragment.showMagicValue(), 
     405                          self.magicValue) 
     406 
     407 
    394408    def test_emptySegmentWithDefault(self): 
    395409        """ 
    396410        Verify that we get the right resource and segments from 

It doesn't look like the parent's locateChild encoding is tested anywhere either; that would be good to get into this branch.

11/19/07 11:44:58 changed by glyph

  • keywords deleted.
  • author set to pjd.

(in reply to: ↑ 4 ) 11/19/07 17:45:21 changed by pjd

  • keywords set to review.
  • owner changed from pjd to glyph.

(In partial-IRI-support-2408@14318)

The change doesn't seem hard, or involved, to test at all.

Indeed; i was thinking of the whole lookup chain, instead of the appropriate units. Thanks for pointing this out.

It doesn't look like the parent's locateChild encoding is tested anywhere either; that would be good to get into this branch.

Neither was its return result, really; i added some coverage.

11/20/07 00:24:24 changed by glyph

  • keywords deleted.
  • owner changed from glyph to pjd.

Looking good. Merge away. Functional testing indicates that "李瑩" works as a name now, so I assume that yours will too :)

11/20/07 01:28:41 changed by pjd

  • status changed from new to closed.
  • resolution set to fixed.

(In [14330]) Merge partial-IRI-support-2408

Author: pjd Reviewer: glyph Fixes #2408

This implements some support for RFC 3987 IRIs (or Unicode URIs) in:

  • Nevow URL serialization
  • Mantissa web-based sharing

Previously, the above just tracebacks.

02/15/08 11:04:19 changed by pjd

  • keywords set to IRI.
jethro@divmod.org