Open hannesaddec opened 3 years ago
@hannesaddec Can you provide more details on why this is an issue?
if you run python-osrm and set it https://XXXXyourdomainxxxx/table/v1/car/4.3262100,50.8475730;4.3262100,50.8475730;4.3262100,50.8513870;4.3322340,50.8475730;4.3322340,50.8513870 - it fails as there is no '*' in the path... applies for varies endpoints e.g. we run it with a railway endpoint
@hannesaddec what osrm.RequestConfig
are you using?
note that the '*' get suppressed - not good at markdown
osrm.RequestConfig.host = "SERVERNAME/route" osrm.RequestConfig SERVERNAME/route/''/v1/driving osrm.RequestConfig.profile = 'v1/car' osrm.RequestConfig SERVERNAME/route/''/v1/v1/car
IMHO anyone needing a '' in a URLpath should set it in either th host or the profile options l22ff in init.py should be modified from def str(self): return("/".join([self.host, '', self.version, self.profile]))
def __repr__(self):
return("/".join([self.host, '*', self.version, self.profile]))
to
def __str__(self):
return("/".join([self.host, self.version, self.profile]))
def __repr__(self):
return("/".join([self.host, self.version, self.profile]))
Code adds a start to the URL path This is needed in case someone needs to use the demo server URL router.project-osrm.org/*/v1/car
however in other case the star does not exists
https://github.com/ustroetz/python-osrm/blob/8abcd85e1159492c377c0f8f2357790d34b420ca/osrm/__init__.py#L26
IMHO the * needs to be removed in L23 and L26 so it reads return("/".join([self.host, self.version, self.profile]))