NET-A-PORTER / scala-uri

Simple scala library for building and parsing URIs
Other
261 stars 33 forks source link

Can the `/` operator squash multiple slashes? #80

Closed acjay closed 9 years ago

acjay commented 9 years ago

In cases where a base URI is provide with a slash, should the / operator not duplicate the slash? I can see the counterargument that right now, it very explicitly inserts a slash, always. I appreciate the consistency, but I'd suggest it might actually be "least surprise" to squash slashes adjacent to the / operator.

philwill-nap commented 9 years ago

http://example.com/fred and http://example.com//fred are both legal URIs identifying distinct resources; to coalesce adjacent / characters it would be incorrect.

larioj commented 8 years ago

Say we wanted the squashing behavior. What operator should we use?

xkrt commented 8 years ago

Additional squashing / operator will be very convenient