diff options
author | teravus | 2012-11-15 10:05:16 -0500 |
---|---|---|
committer | teravus | 2012-11-15 10:05:16 -0500 |
commit | e9153e1d1aae50024d8cd05fe14a9bce34343a0e (patch) | |
tree | bc111d34f95a26b99c7e34d9e495dc14d1802cc3 /OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | |
parent | Merge master into teravuswork (diff) | |
download | opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.zip opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.gz opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.bz2 opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.xz |
Revert "Merge master into teravuswork", it should have been avination, not master.
This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing
changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64.
Diffstat (limited to 'OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs')
-rw-r--r-- | OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 6437d0b..86e7aa0 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | |||
@@ -200,25 +200,11 @@ namespace OpenSim.Capabilities.Handlers | |||
200 | int start, end; | 200 | int start, end; |
201 | if (TryParseRange(range, out start, out end)) | 201 | if (TryParseRange(range, out start, out end)) |
202 | { | 202 | { |
203 | |||
203 | // Before clamping start make sure we can satisfy it in order to avoid | 204 | // Before clamping start make sure we can satisfy it in order to avoid |
204 | // sending back the last byte instead of an error status | 205 | // sending back the last byte instead of an error status |
205 | if (start >= texture.Data.Length) | 206 | if (start >= texture.Data.Length) |
206 | { | 207 | { |
207 | // m_log.DebugFormat( | ||
208 | // "[GETTEXTURE]: Client requested range for texture {0} starting at {1} but texture has end of {2}", | ||
209 | // texture.ID, start, texture.Data.Length); | ||
210 | |||
211 | // Stricly speaking, as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, we should be sending back | ||
212 | // Requested Range Not Satisfiable (416) here. However, it appears that at least recent implementations | ||
213 | // of the Linden Lab viewer (3.2.1 and 3.3.4 and probably earlier), a viewer that has previously | ||
214 | // received a very small texture may attempt to fetch bytes from the server past the | ||
215 | // range of data that it received originally. Whether this happens appears to depend on whether | ||
216 | // the viewer's estimation of how large a request it needs to make for certain discard levels | ||
217 | // (http://wiki.secondlife.com/wiki/Image_System#Discard_Level_and_Mip_Mapping), chiefly discard | ||
218 | // level 2. If this estimate is greater than the total texture size, returning a RequestedRangeNotSatisfiable | ||
219 | // here will cause the viewer to treat the texture as bad and never display the full resolution | ||
220 | // However, if we return PartialContent (or OK) instead, the viewer will display that resolution. | ||
221 | |||
222 | // response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; | 208 | // response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; |
223 | // viewers don't seem to handle RequestedRangeNotSatisfiable and keep retrying with same parameters | 209 | // viewers don't seem to handle RequestedRangeNotSatisfiable and keep retrying with same parameters |
224 | response["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; | 210 | response["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; |
@@ -229,7 +215,7 @@ namespace OpenSim.Capabilities.Handlers | |||
229 | start = Utils.Clamp(start, 0, end); | 215 | start = Utils.Clamp(start, 0, end); |
230 | int len = end - start + 1; | 216 | int len = end - start + 1; |
231 | 217 | ||
232 | // m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); | 218 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); |
233 | 219 | ||
234 | response["content-type"] = texture.Metadata.ContentType; | 220 | response["content-type"] = texture.Metadata.ContentType; |
235 | 221 | ||