Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profile name adds * for any routing URL. #52

Open
hannesaddec opened this issue May 11, 2021 · 4 comments
Open

profile name adds * for any routing URL. #52

hannesaddec opened this issue May 11, 2021 · 4 comments

Comments

@hannesaddec
Copy link

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

return("/".join([self.host, '*', self.version, self.profile]))

IMHO the * needs to be removed in L23 and L26 so it reads
return("/".join([self.host, self.version, self.profile]))

@zifeo
Copy link
Collaborator

zifeo commented Oct 7, 2021

@hannesaddec Can you provide more details on why this is an issue?

@hannesaddec
Copy link
Author

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

@zifeo
Copy link
Collaborator

zifeo commented Oct 8, 2021

@hannesaddec what osrm.RequestConfig are you using?

@hannesaddec
Copy link
Author

hannesaddec commented May 12, 2023

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]))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants