Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

IPAddress toString should use existing printTo algorithm and conform to RFC 5952 canonical format for IPv6 addresses #228

Open
@sgryphon

Description

@sgryphon

API component

IPAddress

Description

ThetoString() for an IPv6 type address has a different output fromprintTo(), and does not follow the RFC 5952 canonical format. It has an unnecessarily long fixed length format. Note that IPv4 does not use a fixed length format.

Also note that the existingprintTo() method already implements the RFC 5952 canonical format algorithm, and has extensive tests (there are no tests for thetoString() method).

The recommendation would be fortoString() simply to use the existing algorithm fromprintTo() (and add some unit tests fortoString).

Is this a breaking change?

No. Both formats are valid string formats for IPv6, andfromString() handles both of them (and all other valid formats), as should any other system. The canonical format is usually shorter, but will not exceed the fixed length format, so there is no issue with overruns.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp