When a request comes in to dispatcher for a file (eg. image, html, js)
how does it know if it is for a static file from the public folder or it
is a request for a dynamic file generated by a controller?
Some URLs:
/images/logo.png
/files/34
/files/34.pdf
The first URL refers to a static file in /public/images
The second URL refers to a dynamic file
The third URL could refer to a static or dynamic file
There are a few clues for dispatcher, first there is the URL itself,
which in the case of static file always has a filename, but then a
dynamic file can also optionally be in the filename form.
Secondly there is the HTTP accept header which might text/javascript,
but then you would expect this to be set correctly by the client (which
does not know if a file is static or dynamic).
Many thanks, K.