Overly strict sanity check on post() method of DatasetCollectionHandler
- Dominant language
- Python
- Stars
- 170
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Given that it is now possible to post with `?host=datafile.root_domain`, the test in line 2108:
``` python
if self.request.uri != '/datasets':
msg = "Method not Allowed: invalid datasets post request"
log.info(msg)
raise HTTPError(405, reason=msg) # Method not allowed
```
is too strict since the suffix of the URI can legitimately be something other than `/datasets`...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in DatasetCollectionHandler at the post() sanity check around line 2108 and inspect how request.uri is formed when using ?host=datafile.root_domain. Verify the valid POST is not rejected solely because its URI differs from /datasets, while the resulting method validation still behaves correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100