I just got stung by rather annoying feature of URI.join:
Note that this completely ignores the ‘something’ in the original URI. I
assumed that it joined in a similar way to File.join:
irb(main):002:0> File.join(’/something’, ‘else’).to_s
I notice that adding a slash works as expected, but why is there a
Is there something in the HTTP spec that defines URI joining like this?
Maybe this is a case of incomplete documentation not explaining what the
is actually doing, this doesn’t seem to be ‘least surprising’ approach