To fix #2193 prefix_length member variable has been added to ParsedURL that is set to the length of "/service/version/profile/" prefix when the prefix is accepted by the parser. Also BOOST_FUSION_ADAPT_STRUCT for osrm::server::api::ParsedURL has been moved from header to url_parser.cpp to speed up compilation of CUs that do not use the fusion adaption.
30 lines
385 B
C++
30 lines
385 B
C++
#ifndef SERVER_API_PARSED_URL_HPP
|
|
#define SERVER_API_PARSED_URL_HPP
|
|
|
|
#include "util/coordinate.hpp"
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace osrm
|
|
{
|
|
namespace server
|
|
{
|
|
namespace api
|
|
{
|
|
|
|
struct ParsedURL final
|
|
{
|
|
std::string service;
|
|
unsigned version;
|
|
std::string profile;
|
|
std::string query;
|
|
std::size_t prefix_length;
|
|
};
|
|
|
|
} // api
|
|
} // server
|
|
} // osrm
|
|
|
|
#endif
|