diff options
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 6 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index db87958..01990fa 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -736,8 +736,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
736 | else | 736 | else |
737 | { | 737 | { |
738 | xmlRpcResponse = new XmlRpcResponse(); | 738 | xmlRpcResponse = new XmlRpcResponse(); |
739 | |||
739 | // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php | 740 | // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php |
740 | xmlRpcResponse.SetFault(-32601, String.Format("Requested method [{0}] not found", methodName)); | 741 | xmlRpcResponse.SetFault( |
742 | XmlRpcErrorCodes.SERVER_ERROR_METHOD, | ||
743 | String.Format("Requested method [{0}] not found", methodName)); | ||
741 | } | 744 | } |
742 | 745 | ||
743 | responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); | 746 | responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); |
@@ -757,6 +760,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
757 | response.SendChunked = false; | 760 | response.SendChunked = false; |
758 | response.ContentLength64 = buf.Length; | 761 | response.ContentLength64 = buf.Length; |
759 | response.ContentEncoding = Encoding.UTF8; | 762 | response.ContentEncoding = Encoding.UTF8; |
763 | |||
760 | try | 764 | try |
761 | { | 765 | { |
762 | response.OutputStream.Write(buf, 0, buf.Length); | 766 | response.OutputStream.Write(buf, 0, buf.Length); |
diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs index 0f0c790..ebb2691 100644 --- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs +++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs | |||
@@ -56,14 +56,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
56 | request.ContentType = "text/www-form-urlencoded"; | 56 | request.ContentType = "text/www-form-urlencoded"; |
57 | 57 | ||
58 | MemoryStream buffer = new MemoryStream(); | 58 | MemoryStream buffer = new MemoryStream(); |
59 | 59 | int length = 0; | |
60 | using (StreamWriter writer = new StreamWriter(buffer)) | 60 | using (StreamWriter writer = new StreamWriter(buffer)) |
61 | { | 61 | { |
62 | writer.WriteLine(obj); | 62 | writer.WriteLine(obj); |
63 | writer.Flush(); | 63 | writer.Flush(); |
64 | length = (int)buffer.Length; | ||
64 | } | 65 | } |
65 | 66 | ||
66 | int length = (int) buffer.Length; | ||
67 | request.ContentLength = length; | 67 | request.ContentLength = length; |
68 | 68 | ||
69 | Stream requestStream = request.GetRequestStream(); | 69 | Stream requestStream = request.GetRequestStream(); |