Inspect and save apache request headers
I wrote this function because one of our web apps that was communicating with our web server suddenly began receiving Error 406: Not Acceptable (The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request). So I inserted this bit of code to capture exactly what that accept header was and see if we could fix the problem. It writes the output to a file on the webserver.