This is the same logic I added when I implemented the assets JSON service. It makes it easier to test the service in a browser. Ideally we'd have support an URL like:

http://localhost:8001/course/AndyA.AA101.2014/branch/draft/block/2014.json

but that is hard to do until we implement something like the Python REST Framework.

It also makes it easier on the client, as it isn't always straightforward to set the HTTP_ACCEPT header and have it passed through all the layers of backbone etc.