Slashes in permissions API

Issue #1 resolved
Ali Afshar
repo owner created an issue

{{{ 17:45 < terrycojones> aa_: fom seems to be putting an extra / in its requests for permissions, using e.g., fom.api.FluidApi(db).permissions.tag_values[path].get('READ') 17:46 < terrycojones> aa_: i get a 404 error and the fluiddb log shows a request for //permissions/tag-values/..... 17:49 < terrycojones> aa_: actually, root_path is unused in ItemPermissionsApi in 17:50 < terrycojones> aa_: ah, i see why that's the case (sorry). 18:01 < terrycojones> aa_: ok, i found the problem: if you pass a base URL to the Fluid() init that ends with a slash, you get a doubled slash in requests. I know that's my fault (txFluiddb expects a slash, in contrast), but it would be nice to have init check for baseURL.endswith('/') or maybe just an assert not endswith so the unsuspecting fom user doesn't have to go digging as i just did :-)


Comments (3)

  1. Log in to comment