Skip to content

Commit

Permalink
fix more ifdefs, comment out unneeded request handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Sep 7, 2010
1 parent 9085aaa commit cc4dc30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/posix_main.cpp
Expand Up @@ -137,7 +137,7 @@ int main(int argc, char* argv[])
if (mapnik_dir)
{

#ifdef MAPNIK_VERSION >= 702
#if MAPNIK_VERSION >= 702
face_names = mapnik::freetype_engine::face_names();
freetype_engine::register_fonts(*mapnik_dir + "/fonts",false);
if (!mapnik::freetype_engine::face_names().size() > face_names.size())
Expand Down Expand Up @@ -253,7 +253,7 @@ int main(int argc, char* argv[])
}

// register font faces
#ifdef MAPNIK_VERSION >= 702
#if MAPNIK_VERSION >= 702
face_names = mapnik::freetype_engine::face_names();
freetype_engine::register_fonts(*fonts,true);
if (!mapnik::freetype_engine::face_names().size() > face_names.size())
Expand Down
7 changes: 5 additions & 2 deletions src/request_handler.cpp
Expand Up @@ -108,6 +108,7 @@ void request_handler::handle_request(const request& req, reply& rep)
}

// Request path must be absolute and not contain "..".
/*
if (request_path.empty() || request_path[0] != '/'
|| request_path.find("..") != std::string::npos
|| request_path == "/favicon.ico")
Expand All @@ -122,6 +123,7 @@ void request_handler::handle_request(const request& req, reply& rep)
rep = reply::reply_html(msg);
return;
}
*/

// If path ends in slash (i.e. is a directory) then add "index.html".
//if (request_path[request_path.size() - 1] == '/')
Expand Down Expand Up @@ -194,12 +196,13 @@ void request_handler::handle_request(const request& req, reply& rep)
}

// check for intersection with max/valid extent
boost::optional<mapnik::box2d<double> > bounds = max_extent();
//boost::optional<mapnik::box2d<double> > bounds = max_extent();
bool intersects = true;
/*
if (bounds){
if (!bounds->intersects(*bbox)) intersects = false;
// todo write directly to png/jpeg...
}
}*/

// setup transparent response image
image_32 im(*w,*h);
Expand Down

0 comments on commit cc4dc30

Please sign in to comment.