diff options
Diffstat (limited to 'OpenSim/Capabilities')
3 files changed, 82 insertions, 2 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 86e7aa0..6437d0b 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | |||
@@ -200,11 +200,25 @@ 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 | |||
204 | // Before clamping start make sure we can satisfy it in order to avoid | 203 | // Before clamping start make sure we can satisfy it in order to avoid |
205 | // sending back the last byte instead of an error status | 204 | // sending back the last byte instead of an error status |
206 | if (start >= texture.Data.Length) | 205 | if (start >= texture.Data.Length) |
207 | { | 206 | { |
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 | |||
208 | // response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; | 222 | // response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; |
209 | // viewers don't seem to handle RequestedRangeNotSatisfiable and keep retrying with same parameters | 223 | // viewers don't seem to handle RequestedRangeNotSatisfiable and keep retrying with same parameters |
210 | response["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; | 224 | response["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; |
@@ -215,7 +229,7 @@ namespace OpenSim.Capabilities.Handlers | |||
215 | start = Utils.Clamp(start, 0, end); | 229 | start = Utils.Clamp(start, 0, end); |
216 | int len = end - start + 1; | 230 | int len = end - start + 1; |
217 | 231 | ||
218 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); | 232 | // m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); |
219 | 233 | ||
220 | response["content-type"] = texture.Metadata.ContentType; | 234 | response["content-type"] = texture.Metadata.ContentType; |
221 | 235 | ||
diff --git a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a681fb6 --- /dev/null +++ b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OpenSim.Capabilities.Handlers")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("http://opensimulator.org")] | ||
12 | [assembly: AssemblyProduct("OpenSim")] | ||
13 | [assembly: AssemblyCopyright("OpenSimulator developers")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("32350823-e1df-45e3-b7fa-0a58b4372433")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | [assembly: AssemblyVersion("0.7.5.*")] | ||
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenSim/Capabilities/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..26254f2 --- /dev/null +++ b/OpenSim/Capabilities/Properties/AssemblyInfo.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OpenSim.Capabilities")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("http://opensimulator.org")] | ||
12 | [assembly: AssemblyProduct("OpenSim")] | ||
13 | [assembly: AssemblyCopyright("OpenSimulator developers")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("7d1a55b1-8fab-42ff-9c83-066a9cc34d76")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | [assembly: AssemblyVersion("0.7.5.*")] | ||
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||