1

Documentation of urlparse.urljoin, mentions that: "Informally, this uses components of the base URL, in particular the addressing scheme, the network location and (part of) the path"

Thus I expect that:

urljoin('http://localhost:3000/foo', 'bar')

will give me:

http://localhost:3000/foo/bar

however I get:

http://localhost:3000/bar

I suppose that this is too common scenario to be a bug. Thus I expect that this is the normal behavior, and I was wondering: why? What do they mean "(part of) the path"? Isn't foo the actual path?

stelios
  • 2,679
  • 5
  • 31
  • 41
  • You should have a trailing slash on the 'foo' part. – wim Oct 31 '16 at 17:30
  • 1
    possible dupe --> http://stackoverflow.com/a/10893427/674039 – wim Oct 31 '16 at 17:32
  • yep it's a dupe. I am sorry I missed that. Although for python3 but the functionality is the same since it's about how a vhost path is defined. Thus we should close it I suppose – stelios Oct 31 '16 at 17:54

0 Answers0