immobiliare / RealHTTP

🌀swift async http client - fast, lightweight, type-safe
MIT License
282 stars 28 forks source link

isAbsoluteURL regex doesn't work like expected #54

Closed PoissonBallon closed 2 years ago

PoissonBallon commented 2 years ago

Bug Report

Q A
BC Break no
Version 1.52

Summary

isAbsoluteURL regex doesn't work like expected

Current behavior

Impossible to add urlComponents.queryItems coz path is absolute :/

How to reproduce

/connect/login is an absolute URL connect/login is an absolute URL

Expected behavior

/connect/login is not an absolute URL connect/login is not an absolute URL

I think error is the ? after the first group in the regex

malcommac commented 2 years ago

Thank you for your report, I've added a new regular expression validated using NSRegularExpression and several tests.

PoissonBallon commented 2 years ago

Thanks for your awesome works !!!