You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the result in the console to check that the function is executed with /favicon.ico:
Hello World! Path: /favicon.ico
Possible fix
I believe that the bug is at the NotFoundHandler class, that executes the super after writing the 404 error. I am not familiar with Jetty's handlers API, but we may see that other jetty handlers (InetAccessHandler.java) do return right after generating the sendError.
For production environment, there exist some workaround but it needs to be very precisely executed, otherwise some odd errors (502 codes) will occur. I can give more detail if someone is interested.
The text was updated successfully, but these errors were encountered:
Expected behaviour
According to Functions framework documentation, requests to
/favicon.ico
and/robots.txt
should return a 404 status without calling the function:Actual behaviour
When requesting a
/favicon.ico
or/robots.txt
, a 404 status is returned, but the function is actually invoked, with all its possible side effects.Reproduction
/favicon.ico
:/favicon.ico
:Possible fix
I believe that the bug is at the
NotFoundHandler
class, that executes thesuper
after writing the 404 error. I am not familiar with Jetty's handlers API, but we may see that other jetty handlers (InetAccessHandler.java) doreturn
right after generating thesendError
.PR for this: #226
Related
The text was updated successfully, but these errors were encountered: