File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,8 +168,7 @@ def parse!(remaining)
168168 # The hostname cannot include a port.
169169 #
170170 # The hostname must not begin with a dot, end with a dot, or have
171- # consecutive dots. The hostname must have a minimum of 3 total
172- # components (foo.bar.tld).
171+ # consecutive dots. The hostname must have a minimum of 1 component (tld)
173172 #
174173 # Raises Error::InvalidURI if validation fails.
175174 def validate_srv_hostname ( hostname )
@@ -185,8 +184,8 @@ def validate_srv_hostname(hostname)
185184 if parts . any? ( &:empty? )
186185 raise_invalid_error! ( "Hostname cannot have consecutive dots: #{ hostname } " )
187186 end
188- if parts . length < 3
189- raise_invalid_error! ( "Hostname must have a minimum of 3 components (foo.bar. tld): #{ hostname } " )
187+ if parts . length < 1
188+ raise_invalid_error! ( "Hostname must have a minimum of 1 component ( tld): #{ hostname } " )
190189 end
191190 end
192191
You can’t perform that action at this time.
0 commit comments