I agree. When parsing you should be strict according to specifications - otherwise system security can be more easily compromised.
> On Feb 20, 2025, at 11:47 PM, Kurtis Rader <kra...@skepticism.us> wrote: > > > > On Thu, Feb 20, 2025 at 9:39 PM robert engels <reng...@ix.netcom.com > <mailto:reng...@ix.netcom.com>> wrote: >> Also, see https://datatracker.ietf.org/doc/html/rfc2396#section-3 for more >> details on the scheme + authority. >> >> It all depends on what the URL parse is supposed to return, and based on the >> return structure - since it has elements like ‘host’ - it is supposed to be >> decoding a valid http url - using a single slash is not valid. > > I guess it depends on whether the old RFC aphorism "be conservative in what > you send, be liberal in what you accept" is applicable in this situation. I > tend to favor being strict regarding what is accepted as valid input. > Especially given the mess that was created by early web browsers being > arguably too liberal in their interpretation of malformed HTML. Nonetheless, > I can see an argument for the current behavior. > > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > To view this discussion visit > https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-64xfYVxqpAAKtUHH9%2BQ5srfxw3m1deeb741KD2PC4wQ%40mail.gmail.com > > <https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-64xfYVxqpAAKtUHH9%2BQ5srfxw3m1deeb741KD2PC4wQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/169090B5-BBF9-40E0-99B4-9B12DE35D7C3%40ix.netcom.com.