From 236906364071712a2ad0a65d128958abeddc4b1b Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 6 Aug 2010 10:57:52 -0700
Subject: HACK ALERT! There's some underlying bug in the HTTP server that makes
 requests come up with Accept headers from previous requests. Until that gets
 fixed, this hack goes in.

---
 OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'OpenSim')

diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index ffa30d5..016ab73 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -319,6 +319,13 @@ namespace OpenSim.Framework.Servers.HttpServer
             OSHttpRequest req = new OSHttpRequest(context, request);
             OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
             HandleRequest(req, resp);
+
+            // !!!HACK ALERT!!!
+            // There seems to be a bug in the underlying http code that makes subsequent requests
+            // come up with trash in Accept headers. Until that gets fixed, we're cleaning them up here.
+            if (request.AcceptTypes != null)
+                for (int i = 0; i < request.AcceptTypes.Length; i++)
+                    request.AcceptTypes[i] = string.Empty;
         }
 
         // public void ConvertIHttpClientContextToOSHttp(object stateinfo)
-- 
cgit v1.1