lukevenediger / statsd.net

A high-performance stats collection service that feeds into Graphite and aimed at small- to large-scale windows environments.
MIT License
122 stars 25 forks source link

Add response for OPTIONS request #21

Closed brutaldev closed 10 years ago

brutaldev commented 10 years ago

The pre-flight OPTIONS request returns 404 which prevents the browser (Chrome at least) from even trying the GET/POST. There are ways to get around the browser sending OPTIONS but that should not be a concern if a valid response is sent.

This change simply responds to the OPTIONS request letting the browser know it can perform GET and POST method requests, CORS, and send some useful headers.

brutaldev commented 10 years ago

Added additional pull request to make GET and POST parameter handling more consistent. Also adds the line that failed to parse which helps with debugging bogus packets.

lukevenediger commented 10 years ago

Merged - thanks Werner!