You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GET /published/ route is relatively inconsistent when one specifies invalid parameters.
For example osc api /published/Virtualization:vagrant/ succeeds and osc api /published/Virtualization:vagrant:invalid/ is rejected with a 404. But, once you get into subdirectories, this no longer applies as osc api /published/Virtualization:vagrant/openSUSE_Tumbleweed results in a list of directories, but osc api /published/Virtualization:vagrant/this_does_not_exist just gives me an empty directory.
Expected Result
Specifying invalid parameters should either result in a 404 for all parameters or none of them.
Further Information
tested against build.opensuse.org
The text was updated successfully, but these errors were encountered:
I've realized that it gets even more inconsistent once you start adding more path entries:
$ osc api /published/Virtualization:vagrant/this_does_not_exist<directory></directory>
$ osc api /published/Virtualization:vagrant/this_does_not_exist/foo<directory></directory>
$ osc api /published/Virtualization:vagrant/this_does_not_exist/foo/barServer returned an error: HTTP Error 404: no such fileno such file
$ osc api /published/Virtualization:vagrant/this_does_not_exist/foo/bar/bazServer returned an error: HTTP Error 404: Not Found
I would suggest to start throwing 404s immediately, as the current behavior makes wrapping the API rather awkward.
Issue Description
The
GET /published/
route is relatively inconsistent when one specifies invalid parameters.For example
osc api /published/Virtualization:vagrant/
succeeds andosc api /published/Virtualization:vagrant:invalid/
is rejected with a 404. But, once you get into subdirectories, this no longer applies asosc api /published/Virtualization:vagrant/openSUSE_Tumbleweed
results in a list of directories, butosc api /published/Virtualization:vagrant/this_does_not_exist
just gives me an empty directory.Expected Result
Specifying invalid parameters should either result in a 404 for all parameters or none of them.
Further Information
The text was updated successfully, but these errors were encountered: