Skip to content

Commit

Permalink
Query string starts with '?' before first parameter and not '&'. See
Browse files Browse the repository at this point in the history
http://en.wikipedia.org/wiki/Query_string for an explanation. Fixes
issue #121. Thanks Jochen for the reminder!
  • Loading branch information
DennisOSRM committed Feb 17, 2012
1 parent 1744e69 commit b897b5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Docs/WebFrontend/Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
//======================
// OBJECTS
//Map
var HOST_ROUTING_URL = 'http://routingdemo.geofabrik.de/route-via/';
var HOST_ROUTING_URL = 'http://141.3.24.68:5000/viaroute';
//var HOST_ROUTING_URL = 'http://routingdemo.geofabrik.de/route-via/';
var HOST_WEBSITE = 'http://map.project-osrm.org/';//location.host

var ISCALCULATING = false;
Expand Down Expand Up @@ -78,7 +79,7 @@ function routing(isDragRoute){
document.getElementById('information').innerHTML = '<p class="infoHL">Release mouse button to get Route Information!</p>(If no Route Summary is diplayed, press the Route!-button)';
}

script.src = HOST_ROUTING_URL + "&start="+from.lat + ',' + from.lon + '&dest=' + to.lat + ',' + to.lon;
script.src = HOST_ROUTING_URL + "?start="+from.lat + ',' + from.lon + '&dest=' + to.lat + ',' + to.lon;
for(var i = 0; i < viaPointsVector.length; i++) {
script.src += ('&via=' + viaPointsVector[i][0] + ',' + viaPointsVector[i][1]);
}
Expand Down
4 changes: 2 additions & 2 deletions Server/RequestHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ class RequestHandler : private boost::noncopyable {
std::string request(req.uri);
// INFO( "[r] " << request );
std::string command;
std::size_t firstAmpPosition = request.find_first_of("&");
std::size_t firstAmpPosition = request.find_first_of("?");
command = request.substr(1,firstAmpPosition-1);
// DEBUG("[debug] looking for handler for command: " << command);
DEBUG("[debug] looking for handler for command: " << command);
try {
if(pluginMap.Holds(command)) {

Expand Down

0 comments on commit b897b5d

Please sign in to comment.