Add max values for viaroute and trip and reorganize return code handling

"status" is now always:
 - 200 if the request was successful
 - 207 if the result is empty (no path found)
 - 400 if the request is invalid

 viaroute and trip now have a maximum of 500 and 100 locations
 respectively. Override with the --max-viaroute-size and --max-trip-size
 parameters.
This commit is contained in:
Patrick Niklaus
2015-12-17 04:14:06 +01:00
parent 7eb2af6cd3
commit 78ac3cffde
16 changed files with 283 additions and 238 deletions
+9 -3
View File
@@ -25,9 +25,11 @@ Feature: osrm-routed command line options: help
And stdout should contain "--port"
And stdout should contain "--threads"
And stdout should contain "--shared-memory"
And stdout should contain "--max-viaroute-size"
And stdout should contain "--max-trip-size"
And stdout should contain "--max-table-size"
And stdout should contain "--max-matching-size"
And stdout should contain 27 lines
And stdout should contain 30 lines
And it should exit with code 0
Scenario: osrm-routed - Help, short
@@ -51,9 +53,11 @@ Feature: osrm-routed command line options: help
And stdout should contain "--port"
And stdout should contain "--threads"
And stdout should contain "--shared-memory"
And stdout should contain "--max-viaroute-size"
And stdout should contain "--max-trip-size"
And stdout should contain "--max-table-size"
And stdout should contain "--max-matching-size"
And stdout should contain 27 lines
And stdout should contain 30 lines
And it should exit with code 0
Scenario: osrm-routed - Help, long
@@ -77,7 +81,9 @@ Feature: osrm-routed command line options: help
And stdout should contain "--port"
And stdout should contain "--threads"
And stdout should contain "--shared-memory"
And stdout should contain "--max-trip-size"
And stdout should contain "--max-table-size"
And stdout should contain "--max-table-size"
And stdout should contain "--max-matching-size"
And stdout should contain 27 lines
And stdout should contain 30 lines
And it should exit with code 0