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
+2
View File
@@ -36,6 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct LibOSRMConfig
{
std::unordered_map<std::string, boost::filesystem::path> server_paths;
int max_locations_trip = -1;
int max_locations_viaroute = -1;
int max_locations_distance_table = -1;
int max_locations_map_matching = -1;
bool use_shared_memory = true;