diff options
author | diva | 2009-02-04 13:13:47 +0000 |
---|---|---|
committer | diva | 2009-02-04 13:13:47 +0000 |
commit | cf1fd7de4ab465f8c7a542b582777f5306dec286 (patch) | |
tree | 099681c149a34349645b81b159987657047233fe | |
parent | - add OpenSim.Framework.AssetMetadata class. AssetBase is now composed of it (diff) | |
download | opensim-SC_OLD-cf1fd7de4ab465f8c7a542b582777f5306dec286.zip opensim-SC_OLD-cf1fd7de4ab465f8c7a542b582777f5306dec286.tar.gz opensim-SC_OLD-cf1fd7de4ab465f8c7a542b582777f5306dec286.tar.bz2 opensim-SC_OLD-cf1fd7de4ab465f8c7a542b582777f5306dec286.tar.xz |
Closing the requestStream and setting a 10 sec timeout for getting it.
-rw-r--r-- | OpenSim/Framework/Servers/RestObjectPosterResponse.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/RestSessionService.cs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs index cbc8be4..0d07f15 100644 --- a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs +++ b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs | |||
@@ -58,6 +58,7 @@ namespace OpenSim.Framework.Servers | |||
58 | WebRequest request = WebRequest.Create(requestUrl); | 58 | WebRequest request = WebRequest.Create(requestUrl); |
59 | request.Method = verb; | 59 | request.Method = verb; |
60 | request.ContentType = "text/xml"; | 60 | request.ContentType = "text/xml"; |
61 | request.Timeout = 10000; | ||
61 | 62 | ||
62 | MemoryStream buffer = new MemoryStream(); | 63 | MemoryStream buffer = new MemoryStream(); |
63 | 64 | ||
@@ -76,6 +77,7 @@ namespace OpenSim.Framework.Servers | |||
76 | 77 | ||
77 | Stream requestStream = request.GetRequestStream(); | 78 | Stream requestStream = request.GetRequestStream(); |
78 | requestStream.Write(buffer.ToArray(), 0, length); | 79 | requestStream.Write(buffer.ToArray(), 0, length); |
80 | requestStream.Close(); | ||
79 | // IAsyncResult result = request.BeginGetResponse(AsyncCallback, request); | 81 | // IAsyncResult result = request.BeginGetResponse(AsyncCallback, request); |
80 | request.BeginGetResponse(AsyncCallback, request); | 82 | request.BeginGetResponse(AsyncCallback, request); |
81 | } | 83 | } |
diff --git a/OpenSim/Framework/Servers/RestSessionService.cs b/OpenSim/Framework/Servers/RestSessionService.cs index d088e9a..958ee26 100644 --- a/OpenSim/Framework/Servers/RestSessionService.cs +++ b/OpenSim/Framework/Servers/RestSessionService.cs | |||
@@ -126,6 +126,7 @@ namespace OpenSim.Framework.Servers | |||
126 | WebRequest request = WebRequest.Create(requestUrl); | 126 | WebRequest request = WebRequest.Create(requestUrl); |
127 | request.Method = verb; | 127 | request.Method = verb; |
128 | request.ContentType = "text/xml"; | 128 | request.ContentType = "text/xml"; |
129 | request.Timeout = 10000; | ||
129 | 130 | ||
130 | MemoryStream buffer = new MemoryStream(); | 131 | MemoryStream buffer = new MemoryStream(); |
131 | 132 | ||
@@ -144,6 +145,7 @@ namespace OpenSim.Framework.Servers | |||
144 | 145 | ||
145 | Stream requestStream = request.GetRequestStream(); | 146 | Stream requestStream = request.GetRequestStream(); |
146 | requestStream.Write(buffer.ToArray(), 0, length); | 147 | requestStream.Write(buffer.ToArray(), 0, length); |
148 | requestStream.Close(); | ||
147 | // IAsyncResult result = request.BeginGetResponse(AsyncCallback, request); | 149 | // IAsyncResult result = request.BeginGetResponse(AsyncCallback, request); |
148 | request.BeginGetResponse(AsyncCallback, request); | 150 | request.BeginGetResponse(AsyncCallback, request); |
149 | } | 151 | } |