Support for Host and accept header in route selection

Bug #505233 reported by Nicolas Leroux
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
play framework
Fix Committed
Wishlist
Nicolas Leroux

Bug Description

It will look like this:

GET(xml) {host}/ Application.index(format:'xml') using the route file. In the controller you can then access the host
variable if you wish.You can of course combine it with a regex or use only a regex: {host}\.mydomain\..*
Format means render in xml.

If you decide to use annotations (provided by the router annotations module) it will be something like (on you controller method):

@Get(value="{host}/", produces="xml")
public static void index(String host) {
....
}

It is still a proposal and can change over the time of course. If anyone has a better idea, syntax, etc I am open to all suggestion.

Changed in play:
assignee: nobody → Nicolas (nicolas-lunatech)
importance: Undecided → Wishlist
milestone: none → 1.1
status: New → In Progress
description: updated
Changed in play:
status: In Progress → Fix Committed
Revision history for this message
Nicolas Leroux (nicolas-lunatech) wrote :

Reopen as documentation and test cases are missing

Changed in play:
status: Fix Committed → In Progress
Changed in play:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.