stable

Clone or download

Read-only

request #15000: Do not abuse 406 HTTP status code

All over the REST api, we throw 406 when the limit parameter exceeds the maximum. It is wrong because it's not content negotiation. https://tools.ietf.org/html/rfc7231#section-6.5.6 We should fix existing code before people copy paste it for new REST route. Change-Id: Iec4c511fea4f24263e1c16e90987cc1d805ec3cd

Modified Files

Name
M plugins/agiledashboard/include/AgileDashboard/REST/v1/AgileDashboardProjectResource.php +6 −8 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/BacklogItemResource.php +2 −16 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/MilestoneResource.class.php +4 −18 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/PlanningResource.class.php +2 −10 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/ProjectBacklogResource.class.php +0 −8 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/ProjectMilestonesResource.class.php +0 −9 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/ProjectPlanningsResource.class.php +0 −10 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v2/AgileDashboardProjectResource.php +1 −3 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v2/ProjectBacklogResource.class.php +0 −9 Go to diff View file
M plugins/frs/include/FRS/REST/v1/ProjectResource.php +2 −16 Go to diff View file
M plugins/git/include/REST/v1/RepositoryResource.class.php +2 −14 Go to diff View file
M plugins/label/include/Label/REST/v1/ProjectResource.php +1 −17 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php +4 −15 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactFilesResource.class.php +2 −16 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactTemporaryFilesResource.class.php +7 −23 Go to diff View file
M plugins/tracker/include/REST/v1/ProjectTrackersResource.class.php +2 −11 Go to diff View file
M plugins/tracker/include/REST/v1/ReportsResource.class.php +1 −10 Go to diff View file
M plugins/tracker/include/REST/v1/TrackersResource.class.php +3 −14 Go to diff View file
M src/common/Project/REST/v1/ProjectResource.class.php +2 −16 Go to diff View file
M src/common/Project/REST/v1/UserGroupResource.class.php +2 −24 Go to diff View file
D src/common/REST/Exceptions/LimitOutOfBoundsException.class.php +0 −31 Go to diff View file
M src/common/User/REST/v1/UserMembershipResource.php +4 −8 Go to diff View file
M src/common/system_event/REST/v1/SystemEventResource.php +2 −12 Go to diff View file
M tests/rest/tests/ArtifactFilesTest.php +1 −1 Go to diff View file