2

We delivered some times ago in production a Symfony2 project. In the prod.log file we have that 404 error quite a lot of time:

[2012-10-17 13:10:03] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: 
No route found for "OPTIONS /bundles/mythemes/css/" 
(uncaught exception)at /data/apps/project/webapp/version/app/cache/prod/...

It is normal as a user can't parse the CSS directory, a valid URL is for example:

/bundles/mythemes/css/ie7.css

I have found an issue on the Symfony2 tracker that is also about a bad http "OPTIONS" query:

https://github.com/FriendsOfSymfony/FOSRestBundle/issues/142

I am just wondering what is causing this error.

j0k
  • 22,600
  • 28
  • 79
  • 90
COil
  • 7,201
  • 2
  • 50
  • 98
  • Several questions come to my mind, why are you referencing to `FOSRestBundle` are you actually using it? `OPTIONS` is an HTTP verb as well as `GET` or `POST`. The route is not found and returns a 404 because the route is defined by BOTH the URI **and** the method. Therefore `GET /bundles/ie7.css` and `OPTIONS /bundles/ie7.css` are different routes. The main question **is** where those requests actually come from? – Boris Guéry Oct 23 '12 at 14:24
  • 1
    the OPTIONS verb is effectively used to "discover" options for an endpoint, it, for example, returns the `Allow`-ed method (`GET`|`POST`, etc.) – Boris Guéry Oct 24 '12 at 07:24

1 Answers1

2

I found the source of the problem, in these cases the referer was "Microsoft Office Protocol Discovery". It is all explained in this post:

What are "Microsoft Office Protocol Discovery" and "OfficeLiveConnector" and why do they access invalid URLs?

Community
  • 1
  • 1
COil
  • 7,201
  • 2
  • 50
  • 98