Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pepite committed Aug 25, 2011
1 parent 07e594e commit dc29ccd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion framework/src/play/mvc/Router.java
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ public Map<String, String> matches(String method, String path, String accept, St
// Parse the hostname and get only the part we are interested in
String routeValue = hostArg.defaultValue.replaceAll("\\{.*}", "");
domain = domain.replace(routeValue, "");
localArgs.put(hostArg.name, host);
localArgs.put(hostArg.name, domain);
}
localArgs.putAll(staticArgs);
return localArgs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static void imagesAssets() {
}

public static void dashboard(String client) {

renderText(client);
}

public static void hello(String name) {
Expand Down
1 change: 1 addition & 0 deletions samples-and-tests/just-test-cases/conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ GET /st%C3%A9phane Application.helloSteph
GET /hello%20world Application.helloWorld
GET {clientName}.myApp.com/home Application.myHomePage
GET assets.{_}/images Application.imagesAssets
GET {client}/client Application.dashboard
GET {client}.{_}/dashboard Application.dashboard

POST /ressource/file/{id} Rest.postOrPutFile
Expand Down
5 changes: 5 additions & 0 deletions samples-and-tests/just-test-cases/test/routing.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,9 @@
assertTextPresent('21: http://localhost:9003/hello%20world')
assertTextPresent('22: http://localhost:9003/st%C3%A9phane?name=nicola%C3%AFs')
assertTextPresent('23: http://localhost:9003/hello%20world?name=nicola%C3%AFs')


open('/client')
assertTextPresent('localhost')

#{/selenium}

0 comments on commit dc29ccd

Please sign in to comment.