Skip to content

Consider hostnames larger than 1024 characters invalid #141

@walro

Description

@walro

We're seeing Ruby barfing on certain URLs that have very long host portions.

If I get things correctly this is where the limit is set (defaults to 1024 unless the environment says something else):

https://github.com/ruby/ruby/blob/b753929806d0e42cdfde3f1a8dcdbf678f937e44/ext/socket/socket.c#L897-L903

NI_MAXHOST is set to 1025 in Bionic: http://manpages.ubuntu.com/manpages/bionic/man3/getnameinfo.3.html (check notes)

So 1024 ought to be fine for most of our use-cases

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