aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
authorBlueWall2014-03-27 12:21:38 -0400
committerBlueWall2014-03-27 12:21:38 -0400
commita15282f023548ce6e1c6a728d913999ee120e9c1 (patch)
treeb33a39a66549521fe5782d87378b3b4209822e81 /OpenSim/Framework/Servers/HttpServer
parentFix issue with user picks creation. The snapshot id is UUID.Zero in new parcels. (diff)
parentLog errors in MakeRequest() as INFO, not ERROR. Some communications problems ... (diff)
downloadopensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.zip
opensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.tar.gz
opensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.tar.bz2
opensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.tar.xz
Merge branch 'master' into m_test
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs5
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs13
2 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index ea7f195..28324a5 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -833,7 +833,7 @@ namespace OpenSim.Framework.Servers.HttpServer
833 833
834 Stream inputStream = Util.Copy(request.InputStream); 834 Stream inputStream = Util.Copy(request.InputStream);
835 835
836 if (request.ContentType == "application/x-gzip") 836 if ((request.Headers["Content-Encoding"] == "gzip") || (request.Headers["X-Content-Encoding"] == "gzip"))
837 inputStream = new GZipStream(inputStream, System.IO.Compression.CompressionMode.Decompress); 837 inputStream = new GZipStream(inputStream, System.IO.Compression.CompressionMode.Decompress);
838 838
839 using (StreamReader reader = new StreamReader(inputStream, Encoding.UTF8)) 839 using (StreamReader reader = new StreamReader(inputStream, Encoding.UTF8))
@@ -978,6 +978,9 @@ namespace OpenSim.Framework.Servers.HttpServer
978 { 978 {
979 Stream requestStream = request.InputStream; 979 Stream requestStream = request.InputStream;
980 980
981 if ((request.Headers["Content-Encoding"] == "gzip") || (request.Headers["X-Content-Encoding"] == "gzip"))
982 requestStream = new GZipStream(requestStream, System.IO.Compression.CompressionMode.Decompress);
983
981 Encoding encoding = Encoding.UTF8; 984 Encoding encoding = Encoding.UTF8;
982 StreamReader reader = new StreamReader(requestStream, encoding); 985 StreamReader reader = new StreamReader(requestStream, encoding);
983 986
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
index 3171759..05ec6dc 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
@@ -182,11 +182,22 @@ namespace OpenSim.Framework.Servers.HttpServer
182 _context = context; 182 _context = context;
183 183
184 if (null != req.Headers["content-encoding"]) 184 if (null != req.Headers["content-encoding"])
185 _contentEncoding = Encoding.GetEncoding(_request.Headers["content-encoding"]); 185 {
186 try
187 {
188 _contentEncoding = Encoding.GetEncoding(_request.Headers["content-encoding"]);
189 }
190 catch (Exception)
191 {
192 // ignore
193 }
194 }
195
186 if (null != req.Headers["content-type"]) 196 if (null != req.Headers["content-type"])
187 _contentType = _request.Headers["content-type"]; 197 _contentType = _request.Headers["content-type"];
188 if (null != req.Headers["user-agent"]) 198 if (null != req.Headers["user-agent"])
189 _userAgent = req.Headers["user-agent"]; 199 _userAgent = req.Headers["user-agent"];
200
190 if (null != req.Headers["remote_addr"]) 201 if (null != req.Headers["remote_addr"])
191 { 202 {
192 try 203 try