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
url
property served in api responses is incomplete
#1294
Comments
It provides the path to the API endpoint on the same domain. It will only prepend the URL base to the webservers request URI: Line 514 in ec02afc
Line 173 in ec02afc
Lines 225 to 229 in ec02afc
In the example setup (privatebin.net) the API endpoint is at |
Is this perhaps for a case where the post API endpoint is different from the get API endpoint? If not, doesn't the paste poster already know the path of the API endpoint when they are making the post request? Also, when making comments, the "url" returned is currently misleading, yes? Because going to that url doesn't really give back the comment. |
The API endpoint is always the same (including for human visitors - the only difference is the non-default, server side yourls-proxy). The difference lies in the different payloads and HTTP request types. |
Did you use the FAQ section?
Steps to reproduce
post paste
post comment
What happens
The url property has server address missing.
What should happen
It should provide the full address, otherwise is it really relevant?
We can use the id field to create the proper url. The partial url doesn't add value.
Also, for comment reponse, url feild makes no sense?
If url needs to be returned for post comment it should be the parent paste's valid url.
Additional information
Basic information
Server address: https://privatebin.net
Server OS: -
Webserver: -
Browser: any
PrivateBin version: recent
I can reproduce this issue on https://privatebin.net: Yes
The text was updated successfully, but these errors were encountered: