Skip to content

Commit

Permalink
Fix compilation issue when yajl is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mmd-osm committed Aug 10, 2018
1 parent 7c89ac0 commit 3940f26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/routes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,15 @@ namespace {
*/
pair<string, mime::type> resource_mime_type(const string &path) {

#ifdef HAVE_YAJL
{
std::size_t json_found = path.rfind(".json");

if (json_found != string::npos && json_found == path.length() - 5) {
return make_pair(path.substr(0, json_found), mime::text_json);
}
}
#endif

{
std::size_t xml_found = path.rfind(".xml");
Expand Down

0 comments on commit 3940f26

Please sign in to comment.