aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs437
-rw-r--r--OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs41
-rw-r--r--OpenSim/Framework/Console/RemoteConsole.cs2
-rw-r--r--OpenSim/Framework/NetworkServersInfo.cs4
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs28
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs261
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs5
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs17
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs95
-rw-r--r--OpenSim/Framework/Servers/MainServer.cs16
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs32
-rw-r--r--OpenSim/Region/Application/RegionApplicationBase.cs48
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs60
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs91
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs52
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs28
-rw-r--r--OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs2
-rw-r--r--OpenSim/Server/ServerMain.cs27
-rwxr-xr-xbin/HttpServer_OpenSim.dllbin117248 -> 119808 bytes
-rw-r--r--bin/HttpServer_OpenSim.pdbbin323072 -> 327168 bytes
-rw-r--r--bin/HttpServer_OpenSim.xml5574
-rw-r--r--bin/OpenSim.ini.example68
-rw-r--r--bin/OpenSimDefaults.ini36
-rw-r--r--bin/Robust.HG.ini.example8
-rw-r--r--bin/Robust.ini.example8
30 files changed, 841 insertions, 6114 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
index 53ed115..0f3f48e 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
@@ -30,6 +30,7 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Linq; 31using System.Linq;
32using System.Reflection; 32using System.Reflection;
33using System.Text;
33using log4net; 34using log4net;
34using Nini.Config; 35using Nini.Config;
35using OpenMetaverse; 36using OpenMetaverse;
@@ -60,7 +61,6 @@ namespace OpenSim.Capabilities.Handlers
60 m_Scene = s; 61 m_Scene = s;
61 } 62 }
62 63
63
64 public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 64 public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
65 { 65 {
66 //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); 66 //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request);
@@ -93,8 +93,8 @@ namespace OpenSim.Capabilities.Handlers
93 93
94 ArrayList foldersrequested = (ArrayList)hash["folders"]; 94 ArrayList foldersrequested = (ArrayList)hash["folders"];
95 95
96 string response = ""; 96 StringBuilder tmpresponse = new StringBuilder(1024);
97 string bad_folders_response = ""; 97 StringBuilder tmpbadfolders = new StringBuilder(1024);
98 98
99 List<LLSDFetchInventoryDescendents> folders = new List<LLSDFetchInventoryDescendents>(); 99 List<LLSDFetchInventoryDescendents> folders = new List<LLSDFetchInventoryDescendents>();
100 for (int i = 0; i < foldersrequested.Count; i++) 100 for (int i = 0; i < foldersrequested.Count; i++)
@@ -113,10 +113,7 @@ namespace OpenSim.Capabilities.Handlers
113 continue; 113 continue;
114 } 114 }
115 115
116 // Filter duplicate folder ids that bad viewers may send 116 folders.Add(llsdRequest);
117 if (folders.Find(f => f.folder_id == llsdRequest.folder_id) == null)
118 folders.Add(llsdRequest);
119
120 } 117 }
121 118
122 if (folders.Count > 0) 119 if (folders.Count > 0)
@@ -136,49 +133,44 @@ namespace OpenSim.Capabilities.Handlers
136 string inventoryitemstr = string.Empty; 133 string inventoryitemstr = string.Empty;
137 foreach (InventoryCollectionWithDescendents icoll in invcollSet) 134 foreach (InventoryCollectionWithDescendents icoll in invcollSet)
138 { 135 {
139 LLSDInventoryDescendents reply = ToLLSD(icoll.Collection, icoll.Descendents); 136 LLSDInventoryFolderContents thiscontents = contentsToLLSD(icoll.Collection, icoll.Descendents);
140 137 inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(thiscontents);
141 inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); 138// inventoryitemstr = inventoryitemstr.Replace("<llsd>", "");
142 inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", ""); 139// inventoryitemstr = inventoryitemstr.Replace("</llsd>", "");
143 inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", ""); 140// inventoryitemstr = inventoryitemstr.Substring(6,inventoryitemstr.Length - 13);
144 141// tmpresponse.Append(inventoryitemstr);
145 response += inventoryitemstr; 142 tmpresponse.Append(inventoryitemstr.Substring(6,inventoryitemstr.Length - 13));
146 } 143 }
147 144
148 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Bad folders {0}", string.Join(", ", bad_folders)); 145 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Bad folders {0}", string.Join(", ", bad_folders));
149 foreach (UUID bad in bad_folders) 146 foreach (UUID bad in bad_folders)
150 bad_folders_response += "<uuid>" + bad + "</uuid>"; 147 {
148 tmpbadfolders.Append("<map><key>folder_id</key><uuid>");
149 tmpbadfolders.Append(bad.ToString());
150 tmpbadfolders.Append("</uuid><key>error</key><string>Unknown</string></map>");
151 }
151 } 152 }
152 153
153 if (response.Length == 0) 154 StringBuilder lastresponse = new StringBuilder(1024);
155 lastresponse.Append("<llsd>");
156 if(tmpresponse.Length > 0)
154 { 157 {
155 /* Viewers expect a bad_folders array when not available */ 158 lastresponse.Append("<map><key>folders</key><array>");
156 if (bad_folders_response.Length != 0) 159 lastresponse.Append(tmpresponse.ToString());
157 { 160 lastresponse.Append("</array></map>");
158 response = "<llsd><map><key>bad_folders</key><array>" + bad_folders_response + "</array></map></llsd>";
159 }
160 else
161 {
162 response = "<llsd><map><key>folders</key><array /></map></llsd>";
163 }
164 } 161 }
165 else 162 else
163 lastresponse.Append("<map><key>folders</key><array /></map>");
164
165 if(tmpbadfolders.Length > 0)
166 { 166 {
167 if (bad_folders_response.Length != 0) 167 lastresponse.Append("<map><key>bad_folders</key><array>");
168 { 168 lastresponse.Append(tmpbadfolders.ToString());
169 response = "<llsd><map><key>folders</key><array>" + response + "</array><key>bad_folders</key><array>" + bad_folders_response + "</array></map></llsd>"; 169 lastresponse.Append("</array></map>");
170 }
171 else
172 {
173 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
174 }
175 } 170 }
171 lastresponse.Append("</llsd>");
176 172
177 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Replying to CAPS fetch inventory request for {0} folders. Item count {1}", folders.Count, item_count); 173 return lastresponse.ToString();
178 //m_log.Debug("[WEB FETCH INV DESC HANDLER] " + response);
179
180 return response;
181
182 } 174 }
183 175
184 /// <summary> 176 /// <summary>
@@ -240,24 +232,19 @@ namespace OpenSim.Capabilities.Handlers
240 return reply; 232 return reply;
241 } 233 }
242 234
243 private LLSDInventoryDescendents ToLLSD(InventoryCollection inv, int descendents) 235 private LLSDInventoryFolderContents contentsToLLSD(InventoryCollection inv, int descendents)
244 { 236 {
245 LLSDInventoryDescendents reply = new LLSDInventoryDescendents();
246 LLSDInventoryFolderContents contents = new LLSDInventoryFolderContents(); 237 LLSDInventoryFolderContents contents = new LLSDInventoryFolderContents();
247 contents.agent_id = inv.OwnerID; 238 contents.agent_id = inv.OwnerID;
248 contents.owner_id = inv.OwnerID; 239 contents.owner_id = inv.OwnerID;
249 contents.folder_id = inv.FolderID; 240 contents.folder_id = inv.FolderID;
250 241
251 reply.folders.Array.Add(contents);
252
253 if (inv.Folders != null) 242 if (inv.Folders != null)
254 { 243 {
255 foreach (InventoryFolderBase invFolder in inv.Folders) 244 foreach (InventoryFolderBase invFolder in inv.Folders)
256 { 245 {
257 contents.categories.Array.Add(ConvertInventoryFolder(invFolder)); 246 contents.categories.Array.Add(ConvertInventoryFolder(invFolder));
258 } 247 }
259
260 descendents += inv.Folders.Count;
261 } 248 }
262 249
263 if (inv.Items != null) 250 if (inv.Items != null)
@@ -271,7 +258,7 @@ namespace OpenSim.Capabilities.Handlers
271 contents.descendents = descendents; 258 contents.descendents = descendents;
272 contents.version = inv.Version; 259 contents.version = inv.Version;
273 260
274 return reply; 261 return contents;
275 } 262 }
276 /// <summary> 263 /// <summary>
277 /// Old style. Soon to be deprecated. 264 /// Old style. Soon to be deprecated.
@@ -285,8 +272,8 @@ namespace OpenSim.Capabilities.Handlers
285 { 272 {
286 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request for {0} folders", foldersrequested.Count); 273 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request for {0} folders", foldersrequested.Count);
287 274
288 string response = ""; 275 StringBuilder tmpresponse = new StringBuilder(1024);
289 string bad_folders_response = ""; 276 StringBuilder tmpbadfolders = new StringBuilder(1024);
290 277
291 for (int i = 0; i < foldersrequested.Count; i++) 278 for (int i = 0; i < foldersrequested.Count; i++)
292 { 279 {
@@ -308,7 +295,9 @@ namespace OpenSim.Capabilities.Handlers
308 295
309 if (null == reply) 296 if (null == reply)
310 { 297 {
311 bad_folders_response += "<uuid>" + llsdRequest.folder_id.ToString() + "</uuid>"; 298 tmpbadfolders.Append("<map><key>folder_id</key><uuid>");
299 tmpbadfolders.Append(llsdRequest.folder_id.ToString());
300 tmpbadfolders.Append("</uuid><key>error</key><string>Unknown</string></map>");
312 } 301 }
313 else 302 else
314 { 303 {
@@ -317,39 +306,29 @@ namespace OpenSim.Capabilities.Handlers
317 inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", ""); 306 inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", "");
318 } 307 }
319 308
320 response += inventoryitemstr; 309 tmpresponse.Append(inventoryitemstr);
321 } 310 }
322 311
323 if (response.Length == 0) 312 StringBuilder lastresponse = new StringBuilder(1024);
313 lastresponse.Append("<llsd>");
314 if(tmpresponse.Length > 0)
324 { 315 {
325 /* Viewers expect a bad_folders array when not available */ 316 lastresponse.Append("<map><key>folders</key><array>");
326 if (bad_folders_response.Length != 0) 317 lastresponse.Append(tmpresponse.ToString());
327 { 318 lastresponse.Append("</array></map>");
328 response = "<llsd><map><key>bad_folders</key><array>" + bad_folders_response + "</array></map></llsd>";
329 }
330 else
331 {
332 response = "<llsd><map><key>folders</key><array /></map></llsd>";
333 }
334 } 319 }
335 else 320 else
321 lastresponse.Append("<map><key>folders</key><array /></map>");
322
323 if(tmpbadfolders.Length > 0)
336 { 324 {
337 if (bad_folders_response.Length != 0) 325 lastresponse.Append("<map><key>bad_folders</key><array>");
338 { 326 lastresponse.Append(tmpbadfolders.ToString());
339 response = "<llsd><map><key>folders</key><array>" + response + "</array><key>bad_folders</key><array>" + bad_folders_response + "</array></map></llsd>"; 327 lastresponse.Append("</array></map>");
340 }
341 else
342 {
343 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
344 }
345 } 328 }
329 lastresponse.Append("</llsd>");
346 330
347 // m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Replying to CAPS fetch inventory request"); 331 return lastresponse.ToString();
348 //m_log.Debug("[WEB FETCH INV DESC HANDLER] "+response);
349
350 return response;
351
352 // }
353 } 332 }
354 333
355 /// <summary> 334 /// <summary>
@@ -436,108 +415,7 @@ namespace OpenSim.Capabilities.Handlers
436 itemsToReturn.Insert(0, linkedItem); 415 itemsToReturn.Insert(0, linkedItem);
437 } 416 }
438 } 417 }
439
440 // Now scan for folder links and insert the items they target and those links at the head of the return data
441
442/* dont send contents of LinkFolders.
443from docs seems this was never a spec
444
445 foreach (InventoryItemBase item in originalItems)
446 {
447 if (item.AssetType == (int)AssetType.LinkFolder)
448 {
449 InventoryCollection linkedFolderContents = m_InventoryService.GetFolderContent(ownerID, item.AssetID);
450 List<InventoryItemBase> links = linkedFolderContents.Items;
451
452 itemsToReturn.InsertRange(0, links);
453
454 foreach (InventoryItemBase link in linkedFolderContents.Items)
455 {
456 // Take care of genuinely broken links where the target doesn't exist
457 // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
458 // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
459 // rather than having to keep track of every folder requested in the recursion.
460 if (link != null)
461 {
462// m_log.DebugFormat(
463// "[WEB FETCH INV DESC HANDLER]: Adding item {0} {1} from folder {2} linked from {3}",
464// link.Name, (AssetType)link.AssetType, item.AssetID, containingFolder.Name);
465
466 InventoryItemBase linkedItem
467 = m_InventoryService.GetItem(new InventoryItemBase(link.AssetID));
468
469 if (linkedItem != null)
470 itemsToReturn.Insert(0, linkedItem);
471 }
472 }
473 }
474 }
475*/
476 } 418 }
477
478// foreach (InventoryItemBase item in contents.Items)
479// {
480// m_log.DebugFormat(
481// "[WEB FETCH INV DESC HANDLER]: Returning item {0}, type {1}, parent {2} in {3} {4}",
482// item.Name, (AssetType)item.AssetType, item.Folder, containingFolder.Name, containingFolder.ID);
483// }
484
485 // =====
486
487//
488// foreach (InventoryItemBase linkedItem in linkedItemsToAdd)
489// {
490// m_log.DebugFormat(
491// "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}",
492// linkedItem.Name, folderID, agentID);
493//
494// contents.Items.Add(linkedItem);
495// }
496//
497// // If the folder requested contains links, then we need to send those folders first, otherwise the links
498// // will be broken in the viewer.
499// HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>();
500// foreach (InventoryItemBase item in contents.Items)
501// {
502// if (item.AssetType == (int)AssetType.Link)
503// {
504// InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
505//
506// // Take care of genuinely broken links where the target doesn't exist
507// // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
508// // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
509// // rather than having to keep track of every folder requested in the recursion.
510// if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
511// {
512// // We don't need to send the folder if source and destination of the link are in the same
513// // folder.
514// if (linkedItem.Folder != containingFolder.ID)
515// linkedItemFolderIdsToSend.Add(linkedItem.Folder);
516// }
517// }
518// }
519//
520// foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
521// {
522// m_log.DebugFormat(
523// "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}",
524// linkedItemFolderId, folderID, agentID);
525//
526// int dummyVersion;
527// InventoryCollection linkedCollection
528// = Fetch(
529// agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion);
530//
531// InventoryFolderBase linkedFolder = new InventoryFolderBase(linkedItemFolderId);
532// linkedFolder.Owner = agentID;
533// linkedFolder = m_InventoryService.GetFolder(linkedFolder);
534//
535//// contents.Folders.AddRange(linkedCollection.Folders);
536//
537// contents.Folders.Add(linkedFolder);
538// contents.Items.AddRange(linkedCollection.Items);
539// }
540// }
541 } 419 }
542 } 420 }
543 else 421 else
@@ -550,33 +428,26 @@ from docs seems this was never a spec
550 428
551 } 429 }
552 430
553 private void AddLibraryFolders(List<LLSDFetchInventoryDescendents> fetchFolders, List<InventoryCollectionWithDescendents> result) 431 private void AddLibraryFolders(List<LLSDFetchInventoryDescendents> libFolders, List<InventoryCollectionWithDescendents> result)
554 { 432 {
555 InventoryFolderImpl fold; 433 InventoryFolderImpl fold;
556 if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null) 434 foreach (LLSDFetchInventoryDescendents f in libFolders)
557 { 435 {
558 List<LLSDFetchInventoryDescendents> libfolders = fetchFolders.FindAll(f => f.owner_id == m_LibraryService.LibraryRootFolder.Owner); 436 if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(f.folder_id)) != null)
559 fetchFolders.RemoveAll(f => libfolders.Contains(f));
560
561 //m_log.DebugFormat("[XXX]: Found {0} library folders in request", libfolders.Count);
562
563 foreach (LLSDFetchInventoryDescendents f in libfolders)
564 { 437 {
565 if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(f.folder_id)) != null) 438 InventoryCollectionWithDescendents ret = new InventoryCollectionWithDescendents();
566 { 439 ret.Collection = new InventoryCollection();
567 InventoryCollectionWithDescendents ret = new InventoryCollectionWithDescendents(); 440// ret.Collection.Folders = new List<InventoryFolderBase>();
568 ret.Collection = new InventoryCollection(); 441 ret.Collection.Folders = fold.RequestListOfFolders();
569 ret.Collection.Folders = new List<InventoryFolderBase>(); 442 ret.Collection.Items = fold.RequestListOfItems();
570 ret.Collection.Items = fold.RequestListOfItems(); 443 ret.Collection.OwnerID = m_LibraryService.LibraryRootFolder.Owner;
571 ret.Collection.OwnerID = m_LibraryService.LibraryRootFolder.Owner; 444 ret.Collection.FolderID = f.folder_id;
572 ret.Collection.FolderID = f.folder_id; 445 ret.Collection.Version = fold.Version;
573 ret.Collection.Version = fold.Version; 446
574 447 ret.Descendents = ret.Collection.Items.Count + ret.Collection.Folders.Count;
575 ret.Descendents = ret.Collection.Items.Count; 448 result.Add(ret);
576 result.Add(ret); 449
577 450 //m_log.DebugFormat("[XXX]: Added libfolder {0} ({1}) {2}", ret.Collection.FolderID, ret.Collection.OwnerID);
578 //m_log.DebugFormat("[XXX]: Added libfolder {0} ({1}) {2}", ret.Collection.FolderID, ret.Collection.OwnerID);
579 }
580 } 451 }
581 } 452 }
582 } 453 }
@@ -589,57 +460,97 @@ from docs seems this was never a spec
589 // FIXME MAYBE: We're not handling sortOrder! 460 // FIXME MAYBE: We're not handling sortOrder!
590 461
591 List<InventoryCollectionWithDescendents> result = new List<InventoryCollectionWithDescendents>(); 462 List<InventoryCollectionWithDescendents> result = new List<InventoryCollectionWithDescendents>();
463 if(fetchFolders.Count <= 0)
464 return result;
465
466 List<LLSDFetchInventoryDescendents> libFolders = new List<LLSDFetchInventoryDescendents>();
467 List<LLSDFetchInventoryDescendents> otherFolders = new List<LLSDFetchInventoryDescendents>();
468 HashSet<UUID> libIDs = new HashSet<UUID>();
469 HashSet<UUID> otherIDs = new HashSet<UUID>();
592 470
593 AddLibraryFolders(fetchFolders, result); 471 bool dolib = (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null);
472 UUID libOwner = UUID.Zero;
473 if(dolib)
474 libOwner = m_LibraryService.LibraryRootFolder.Owner;
594 475
595 // Filter folder Zero right here. Some viewers (Firestorm) send request for folder Zero, which doesn't make sense 476 // Filter folder Zero right here. Some viewers (Firestorm) send request for folder Zero, which doesn't make sense
596 // and can kill the sim (all root folders have parent_id Zero) 477 // and can kill the sim (all root folders have parent_id Zero)
597 LLSDFetchInventoryDescendents zero = fetchFolders.Find(f => f.folder_id == UUID.Zero); 478 // send something.
598 if (zero != null) 479 foreach(LLSDFetchInventoryDescendents f in fetchFolders)
599 { 480 {
600 fetchFolders.Remove(zero); 481 if (f.folder_id == UUID.Zero)
601 BadFolder(zero, null, bad_folders); 482 {
483 InventoryCollectionWithDescendents zeroColl = new InventoryCollectionWithDescendents();
484 zeroColl.Collection = new InventoryCollection();
485 zeroColl.Collection.OwnerID = f.owner_id;
486 zeroColl.Collection.Version = 0;
487 zeroColl.Collection.FolderID = f.folder_id;
488 zeroColl.Descendents = 0;
489 result.Add(zeroColl);
490 continue;
491 }
492 if(dolib && f.owner_id == libOwner)
493 {
494 if(libIDs.Contains(f.folder_id))
495 continue;
496 libIDs.Add(f.folder_id);
497 libFolders.Add(f);
498 continue;
499 }
500 if(otherIDs.Contains(f.folder_id))
501 continue;
502 otherIDs.Add(f.folder_id);
503 otherFolders.Add(f);
602 } 504 }
603 505
604 if (fetchFolders.Count > 0) 506
605 { 507 if(otherFolders.Count > 0)
606 UUID[] fids = new UUID[fetchFolders.Count]; 508 {
509 UUID[] fids = new UUID[otherFolders.Count];
607 int i = 0; 510 int i = 0;
608 foreach (LLSDFetchInventoryDescendents f in fetchFolders) 511 foreach (LLSDFetchInventoryDescendents f in otherFolders)
609 fids[i++] = f.folder_id; 512 fids[i++] = f.folder_id;
610 513
611 //m_log.DebugFormat("[XXX]: {0}", string.Join(",", fids)); 514 //m_log.DebugFormat("[XXX]: {0}", string.Join(",", fids));
612 515
613 InventoryCollection[] fetchedContents = m_InventoryService.GetMultipleFoldersContent(fetchFolders[0].owner_id, fids); 516 InventoryCollection[] fetchedContents = m_InventoryService.GetMultipleFoldersContent(otherFolders[0].owner_id, fids);
614 517
615 if (fetchedContents == null || (fetchedContents != null && fetchedContents.Length == 0)) 518 if (fetchedContents == null)
519 return null;
520
521 if (fetchedContents.Length == 0)
616 { 522 {
617 m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Could not get contents of multiple folders for user {0}", fetchFolders[0].owner_id); 523 foreach (LLSDFetchInventoryDescendents freq in otherFolders)
618 foreach (LLSDFetchInventoryDescendents freq in fetchFolders)
619 BadFolder(freq, null, bad_folders); 524 BadFolder(freq, null, bad_folders);
620 return null;
621 } 525 }
622 526 else
623 i = 0;
624 // Do some post-processing. May need to fetch more from inv server for links
625 foreach (InventoryCollection contents in fetchedContents)
626 { 527 {
627 // Find the original request 528 i = 0;
628 LLSDFetchInventoryDescendents freq = fetchFolders[i++]; 529 // Do some post-processing. May need to fetch more from inv server for links
530 foreach (InventoryCollection contents in fetchedContents)
531 {
532 // Find the original request
533 LLSDFetchInventoryDescendents freq = otherFolders[i++];
629 534
630 InventoryCollectionWithDescendents coll = new InventoryCollectionWithDescendents(); 535 InventoryCollectionWithDescendents coll = new InventoryCollectionWithDescendents();
631 coll.Collection = contents; 536 coll.Collection = contents;
632 537
633 if (BadFolder(freq, contents, bad_folders)) 538 if (BadFolder(freq, contents, bad_folders))
634 continue; 539 continue;
635 540
636 // Next: link management 541 // Next: link management
637 ProcessLinks(freq, coll); 542 ProcessLinks(freq, coll);
638 543
639 result.Add(coll); 544 result.Add(coll);
545 }
640 } 546 }
641 } 547 }
642 548
549 if(dolib && libFolders.Count > 0)
550 {
551 AddLibraryFolders(libFolders, result);
552 }
553
643 return result; 554 return result;
644 } 555 }
645 556
@@ -666,35 +577,8 @@ from docs seems this was never a spec
666 } 577 }
667 else 578 else
668 { 579 {
669 // Was it really a request for folder Zero? 580 m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Unable to fetch folder {0}", freq.folder_id);
670 // This is an overkill, but Firestorm really asks for folder Zero. 581 bad_folders.Add(freq.folder_id);
671 // I'm leaving the code here for the time being, but commented.
672 if (freq.folder_id == UUID.Zero)
673 {
674 //coll.Collection.OwnerID = freq.owner_id;
675 //coll.Collection.FolderID = contents.FolderID;
676 //containingFolder = m_InventoryService.GetRootFolder(freq.owner_id);
677 //if (containingFolder != null)
678 //{
679 // m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Request for parent of folder {0}", containingFolder.ID);
680 // coll.Collection.Folders.Clear();
681 // coll.Collection.Folders.Add(containingFolder);
682 // if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null)
683 // {
684 // InventoryFolderBase lib = new InventoryFolderBase(m_LibraryService.LibraryRootFolder.ID, m_LibraryService.LibraryRootFolder.Owner);
685 // lib.Name = m_LibraryService.LibraryRootFolder.Name;
686 // lib.Type = m_LibraryService.LibraryRootFolder.Type;
687 // lib.Version = m_LibraryService.LibraryRootFolder.Version;
688 // coll.Collection.Folders.Add(lib);
689 // }
690 // coll.Collection.Items.Clear();
691 //}
692 }
693 else
694 {
695 m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Unable to fetch folder {0}", freq.folder_id);
696 bad_folders.Add(freq.folder_id);
697 }
698 bad = true; 582 bad = true;
699 } 583 }
700 } 584 }
@@ -708,42 +592,21 @@ from docs seems this was never a spec
708 592
709 if (freq.fetch_items && contents.Items != null) 593 if (freq.fetch_items && contents.Items != null)
710 { 594 {
711 List<InventoryItemBase> itemsToReturn = contents.Items; 595 // viewers are lasy and want a copy of the linked item sent before the link to it
712 596
713 // descendents must only include the links, not the linked items we add 597 // descendents must only include the links, not the linked items we add
714 coll.Descendents = itemsToReturn.Count; 598 coll.Descendents = contents.Items.Count + contents.Folders.Count;
715 599
716 // Add target items for links in this folder before the links themselves. 600 // look for item links
717 List<UUID> itemIDs = new List<UUID>(); 601 List<UUID> itemIDs = new List<UUID>();
718 List<UUID> folderIDs = new List<UUID>(); 602 foreach (InventoryItemBase item in contents.Items)
719 foreach (InventoryItemBase item in itemsToReturn)
720 { 603 {
721 //m_log.DebugFormat("[XXX]: {0} {1}", item.Name, item.AssetType); 604 //m_log.DebugFormat("[XXX]: {0} {1}", item.Name, item.AssetType);
722 if (item.AssetType == (int)AssetType.Link) 605 if (item.AssetType == (int)AssetType.Link)
723 itemIDs.Add(item.AssetID); 606 itemIDs.Add(item.AssetID);
724
725// else if (item.AssetType == (int)AssetType.LinkFolder)
726// folderIDs.Add(item.AssetID);
727 }
728
729 //m_log.DebugFormat("[XXX]: folder {0} has {1} links and {2} linkfolders", contents.FolderID, itemIDs.Count, folderIDs.Count);
730
731 // Scan for folder links and insert the items they target and those links at the head of the return data
732 if (folderIDs.Count > 0)
733 {
734 InventoryCollection[] linkedFolders = m_InventoryService.GetMultipleFoldersContent(coll.Collection.OwnerID, folderIDs.ToArray());
735 foreach (InventoryCollection linkedFolderContents in linkedFolders)
736 {
737 if (linkedFolderContents == null)
738 continue;
739
740 List<InventoryItemBase> links = linkedFolderContents.Items;
741
742 itemsToReturn.InsertRange(0, links);
743
744 }
745 } 607 }
746 608
609 // get the linked if any
747 if (itemIDs.Count > 0) 610 if (itemIDs.Count > 0)
748 { 611 {
749 InventoryItemBase[] linked = m_InventoryService.GetMultipleItems(freq.owner_id, itemIDs.ToArray()); 612 InventoryItemBase[] linked = m_InventoryService.GetMultipleItems(freq.owner_id, itemIDs.ToArray());
@@ -758,13 +621,11 @@ from docs seems this was never a spec
758 linked[i++] = m_InventoryService.GetItem(freq.owner_id, id); 621 linked[i++] = m_InventoryService.GetItem(freq.owner_id, id);
759 } 622 }
760 } 623 }
761 624
762 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Processing folder {0}. Existing items:", freq.folder_id);
763 //foreach (InventoryItemBase item in itemsToReturn)
764 // m_log.DebugFormat("[XXX]: {0} {1} {2}", item.Name, item.AssetType, item.Folder);
765
766 if (linked != null) 625 if (linked != null)
767 { 626 {
627 List<InventoryItemBase> linkedItems = new List<InventoryItemBase>();
628 // check for broken
768 foreach (InventoryItemBase linkedItem in linked) 629 foreach (InventoryItemBase linkedItem in linked)
769 { 630 {
770 // Take care of genuinely broken links where the target doesn't exist 631 // Take care of genuinely broken links where the target doesn't exist
@@ -773,14 +634,16 @@ from docs seems this was never a spec
773 // rather than having to keep track of every folder requested in the recursion. 634 // rather than having to keep track of every folder requested in the recursion.
774 if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) 635 if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
775 { 636 {
776 itemsToReturn.Insert(0, linkedItem); 637 linkedItems.Add(linkedItem);
777 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Added {0} {1} {2}", linkedItem.Name, linkedItem.AssetType, linkedItem.Folder); 638 //m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Added {0} {1} {2}", linkedItem.Name, linkedItem.AssetType, linkedItem.Folder);
778 } 639 }
779 } 640 }
641 // insert them
642 if(linkedItems.Count > 0)
643 contents.Items.InsertRange(0,linkedItems);
780 } 644 }
781 } 645 }
782 } 646 }
783
784 } 647 }
785 648
786 /// <summary> 649 /// <summary>
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
index a9b81f3..a0471bb 100644
--- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -64,10 +64,7 @@ namespace OpenSim.Capabilities.Handlers
64 Hashtable ret = new Hashtable(); 64 Hashtable ret = new Hashtable();
65 ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound; 65 ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound;
66 ret["content_type"] = "text/plain"; 66 ret["content_type"] = "text/plain";
67 ret["keepalive"] = false;
68 ret["reusecontext"] = false;
69 ret["int_bytes"] = 0; 67 ret["int_bytes"] = 0;
70 ret["int_lod"] = 0;
71 string MeshStr = (string)request["mesh_id"]; 68 string MeshStr = (string)request["mesh_id"];
72 69
73 70
@@ -76,6 +73,8 @@ namespace OpenSim.Capabilities.Handlers
76 if (m_assetService == null) 73 if (m_assetService == null)
77 { 74 {
78 m_log.Error("[GETMESH]: Cannot fetch mesh " + MeshStr + " without an asset service"); 75 m_log.Error("[GETMESH]: Cannot fetch mesh " + MeshStr + " without an asset service");
76 ret["keepalive"] = false;
77 return ret;
79 } 78 }
80 79
81 UUID meshID; 80 UUID meshID;
@@ -101,10 +100,7 @@ namespace OpenSim.Capabilities.Handlers
101 Hashtable responsedata = new Hashtable(); 100 Hashtable responsedata = new Hashtable();
102 responsedata["int_response_code"] = 400; //501; //410; //404; 101 responsedata["int_response_code"] = 400; //501; //410; //404;
103 responsedata["content_type"] = "text/plain"; 102 responsedata["content_type"] = "text/plain";
104 responsedata["keepalive"] = false;
105 responsedata["str_response_string"] = "Request wasn't what was expected"; 103 responsedata["str_response_string"] = "Request wasn't what was expected";
106 responsedata["reusecontext"] = false;
107 responsedata["int_lod"] = 0;
108 responsedata["int_bytes"] = 0; 104 responsedata["int_bytes"] = 0;
109 105
110 string meshStr = string.Empty; 106 string meshStr = string.Empty;
@@ -118,10 +114,8 @@ namespace OpenSim.Capabilities.Handlers
118 if (m_assetService == null) 114 if (m_assetService == null)
119 { 115 {
120 responsedata["int_response_code"] = 404; //501; //410; //404; 116 responsedata["int_response_code"] = 404; //501; //410; //404;
121 responsedata["content_type"] = "text/plain";
122 responsedata["keepalive"] = false; 117 responsedata["keepalive"] = false;
123 responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh."; 118 responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh.";
124 responsedata["reusecontext"] = false;
125 return responsedata; 119 return responsedata;
126 } 120 }
127 121
@@ -155,10 +149,7 @@ namespace OpenSim.Capabilities.Handlers
155 { 149 {
156 responsedata["int_response_code"] = 404; //501; //410; //404; 150 responsedata["int_response_code"] = 404; //501; //410; //404;
157 responsedata["content_type"] = "text/plain"; 151 responsedata["content_type"] = "text/plain";
158 responsedata["keepalive"] = false;
159 responsedata["str_response_string"] = "This range doesnt exist."; 152 responsedata["str_response_string"] = "This range doesnt exist.";
160 responsedata["reusecontext"] = false;
161 responsedata["int_lod"] = 3;
162 return responsedata; 153 return responsedata;
163 } 154 }
164 else 155 else
@@ -169,28 +160,11 @@ namespace OpenSim.Capabilities.Handlers
169 160
170 //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); 161 //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
171 162
172 if (start > 20000)
173 {
174 responsedata["int_lod"] = 3;
175 }
176 else if (start < 4097)
177 {
178 responsedata["int_lod"] = 1;
179 }
180 else
181 {
182 responsedata["int_lod"] = 2;
183 }
184
185
186 if (start == 0 && len == mesh.Data.Length) // well redudante maybe 163 if (start == 0 && len == mesh.Data.Length) // well redudante maybe
187 { 164 {
188 responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.OK; 165 responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.OK;
189 responsedata["bin_response_data"] = mesh.Data; 166 responsedata["bin_response_data"] = mesh.Data;
190 responsedata["int_bytes"] = mesh.Data.Length; 167 responsedata["int_bytes"] = mesh.Data.Length;
191 responsedata["reusecontext"] = false;
192 responsedata["int_lod"] = 3;
193
194 } 168 }
195 else 169 else
196 { 170 {
@@ -203,7 +177,6 @@ namespace OpenSim.Capabilities.Handlers
203 Array.Copy(mesh.Data, start, d, 0, len); 177 Array.Copy(mesh.Data, start, d, 0, len);
204 responsedata["bin_response_data"] = d; 178 responsedata["bin_response_data"] = d;
205 responsedata["int_bytes"] = len; 179 responsedata["int_bytes"] = len;
206 responsedata["reusecontext"] = false;
207 } 180 }
208 } 181 }
209 } 182 }
@@ -213,8 +186,6 @@ namespace OpenSim.Capabilities.Handlers
213 responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data); 186 responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
214 responsedata["content_type"] = "application/vnd.ll.mesh"; 187 responsedata["content_type"] = "application/vnd.ll.mesh";
215 responsedata["int_response_code"] = 200; 188 responsedata["int_response_code"] = 200;
216 responsedata["reusecontext"] = false;
217 responsedata["int_lod"] = 3;
218 } 189 }
219 } 190 }
220 else 191 else
@@ -222,8 +193,6 @@ namespace OpenSim.Capabilities.Handlers
222 responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data); 193 responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
223 responsedata["content_type"] = "application/vnd.ll.mesh"; 194 responsedata["content_type"] = "application/vnd.ll.mesh";
224 responsedata["int_response_code"] = 200; 195 responsedata["int_response_code"] = 200;
225 responsedata["reusecontext"] = false;
226 responsedata["int_lod"] = 3;
227 } 196 }
228 } 197 }
229 // Optionally add additional mesh types here 198 // Optionally add additional mesh types here
@@ -231,10 +200,7 @@ namespace OpenSim.Capabilities.Handlers
231 { 200 {
232 responsedata["int_response_code"] = 404; //501; //410; //404; 201 responsedata["int_response_code"] = 404; //501; //410; //404;
233 responsedata["content_type"] = "text/plain"; 202 responsedata["content_type"] = "text/plain";
234 responsedata["keepalive"] = false;
235 responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh."; 203 responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
236 responsedata["reusecontext"] = false;
237 responsedata["int_lod"] = 1;
238 return responsedata; 204 return responsedata;
239 } 205 }
240 } 206 }
@@ -242,10 +208,7 @@ namespace OpenSim.Capabilities.Handlers
242 { 208 {
243 responsedata["int_response_code"] = 404; //501; //410; //404; 209 responsedata["int_response_code"] = 404; //501; //410; //404;
244 responsedata["content_type"] = "text/plain"; 210 responsedata["content_type"] = "text/plain";
245 responsedata["keepalive"] = false;
246 responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!"; 211 responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
247 responsedata["reusecontext"] = false;
248 responsedata["int_lod"] = 0;
249 return responsedata; 212 return responsedata;
250 } 213 }
251 } 214 }
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs
index f59c902..ddd9578 100644
--- a/OpenSim/Framework/Console/RemoteConsole.cs
+++ b/OpenSim/Framework/Console/RemoteConsole.cs
@@ -403,7 +403,7 @@ namespace OpenSim.Framework.Console
403 string uri = "/ReadResponses/" + sessionID.ToString() + "/"; 403 string uri = "/ReadResponses/" + sessionID.ToString() + "/";
404 404
405 m_Server.AddPollServiceHTTPHandler( 405 m_Server.AddPollServiceHTTPHandler(
406 uri, new PollServiceEventArgs(null, uri, HasEvents, GetEvents, NoEvents, sessionID,25000)); // 25 secs timeout 406 uri, new PollServiceEventArgs(null, uri, HasEvents, GetEvents, NoEvents, null, sessionID,25000)); // 25 secs timeout
407 407
408 // Our reply is an XML document. 408 // Our reply is an XML document.
409 // TODO: Change this to Linq.Xml 409 // TODO: Change this to Linq.Xml
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs
index dfe9695..d79eb0d 100644
--- a/OpenSim/Framework/NetworkServersInfo.cs
+++ b/OpenSim/Framework/NetworkServersInfo.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework
37 public bool isSandbox; 37 public bool isSandbox;
38 public bool HttpUsesSSL = false; 38 public bool HttpUsesSSL = false;
39 public string HttpSSLCN = ""; 39 public string HttpSSLCN = "";
40 public string HttpSSLCertPath = "";
41 public string HttpSSLCNCertPass = "";
40 public uint httpSSLPort = 9001; 42 public uint httpSSLPort = 9001;
41 43
42 // "Out of band" managemnt https 44 // "Out of band" managemnt https
@@ -62,6 +64,8 @@ namespace OpenSim.Framework
62 (uint)config.Configs["Network"].GetInt("http_listener_sslport", ((int)ConfigSettings.DefaultRegionHttpPort+1)); 64 (uint)config.Configs["Network"].GetInt("http_listener_sslport", ((int)ConfigSettings.DefaultRegionHttpPort+1));
63 HttpUsesSSL = config.Configs["Network"].GetBoolean("http_listener_ssl", false); 65 HttpUsesSSL = config.Configs["Network"].GetBoolean("http_listener_ssl", false);
64 HttpSSLCN = config.Configs["Network"].GetString("http_listener_cn", "localhost"); 66 HttpSSLCN = config.Configs["Network"].GetString("http_listener_cn", "localhost");
67 HttpSSLCertPath = config.Configs["Network"].GetString("http_listener_cert_path", HttpSSLCertPath);
68 HttpSSLCNCertPass = config.Configs["Network"].GetString("http_listener_cert_pass", HttpSSLCNCertPass);
65 69
66 // "Out of band management https" 70 // "Out of band management https"
67 ssl_listener = config.Configs["Network"].GetBoolean("https_listener",false); 71 ssl_listener = config.Configs["Network"].GetBoolean("https_listener",false);
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index f761813..5111673 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -33,6 +33,9 @@ using System.Text;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using System.Timers; 35using System.Timers;
36using System.Net;
37using System.Net.Security;
38using System.Security.Cryptography.X509Certificates;
36using log4net; 39using log4net;
37using log4net.Appender; 40using log4net.Appender;
38using log4net.Core; 41using log4net.Core;
@@ -86,6 +89,26 @@ namespace OpenSim.Framework.Servers
86 m_osSecret = UUID.Random().ToString(); 89 m_osSecret = UUID.Random().ToString();
87 } 90 }
88 91
92 private static bool m_NoVerifyCertChain = false;
93 private static bool m_NoVerifyCertHostname = false;
94
95 public static bool ValidateServerCertificate(
96 object sender,
97 X509Certificate certificate,
98 X509Chain chain,
99 SslPolicyErrors sslPolicyErrors)
100 {
101 if (m_NoVerifyCertChain)
102 sslPolicyErrors &= ~SslPolicyErrors.RemoteCertificateChainErrors;
103
104 if (m_NoVerifyCertHostname)
105 sslPolicyErrors &= ~SslPolicyErrors.RemoteCertificateNameMismatch;
106
107 if (sslPolicyErrors == SslPolicyErrors.None)
108 return true;
109
110 return false;
111 }
89 /// <summary> 112 /// <summary>
90 /// Must be overriden by child classes for their own server specific startup behaviour. 113 /// Must be overriden by child classes for their own server specific startup behaviour.
91 /// </summary> 114 /// </summary>
@@ -96,6 +119,11 @@ namespace OpenSim.Framework.Servers
96 RegisterCommonComponents(Config); 119 RegisterCommonComponents(Config);
97 120
98 IConfig startupConfig = Config.Configs["Startup"]; 121 IConfig startupConfig = Config.Configs["Startup"];
122
123 m_NoVerifyCertChain = startupConfig.GetBoolean("NoVerifyCertChain", m_NoVerifyCertChain);
124 m_NoVerifyCertHostname = startupConfig.GetBoolean("NoVerifyCertHostname", m_NoVerifyCertHostname);
125 ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
126
99 int logShowStatsSeconds = startupConfig.GetInt("LogShowStatsSeconds", m_periodDiagnosticTimerMS / 1000); 127 int logShowStatsSeconds = startupConfig.GetInt("LogShowStatsSeconds", m_periodDiagnosticTimerMS / 1000);
100 m_periodDiagnosticTimerMS = logShowStatsSeconds * 1000; 128 m_periodDiagnosticTimerMS = logShowStatsSeconds * 1000;
101 m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics); 129 m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics);
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index fb92b92..516604a 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -32,6 +32,7 @@ using System.Collections.Specialized;
32using System.IO; 32using System.IO;
33using System.Net; 33using System.Net;
34using System.Net.Sockets; 34using System.Net.Sockets;
35using System.Net.Security;
35using System.Security.Cryptography.X509Certificates; 36using System.Security.Cryptography.X509Certificates;
36using System.Reflection; 37using System.Reflection;
37using System.Globalization; 38using System.Globalization;
@@ -43,10 +44,11 @@ using log4net;
43using Nwc.XmlRpc; 44using Nwc.XmlRpc;
44using OpenMetaverse.StructuredData; 45using OpenMetaverse.StructuredData;
45using CoolHTTPListener = HttpServer.HttpListener; 46using CoolHTTPListener = HttpServer.HttpListener;
46using HttpListener=System.Net.HttpListener; 47using HttpListener = System.Net.HttpListener;
47using LogPrio=HttpServer.LogPrio; 48using LogPrio = HttpServer.LogPrio;
48using OpenSim.Framework.Monitoring; 49using OpenSim.Framework.Monitoring;
49using System.IO.Compression; 50using System.IO.Compression;
51using System.Security.Cryptography;
50 52
51namespace OpenSim.Framework.Servers.HttpServer 53namespace OpenSim.Framework.Servers.HttpServer
52{ 54{
@@ -107,19 +109,26 @@ namespace OpenSim.Framework.Servers.HttpServer
107 new Dictionary<string, WebSocketRequestDelegate>(); 109 new Dictionary<string, WebSocketRequestDelegate>();
108 110
109 protected uint m_port; 111 protected uint m_port;
110 protected uint m_sslport;
111 protected bool m_ssl; 112 protected bool m_ssl;
112 private X509Certificate2 m_cert; 113 private X509Certificate2 m_cert;
113 protected bool m_firstcaps = true;
114 protected string m_SSLCommonName = ""; 114 protected string m_SSLCommonName = "";
115 protected List<string> m_certNames = new List<string>();
116 protected List<string> m_certIPs = new List<string>();
117 protected string m_certCN= "";
118 protected RemoteCertificateValidationCallback m_certificateValidationCallback = null;
115 119
116 protected IPAddress m_listenIPAddress = IPAddress.Any; 120 protected IPAddress m_listenIPAddress = IPAddress.Any;
117 121
118 public PollServiceRequestManager PollServiceRequestManager { get; private set; } 122 public PollServiceRequestManager PollServiceRequestManager { get; private set; }
119 123
124 public string Protocol
125 {
126 get { return m_ssl ? "https://" : "http://"; }
127 }
128
120 public uint SSLPort 129 public uint SSLPort
121 { 130 {
122 get { return m_sslport; } 131 get { return m_port; }
123 } 132 }
124 133
125 public string SSLCommonName 134 public string SSLCommonName
@@ -148,27 +157,151 @@ namespace OpenSim.Framework.Servers.HttpServer
148 m_port = port; 157 m_port = port;
149 } 158 }
150 159
151 public BaseHttpServer(uint port, bool ssl) : this (port) 160 private void load_cert(string CPath, string CPass)
152 { 161 {
153 m_ssl = ssl; 162 try
163 {
164 m_cert = new X509Certificate2(CPath, CPass);
165 X509Extension ext = m_cert.Extensions["2.5.29.17"];
166 if(ext != null)
167 {
168 AsnEncodedData asndata = new AsnEncodedData(ext.Oid, ext.RawData);
169 string datastr = asndata.Format(true);
170 string[] lines = datastr.Split(new char[] {'\n','\r'});
171 foreach(string s in lines)
172 {
173 if(String.IsNullOrEmpty(s))
174 continue;
175 string[] parts = s.Split(new char[] {'='});
176 if(String.IsNullOrEmpty(parts[0]))
177 continue;
178 string entryName = parts[0].Replace(" ","");
179 if(entryName == "DNSName")
180 m_certNames.Add(parts[1]);
181 else if(entryName == "IPAddress")
182 m_certIPs.Add(parts[1]);
183 }
184 }
185 m_certCN = m_cert.GetNameInfo(X509NameType.SimpleName, false);
186 }
187 catch
188 {
189 throw new Exception("SSL cert load error");
190 }
154 } 191 }
155 192
156 public BaseHttpServer(uint port, bool ssl, uint sslport, string CN) : this (port, ssl) 193 public BaseHttpServer(uint port, bool ssl, string CN, string CPath, string CPass)
157 { 194 {
158 if (m_ssl) 195 m_port = port;
196 if (ssl)
159 { 197 {
160 m_sslport = sslport; 198 if(string.IsNullOrEmpty(CPath))
199 throw new Exception("invalid main http server cert path");
200
201 if(Uri.CheckHostName(CN) == UriHostNameType.Unknown)
202 throw new Exception("invalid main http server CN (ExternalHostName)");
203
204 m_certNames.Clear();
205 m_certIPs.Clear();
206 m_certCN= "";
207
208 m_ssl = true;
209 load_cert(CPath, CPass);
210
211 if(!CheckSSLCertHost(CN))
212 throw new Exception("invalid main http server CN (ExternalHostName)");
213
214 m_SSLCommonName = CN;
215
216 if(m_cert.Issuer == m_cert.Subject )
217 m_log.Warn("Self signed certificate. Clients need to allow this (some viewers debug option NoVerifySSLcert must be set to true");
161 } 218 }
219 else
220 m_ssl = false;
162 } 221 }
163 222
164 public BaseHttpServer(uint port, bool ssl, string CPath, string CPass) : this (port, ssl) 223 public BaseHttpServer(uint port, bool ssl, string CPath, string CPass)
165 { 224 {
166 if (m_ssl) 225 m_port = port;
226 if (ssl)
167 { 227 {
168 m_cert = new X509Certificate2(CPath, CPass); 228 load_cert(CPath, CPass);
229 if(m_cert.Issuer == m_cert.Subject )
230 m_log.Warn("Self signed certificate. Http clients need to allow this");
231 m_ssl = true;
232 }
233 else
234 m_ssl = false;
235 }
236
237 static bool MatchDNS (string hostname, string dns)
238 {
239 int indx = dns.IndexOf ('*');
240 if (indx == -1)
241 return (String.Compare(hostname, dns, true, CultureInfo.InvariantCulture) == 0);
242
243 int dnslen = dns.Length;
244 dnslen--;
245 if(indx == dnslen)
246 return true; // just * ?
247
248 if(indx > dnslen - 2)
249 return false; // 2 short ?
250
251 if (dns[indx + 1] != '.')
252 return false;
253
254 int indx2 = dns.IndexOf ('*', indx + 1);
255 if (indx2 != -1)
256 return false; // there can only be one;
257
258 string end = dns.Substring(indx + 1);
259 int hostlen = hostname.Length;
260 int endlen = end.Length;
261 int length = hostlen - endlen;
262 if (length <= 0)
263 return false;
264
265 if (String.Compare(hostname, length, end, 0, endlen, true, CultureInfo.InvariantCulture) != 0)
266 return false;
267
268 if (indx == 0)
269 {
270 indx2 = hostname.IndexOf ('.');
271 return ((indx2 == -1) || (indx2 >= length));
272 }
273
274 string start = dns.Substring (0, indx);
275 return (String.Compare (hostname, 0, start, 0, start.Length, true, CultureInfo.InvariantCulture) == 0);
276 }
277
278 public bool CheckSSLCertHost(string hostname)
279 {
280 UriHostNameType htype = Uri.CheckHostName(hostname);
281
282 if(htype == UriHostNameType.Unknown || htype == UriHostNameType.Basic)
283 return false;
284 if(htype == UriHostNameType.Dns)
285 {
286 foreach(string name in m_certNames)
287 {
288 if(MatchDNS(hostname, name))
289 return true;
290 }
291 if(MatchDNS(hostname, m_certCN))
292 return true;
293 }
294 else
295 {
296 foreach(string ip in m_certIPs)
297 {
298 if (String.Compare(hostname, ip, true, CultureInfo.InvariantCulture) != 0)
299 return true;
300 }
169 } 301 }
170 }
171 302
303 return false;
304 }
172 /// <summary> 305 /// <summary>
173 /// Add a stream handler to the http server. If the handler already exists, then nothing happens. 306 /// Add a stream handler to the http server. If the handler already exists, then nothing happens.
174 /// </summary> 307 /// </summary>
@@ -396,14 +529,10 @@ namespace OpenSim.Framework.Servers.HttpServer
396 if (psEvArgs.Request != null) 529 if (psEvArgs.Request != null)
397 { 530 {
398 OSHttpRequest req = new OSHttpRequest(context, request); 531 OSHttpRequest req = new OSHttpRequest(context, request);
399 532 string requestBody = String.Empty;
400 Stream requestStream = req.InputStream;
401
402 Encoding encoding = Encoding.UTF8; 533 Encoding encoding = Encoding.UTF8;
403 StreamReader reader = new StreamReader(requestStream, encoding); 534 using(StreamReader reader = new StreamReader(req.InputStream, encoding))
404 535 requestBody = reader.ReadToEnd();
405 string requestBody = reader.ReadToEnd();
406 reader.Close();
407 536
408 Hashtable keysvals = new Hashtable(); 537 Hashtable keysvals = new Hashtable();
409 Hashtable headervals = new Hashtable(); 538 Hashtable headervals = new Hashtable();
@@ -461,7 +590,7 @@ namespace OpenSim.Framework.Servers.HttpServer
461 } 590 }
462 591
463 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); 592 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
464 resp.ReuseContext = true; 593// resp.ReuseContext = true;
465// resp.ReuseContext = false; 594// resp.ReuseContext = false;
466 HandleRequest(req, resp); 595 HandleRequest(req, resp);
467 596
@@ -497,6 +626,8 @@ namespace OpenSim.Framework.Servers.HttpServer
497 byte[] buffer500 = SendHTML500(response); 626 byte[] buffer500 = SendHTML500(response);
498 response.OutputStream.Write(buffer500, 0, buffer500.Length); 627 response.OutputStream.Write(buffer500, 0, buffer500.Length);
499 response.Send(); 628 response.Send();
629 if(request.InputStream.CanRead)
630 request.InputStream.Close();
500 } 631 }
501 catch 632 catch
502 { 633 {
@@ -541,7 +672,6 @@ namespace OpenSim.Framework.Servers.HttpServer
541// } 672// }
542// } 673// }
543 674
544 //response.KeepAlive = true;
545 response.SendChunked = false; 675 response.SendChunked = false;
546 676
547 string path = request.RawUrl; 677 string path = request.RawUrl;
@@ -565,15 +695,10 @@ namespace OpenSim.Framework.Servers.HttpServer
565 { 695 {
566 //m_log.Debug("[BASE HTTP SERVER]: Found Caps based HTTP Handler"); 696 //m_log.Debug("[BASE HTTP SERVER]: Found Caps based HTTP Handler");
567 IGenericHTTPHandler HTTPRequestHandler = requestHandler as IGenericHTTPHandler; 697 IGenericHTTPHandler HTTPRequestHandler = requestHandler as IGenericHTTPHandler;
568 Stream requestStream = request.InputStream; 698 string requestBody = String.Empty;
569
570 Encoding encoding = Encoding.UTF8; 699 Encoding encoding = Encoding.UTF8;
571 StreamReader reader = new StreamReader(requestStream, encoding); 700 using(StreamReader reader = new StreamReader(request.InputStream, encoding))
572 701 requestBody = reader.ReadToEnd();
573 string requestBody = reader.ReadToEnd();
574
575 reader.Close();
576 //requestStream.Close();
577 702
578 Hashtable keysvals = new Hashtable(); 703 Hashtable keysvals = new Hashtable();
579 Hashtable headervals = new Hashtable(); 704 Hashtable headervals = new Hashtable();
@@ -613,7 +738,6 @@ namespace OpenSim.Framework.Servers.HttpServer
613 else 738 else
614 { 739 {
615 IStreamHandler streamHandler = (IStreamHandler)requestHandler; 740 IStreamHandler streamHandler = (IStreamHandler)requestHandler;
616
617 using (MemoryStream memoryStream = new MemoryStream()) 741 using (MemoryStream memoryStream = new MemoryStream())
618 { 742 {
619 streamHandler.Handle(path, request.InputStream, memoryStream, request, response); 743 streamHandler.Handle(path, request.InputStream, memoryStream, request, response);
@@ -690,8 +814,6 @@ namespace OpenSim.Framework.Servers.HttpServer
690 } 814 }
691 } 815 }
692 816
693 request.InputStream.Close();
694
695 if (buffer != null) 817 if (buffer != null)
696 { 818 {
697 if (WebUtil.DebugLevel >= 5) 819 if (WebUtil.DebugLevel >= 5)
@@ -723,10 +845,6 @@ namespace OpenSim.Framework.Servers.HttpServer
723 requestEndTick = Environment.TickCount; 845 requestEndTick = Environment.TickCount;
724 846
725 response.Send(); 847 response.Send();
726
727 //response.OutputStream.Close();
728
729 //response.FreeContext();
730 } 848 }
731 catch (SocketException e) 849 catch (SocketException e)
732 { 850 {
@@ -758,6 +876,9 @@ namespace OpenSim.Framework.Servers.HttpServer
758 } 876 }
759 finally 877 finally
760 { 878 {
879 if(request.InputStream.CanRead)
880 request.InputStream.Close();
881
761 // Every month or so this will wrap and give bad numbers, not really a problem 882 // Every month or so this will wrap and give bad numbers, not really a problem
762 // since its just for reporting 883 // since its just for reporting
763 int tickdiff = requestEndTick - requestStartTick; 884 int tickdiff = requestEndTick - requestStartTick;
@@ -1015,9 +1136,10 @@ namespace OpenSim.Framework.Servers.HttpServer
1015 } 1136 }
1016 finally 1137 finally
1017 { 1138 {
1018 if (innerStream != null) 1139 if (innerStream != null && innerStream.CanRead)
1019 innerStream.Dispose(); 1140 innerStream.Dispose();
1020 requestStream.Dispose(); 1141 if (requestStream.CanRead)
1142 requestStream.Dispose();
1021 } 1143 }
1022 1144
1023 //m_log.Debug(requestBody); 1145 //m_log.Debug(requestBody);
@@ -1098,6 +1220,17 @@ namespace OpenSim.Framework.Servers.HttpServer
1098 1220
1099 if (gridproxy) 1221 if (gridproxy)
1100 xmlRprcRequest.Params.Add("gridproxy"); // Param[4] 1222 xmlRprcRequest.Params.Add("gridproxy"); // Param[4]
1223
1224 // reserve this for
1225 // ... by Fumi.Iseki for DTLNSLMoneyServer
1226 // BUT make its presence possible to detect/parse
1227 string rcn = request.IHttpClientContext.SSLCommonName;
1228 if(!string.IsNullOrWhiteSpace(rcn))
1229 {
1230 rcn = "SSLCN:" + rcn;
1231 xmlRprcRequest.Params.Add(rcn); // Param[4] or Param[5]
1232 }
1233
1101 try 1234 try
1102 { 1235 {
1103 xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint); 1236 xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint);
@@ -1263,15 +1396,15 @@ namespace OpenSim.Framework.Servers.HttpServer
1263 //m_log.Warn("[BASE HTTP SERVER]: We've figured out it's a LLSD Request"); 1396 //m_log.Warn("[BASE HTTP SERVER]: We've figured out it's a LLSD Request");
1264 Stream requestStream = request.InputStream; 1397 Stream requestStream = request.InputStream;
1265 1398
1399 string requestBody = string.Empty;
1266 Encoding encoding = Encoding.UTF8; 1400 Encoding encoding = Encoding.UTF8;
1267 StreamReader reader = new StreamReader(requestStream, encoding); 1401 using(StreamReader reader = new StreamReader(requestStream,encoding))
1402 requestBody = reader.ReadToEnd();
1268 1403
1269 string requestBody = reader.ReadToEnd(); 1404 if(requestStream.CanRead)
1270 reader.Close(); 1405 requestStream.Close();
1271 requestStream.Close();
1272 1406
1273 //m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody); 1407 //m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
1274 response.KeepAlive = true;
1275 1408
1276 OSD llsdRequest = null; 1409 OSD llsdRequest = null;
1277 OSD llsdResponse = null; 1410 OSD llsdResponse = null;
@@ -1592,15 +1725,12 @@ namespace OpenSim.Framework.Servers.HttpServer
1592 byte[] buffer; 1725 byte[] buffer;
1593 1726
1594 Stream requestStream = request.InputStream; 1727 Stream requestStream = request.InputStream;
1595 1728 string requestBody = string.Empty;
1596 Encoding encoding = Encoding.UTF8; 1729 Encoding encoding = Encoding.UTF8;
1597 StreamReader reader = new StreamReader(requestStream, encoding); 1730 using(StreamReader reader = new StreamReader(requestStream,encoding))
1598 1731 requestBody = reader.ReadToEnd();
1599 string requestBody = reader.ReadToEnd(); 1732 if(requestStream.CanRead)
1600 // avoid warning for now 1733 requestStream.Close();
1601 reader.ReadToEnd();
1602 reader.Close();
1603 requestStream.Close();
1604 1734
1605 Hashtable keysvals = new Hashtable(); 1735 Hashtable keysvals = new Hashtable();
1606 Hashtable headervals = new Hashtable(); 1736 Hashtable headervals = new Hashtable();
@@ -1804,7 +1934,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1804*/ 1934*/
1805 // disable this things 1935 // disable this things
1806 response.KeepAlive = false; 1936 response.KeepAlive = false;
1807 response.ReuseContext = false; 1937 // response.ReuseContext = false;
1808 1938
1809 // Cross-Origin Resource Sharing with simple requests 1939 // Cross-Origin Resource Sharing with simple requests
1810 if (responsedata.ContainsKey("access_control_allow_origin")) 1940 if (responsedata.ContainsKey("access_control_allow_origin"))
@@ -1906,7 +2036,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1906 2036
1907 public void Start() 2037 public void Start()
1908 { 2038 {
1909 Start(true); 2039 Start(true,true);
1910 } 2040 }
1911 2041
1912 /// <summary> 2042 /// <summary>
@@ -1916,7 +2046,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1916 /// If true then poll responses are performed asynchronsly. 2046 /// If true then poll responses are performed asynchronsly.
1917 /// Option exists to allow regression tests to perform processing synchronously. 2047 /// Option exists to allow regression tests to perform processing synchronously.
1918 /// </param> 2048 /// </param>
1919 public void Start(bool performPollResponsesAsync) 2049 public void Start(bool performPollResponsesAsync, bool runPool)
1920 { 2050 {
1921 m_log.InfoFormat( 2051 m_log.InfoFormat(
1922 "[BASE HTTP SERVER]: Starting {0} server on port {1}", UseSSL ? "HTTPS" : "HTTP", Port); 2052 "[BASE HTTP SERVER]: Starting {0} server on port {1}", UseSSL ? "HTTPS" : "HTTP", Port);
@@ -1945,6 +2075,8 @@ namespace OpenSim.Framework.Servers.HttpServer
1945 //m_httpListener.Prefixes.Add("https://+:" + (m_sslport) + "/"); 2075 //m_httpListener.Prefixes.Add("https://+:" + (m_sslport) + "/");
1946 //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); 2076 //m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
1947 m_httpListener2 = CoolHTTPListener.Create(IPAddress.Any, (int)m_port, m_cert); 2077 m_httpListener2 = CoolHTTPListener.Create(IPAddress.Any, (int)m_port, m_cert);
2078 if(m_certificateValidationCallback != null)
2079 m_httpListener2.CertificateValidationCallback = m_certificateValidationCallback;
1948 m_httpListener2.ExceptionThrown += httpServerException; 2080 m_httpListener2.ExceptionThrown += httpServerException;
1949 m_httpListener2.LogWriter = httpserverlog; 2081 m_httpListener2.LogWriter = httpserverlog;
1950 } 2082 }
@@ -1954,9 +2086,11 @@ namespace OpenSim.Framework.Servers.HttpServer
1954 m_httpListener2.Start(64); 2086 m_httpListener2.Start(64);
1955 2087
1956 // Long Poll Service Manager with 3 worker threads a 25 second timeout for no events 2088 // Long Poll Service Manager with 3 worker threads a 25 second timeout for no events
1957 2089 if(runPool)
1958 PollServiceRequestManager = new PollServiceRequestManager(this, performPollResponsesAsync, 2, 25000); 2090 {
1959 PollServiceRequestManager.Start(); 2091 PollServiceRequestManager = new PollServiceRequestManager(this, performPollResponsesAsync, 2, 25000);
2092 PollServiceRequestManager.Start();
2093 }
1960 2094
1961 HTTPDRunning = true; 2095 HTTPDRunning = true;
1962 2096
@@ -1970,7 +2104,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1970 catch (Exception e) 2104 catch (Exception e)
1971 { 2105 {
1972 m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); 2106 m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message);
1973 m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); 2107 m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + "?");
1974 2108
1975 // We want this exception to halt the entire server since in current configurations we aren't too 2109 // We want this exception to halt the entire server since in current configurations we aren't too
1976 // useful without inbound HTTP. 2110 // useful without inbound HTTP.
@@ -2135,10 +2269,9 @@ namespace OpenSim.Framework.Servers.HttpServer
2135 string file = Path.Combine(".", "http_500.html"); 2269 string file = Path.Combine(".", "http_500.html");
2136 if (!File.Exists(file)) 2270 if (!File.Exists(file))
2137 return getDefaultHTTP500(); 2271 return getDefaultHTTP500();
2138 2272 string result = string.Empty;
2139 StreamReader sr = File.OpenText(file); 2273 using(StreamReader sr = File.OpenText(file))
2140 string result = sr.ReadToEnd(); 2274 result = sr.ReadToEnd();
2141 sr.Close();
2142 return result; 2275 return result;
2143 } 2276 }
2144 2277
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs
index f61b090..d26b68a 100644
--- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Servers.HttpServer
118 /// </summary> 118 /// </summary>
119 string StatusDescription { get; set; } 119 string StatusDescription { get; set; }
120 120
121 bool ReuseContext { get; set; } 121// bool ReuseContext { get; set; }
122 122
123 /// <summary> 123 /// <summary>
124 /// Add a header field and content to the response. 124 /// Add a header field and content to the response.
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
index d7744fc..8e1b545 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
@@ -256,7 +256,7 @@ namespace OpenSim.Framework.Servers.HttpServer
256 _httpResponse.Reason = value; 256 _httpResponse.Reason = value;
257 } 257 }
258 } 258 }
259 259/*
260 public bool ReuseContext 260 public bool ReuseContext
261 { 261 {
262 get 262 get
@@ -275,7 +275,7 @@ namespace OpenSim.Framework.Servers.HttpServer
275 } 275 }
276 } 276 }
277 } 277 }
278 278*/
279 protected IHttpResponse _httpResponse; 279 protected IHttpResponse _httpResponse;
280 private IHttpClientContext _httpClientContext; 280 private IHttpClientContext _httpClientContext;
281 281
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index 8ace7a9..a1bc27b 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -37,6 +37,7 @@ namespace OpenSim.Framework.Servers.HttpServer
37 public delegate Hashtable GetEventsMethod(UUID requestID, UUID pId); 37 public delegate Hashtable GetEventsMethod(UUID requestID, UUID pId);
38 38
39 public delegate Hashtable NoEventsMethod(UUID requestID, UUID pId); 39 public delegate Hashtable NoEventsMethod(UUID requestID, UUID pId);
40 public delegate void DropMethod(UUID requestID, UUID pId);
40 41
41 public class PollServiceEventArgs : EventArgs 42 public class PollServiceEventArgs : EventArgs
42 { 43 {
@@ -44,6 +45,7 @@ namespace OpenSim.Framework.Servers.HttpServer
44 public GetEventsMethod GetEvents; 45 public GetEventsMethod GetEvents;
45 public NoEventsMethod NoEvents; 46 public NoEventsMethod NoEvents;
46 public RequestMethod Request; 47 public RequestMethod Request;
48 public DropMethod Drop;
47 public UUID Id; 49 public UUID Id;
48 public int TimeOutms; 50 public int TimeOutms;
49 public EventType Type; 51 public EventType Type;
@@ -73,13 +75,14 @@ namespace OpenSim.Framework.Servers.HttpServer
73 RequestMethod pRequest, 75 RequestMethod pRequest,
74 string pUrl, 76 string pUrl,
75 HasEventsMethod pHasEvents, GetEventsMethod pGetEvents, NoEventsMethod pNoEvents, 77 HasEventsMethod pHasEvents, GetEventsMethod pGetEvents, NoEventsMethod pNoEvents,
76 UUID pId, int pTimeOutms) 78 DropMethod pDrop, UUID pId, int pTimeOutms)
77 { 79 {
78 Request = pRequest; 80 Request = pRequest;
79 Url = pUrl; 81 Url = pUrl;
80 HasEvents = pHasEvents; 82 HasEvents = pHasEvents;
81 GetEvents = pGetEvents; 83 GetEvents = pGetEvents;
82 NoEvents = pNoEvents; 84 NoEvents = pNoEvents;
85 Drop = pDrop;
83 Id = pId; 86 Id = pId;
84 TimeOutms = pTimeOutms; 87 TimeOutms = pTimeOutms;
85 Type = EventType.LongPoll; 88 Type = EventType.LongPoll;
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
index 0e4a941..6537f64 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
@@ -47,8 +47,10 @@ namespace OpenSim.Framework.Servers.HttpServer
47 public readonly UUID RequestID; 47 public readonly UUID RequestID;
48 public int contextHash; 48 public int contextHash;
49 49
50/*
50 private void GenContextHash() 51 private void GenContextHash()
51 { 52 {
53
52 Random rnd = new Random(); 54 Random rnd = new Random();
53 contextHash = 0; 55 contextHash = 0;
54 if (Request.Headers["remote_addr"] != null) 56 if (Request.Headers["remote_addr"] != null)
@@ -62,8 +64,9 @@ namespace OpenSim.Framework.Servers.HttpServer
62 } 64 }
63 else 65 else
64 contextHash += rnd.Next() & 0xffff; 66 contextHash += rnd.Next() & 0xffff;
65 }
66 67
68 }
69*/
67 public PollServiceHttpRequest( 70 public PollServiceHttpRequest(
68 PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest) 71 PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest)
69 { 72 {
@@ -72,7 +75,8 @@ namespace OpenSim.Framework.Servers.HttpServer
72 Request = pRequest; 75 Request = pRequest;
73 RequestTime = System.Environment.TickCount; 76 RequestTime = System.Environment.TickCount;
74 RequestID = UUID.Random(); 77 RequestID = UUID.Random();
75 GenContextHash(); 78// GenContextHash();
79 contextHash = HttpContext.contextID;
76 } 80 }
77 81
78 internal void DoHTTPGruntWork(BaseHttpServer server, Hashtable responsedata) 82 internal void DoHTTPGruntWork(BaseHttpServer server, Hashtable responsedata)
@@ -85,7 +89,7 @@ namespace OpenSim.Framework.Servers.HttpServer
85 response.SendChunked = false; 89 response.SendChunked = false;
86 response.ContentLength64 = buffer.Length; 90 response.ContentLength64 = buffer.Length;
87 response.ContentEncoding = Encoding.UTF8; 91 response.ContentEncoding = Encoding.UTF8;
88 response.ReuseContext = false; 92// response.ReuseContext = false;
89 93
90 try 94 try
91 { 95 {
@@ -110,7 +114,7 @@ namespace OpenSim.Framework.Servers.HttpServer
110 response.SendChunked = false; 114 response.SendChunked = false;
111 response.ContentLength64 = 0; 115 response.ContentLength64 = 0;
112 response.ContentEncoding = Encoding.UTF8; 116 response.ContentEncoding = Encoding.UTF8;
113 response.ReuseContext = false; 117// response.ReuseContext = false;
114 response.KeepAlive = false; 118 response.KeepAlive = false;
115 response.SendChunked = false; 119 response.SendChunked = false;
116 response.StatusCode = 503; 120 response.StatusCode = 503;
@@ -132,8 +136,9 @@ namespace OpenSim.Framework.Servers.HttpServer
132 { 136 {
133 if (b1.contextHash != b2.contextHash) 137 if (b1.contextHash != b2.contextHash)
134 return false; 138 return false;
135 bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext); 139// bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext);
136 return b; 140// return b;
141 return true;
137 } 142 }
138 143
139 public int GetHashCode(PollServiceHttpRequest b2) 144 public int GetHashCode(PollServiceHttpRequest b2)
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 936146d..82c7727 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -160,6 +160,19 @@ namespace OpenSim.Framework.Servers.HttpServer
160 } 160 }
161 } 161 }
162 162
163 public void DropByContext(PollServiceHttpRequest req)
164 {
165 Queue<PollServiceHttpRequest> ctxQeueue;
166 lock (m_bycontext)
167 {
168 if (m_bycontext.TryGetValue(req, out ctxQeueue))
169 {
170 ctxQeueue.Clear();
171 m_bycontext.Remove(req);
172 }
173 }
174 }
175
163 public void EnqueueInt(PollServiceHttpRequest req) 176 public void EnqueueInt(PollServiceHttpRequest req)
164 { 177 {
165 if (m_running) 178 if (m_running)
@@ -263,22 +276,61 @@ namespace OpenSim.Framework.Servers.HttpServer
263 PollServiceHttpRequest req = m_requests.Dequeue(5000); 276 PollServiceHttpRequest req = m_requests.Dequeue(5000);
264 277
265 Watchdog.UpdateThread(); 278 Watchdog.UpdateThread();
266 if (req != null) 279 if(req == null)
280 continue;
281
282 try
267 { 283 {
268 try 284 if(!req.HttpContext.CanSend())
269 { 285 {
270 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) 286 req.PollServiceArgs.Drop(req.RequestID, req.PollServiceArgs.Id);
287 byContextDequeue(req);
288 continue;
289 }
290
291 if(req.HttpContext.IsSending())
292 {
293 if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms)
271 { 294 {
272 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id); 295 req.PollServiceArgs.Drop(req.RequestID, req.PollServiceArgs.Id);
296 byContextDequeue(req);
297 }
298 else
299 ReQueueEvent(req);
300 continue;
301 }
273 302
303 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
304 {
305 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id);
306
307 m_threadPool.QueueWorkItem(x =>
308 {
309 try
310 {
311 req.DoHTTPGruntWork(m_server, responsedata);
312 byContextDequeue(req);
313 }
314 catch (ObjectDisposedException) // Browser aborted before we could read body, server closed the stream
315 {
316 // Ignore it, no need to reply
317 }
318 return null;
319 }, null);
320 }
321 else
322 {
323 if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms)
324 {
274 m_threadPool.QueueWorkItem(x => 325 m_threadPool.QueueWorkItem(x =>
275 { 326 {
276 try 327 try
277 { 328 {
278 req.DoHTTPGruntWork(m_server, responsedata); 329 req.DoHTTPGruntWork(m_server,
330 req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id));
279 byContextDequeue(req); 331 byContextDequeue(req);
280 } 332 }
281 catch (ObjectDisposedException) // Browser aborted before we could read body, server closed the stream 333 catch (ObjectDisposedException)
282 { 334 {
283 // Ignore it, no need to reply 335 // Ignore it, no need to reply
284 } 336 }
@@ -287,36 +339,15 @@ namespace OpenSim.Framework.Servers.HttpServer
287 } 339 }
288 else 340 else
289 { 341 {
290 if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) 342 ReQueueEvent(req);
291 {
292 m_threadPool.QueueWorkItem(x =>
293 {
294 try
295 {
296 req.DoHTTPGruntWork(m_server,
297 req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id));
298 byContextDequeue(req);
299 }
300 catch (ObjectDisposedException)
301 {
302 // Ignore it, no need to reply
303 }
304 return null;
305 }, null);
306 }
307 else
308 {
309 ReQueueEvent(req);
310 }
311 } 343 }
312 } 344 }
313 catch (Exception e) 345 }
314 { 346 catch (Exception e)
315 m_log.ErrorFormat("Exception in poll service thread: " + e.ToString()); 347 {
316 } 348 m_log.ErrorFormat("Exception in poll service thread: " + e.ToString());
317 } 349 }
318 } 350 }
319 } 351 }
320
321 } 352 }
322} 353}
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs
index ea7b2b5..29308a9 100644
--- a/OpenSim/Framework/Servers/MainServer.cs
+++ b/OpenSim/Framework/Servers/MainServer.cs
@@ -42,6 +42,7 @@ namespace OpenSim.Framework.Servers
42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private static BaseHttpServer instance = null; 44 private static BaseHttpServer instance = null;
45 private static BaseHttpServer unsecureinstance = null;
45 private static Dictionary<uint, BaseHttpServer> m_Servers = new Dictionary<uint, BaseHttpServer>(); 46 private static Dictionary<uint, BaseHttpServer> m_Servers = new Dictionary<uint, BaseHttpServer>();
46 47
47 /// <summary> 48 /// <summary>
@@ -93,6 +94,21 @@ namespace OpenSim.Framework.Servers
93 } 94 }
94 } 95 }
95 96
97
98 public static BaseHttpServer ÚnSecureInstance
99 {
100 get { return unsecureinstance; }
101
102 set
103 {
104 lock (m_Servers)
105 if (!m_Servers.ContainsValue(value))
106 throw new Exception("HTTP server must already have been registered to be set as the main instance");
107
108 unsecureinstance = value;
109 }
110 }
111
96 /// <summary> 112 /// <summary>
97 /// Get all the registered servers. 113 /// Get all the registered servers.
98 /// </summary> 114 /// </summary>
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index b33e2c2..75dc741 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -351,7 +351,18 @@ namespace OpenSim
351 if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true)) 351 if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true))
352 WorkManager.JobEngine.Start(); 352 WorkManager.JobEngine.Start();
353 353
354 m_httpServerPort = m_networkServersInfo.HttpListenerPort; 354
355 if(m_networkServersInfo.HttpUsesSSL)
356 {
357 m_httpServerSSL = true;
358 m_httpServerPort = m_networkServersInfo.httpSSLPort;
359 }
360 else
361 {
362 m_httpServerSSL = false;
363 m_httpServerPort = m_networkServersInfo.HttpListenerPort;
364 }
365
355 SceneManager.OnRestartSim += HandleRestartRegion; 366 SceneManager.OnRestartSim += HandleRestartRegion;
356 367
357 // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is 368 // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is
@@ -404,7 +415,18 @@ namespace OpenSim
404 415
405 // set initial ServerURI 416 // set initial ServerURI
406 regionInfo.HttpPort = m_httpServerPort; 417 regionInfo.HttpPort = m_httpServerPort;
407 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; 418 if(m_httpServerSSL)
419 {
420 if(!m_httpServer.CheckSSLCertHost(regionInfo.ExternalHostName))
421 throw new Exception("main http cert CN doesn't match region External IP");
422
423 regionInfo.ServerURI = "https://" + regionInfo.ExternalHostName +
424 ":" + regionInfo.HttpPort.ToString() + "/";
425 }
426 else
427 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName +
428 ":" + regionInfo.HttpPort.ToString() + "/";
429
408 430
409 regionInfo.osSecret = m_osSecret; 431 regionInfo.osSecret = m_osSecret;
410 432
@@ -1103,10 +1125,10 @@ namespace OpenSim
1103 MainConsole.Instance.Output("Joining the estate failed. Please try again."); 1125 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
1104 } 1126 }
1105 } 1127 }
1106 } 1128 }
1107 1129
1108 return true; // need to update the database 1130 return true; // need to update the database
1109 } 1131 }
1110 } 1132 }
1111 1133
1112 public class OpenSimConfigSource 1134 public class OpenSimConfigSource
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs
index 83a9fff..7e8308e 100644
--- a/OpenSim/Region/Application/RegionApplicationBase.cs
+++ b/OpenSim/Region/Application/RegionApplicationBase.cs
@@ -50,6 +50,7 @@ namespace OpenSim
50 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); 50 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>();
51 protected NetworkServersInfo m_networkServersInfo; 51 protected NetworkServersInfo m_networkServersInfo;
52 protected uint m_httpServerPort; 52 protected uint m_httpServerPort;
53 protected bool m_httpServerSSL;
53 protected ISimulationDataService m_simulationDataService; 54 protected ISimulationDataService m_simulationDataService;
54 protected IEstateDataService m_estateDataService; 55 protected IEstateDataService m_estateDataService;
55 56
@@ -68,20 +69,37 @@ namespace OpenSim
68 69
69 Initialize(); 70 Initialize();
70 71
71 m_httpServer 72 uint mainport = m_networkServersInfo.HttpListenerPort;
72 = new BaseHttpServer( 73 uint mainSSLport = m_networkServersInfo.httpSSLPort;
73 m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
74 m_networkServersInfo.HttpSSLCN);
75 74
76 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) 75 if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport))
77 { 76 {
78 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); 77 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
79 } 78 }
80 79
81 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort); 80 if(m_networkServersInfo.HttpUsesSSL)
82 m_httpServer.Start(); 81 {
82 m_httpServer = new BaseHttpServer(
83 mainSSLport, m_networkServersInfo.HttpUsesSSL,
84 m_networkServersInfo.HttpSSLCN,
85 m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass);
86 m_httpServer.Start(true,true);
87 MainServer.AddHttpServer(m_httpServer);
88 }
89
90 // unsecure main server
91 BaseHttpServer server = new BaseHttpServer(mainport);
92 if(!m_networkServersInfo.HttpUsesSSL)
93 {
94 m_httpServer = server;
95 server.Start(true, true);
96 }
97 else
98 server.Start(false, false);
99
100 MainServer.AddHttpServer(server);
101 MainServer.ÚnSecureInstance = server;
83 102
84 MainServer.AddHttpServer(m_httpServer);
85 MainServer.Instance = m_httpServer; 103 MainServer.Instance = m_httpServer;
86 104
87 // "OOB" Server 105 // "OOB" Server
@@ -89,22 +107,22 @@ namespace OpenSim
89 { 107 {
90 if (!m_networkServersInfo.ssl_external) 108 if (!m_networkServersInfo.ssl_external)
91 { 109 {
92 BaseHttpServer server = new BaseHttpServer( 110 server = new BaseHttpServer(
93 m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, 111 m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener,
112 m_networkServersInfo.cert_path,
94 m_networkServersInfo.cert_pass); 113 m_networkServersInfo.cert_pass);
95 114
96 m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); 115 m_log.InfoFormat("[REGION SERVER]: Starting OOB HTTPS server on port {0}", server.SSLPort);
116 server.Start(false, false);
97 MainServer.AddHttpServer(server); 117 MainServer.AddHttpServer(server);
98 server.Start();
99 } 118 }
100 else 119 else
101 { 120 {
102 BaseHttpServer server = new BaseHttpServer( 121 server = new BaseHttpServer(m_networkServersInfo.https_port);
103 m_networkServersInfo.https_port);
104 122
105 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); 123 m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port);
124 server.Start(false, false);
106 MainServer.AddHttpServer(server); 125 MainServer.AddHttpServer(server);
107 server.Start();
108 } 126 }
109 } 127 }
110 128
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 1feece1..aced734 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -372,7 +372,7 @@ namespace OpenSim.Region.ClientStack.Linden
372 372
373 caps.RegisterPollHandler( 373 caps.RegisterPollHandler(
374 "EventQueueGet", 374 "EventQueueGet",
375 new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, SERVER_EQ_TIME_NO_EVENTS)); 375 new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, Drop, agentID, SERVER_EQ_TIME_NO_EVENTS));
376 } 376 }
377 377
378 public bool HasEvents(UUID requestID, UUID agentID) 378 public bool HasEvents(UUID requestID, UUID agentID)
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index ee3f4f1..b23bffc 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -59,13 +59,12 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
59 base.SetUp(); 59 base.SetUp();
60 60
61 uint port = 9999; 61 uint port = 9999;
62 uint sslPort = 9998;
63 62
64 // This is an unfortunate bit of clean up we have to do because MainServer manages things through static 63 // This is an unfortunate bit of clean up we have to do because MainServer manages things through static
65 // variables and the VM is not restarted between tests. 64 // variables and the VM is not restarted between tests.
66 MainServer.RemoveHttpServer(port); 65 MainServer.RemoveHttpServer(port);
67 66
68 BaseHttpServer server = new BaseHttpServer(port, false, sslPort, ""); 67 BaseHttpServer server = new BaseHttpServer(port, false, "","","");
69 MainServer.AddHttpServer(server); 68 MainServer.AddHttpServer(server);
70 MainServer.Instance = server; 69 MainServer.Instance = server;
71 70
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index ae18bc1..cecef0d 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -76,7 +76,6 @@ namespace OpenSim.Region.ClientStack.Linden
76 { 76 {
77 public Hashtable response; 77 public Hashtable response;
78 public int bytes; 78 public int bytes;
79 public int lod;
80 } 79 }
81 80
82 81
@@ -222,11 +221,12 @@ namespace OpenSim.Region.ClientStack.Linden
222 new List<Hashtable>(); 221 new List<Hashtable>();
223 private Dictionary<UUID, aPollResponse> responses = 222 private Dictionary<UUID, aPollResponse> responses =
224 new Dictionary<UUID, aPollResponse>(); 223 new Dictionary<UUID, aPollResponse>();
224 private HashSet<UUID> dropedResponses = new HashSet<UUID>();
225 225
226 private Scene m_scene; 226 private Scene m_scene;
227 private MeshCapsDataThrottler m_throttler; 227 private MeshCapsDataThrottler m_throttler;
228 public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) : 228 public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) :
229 base(null, uri, null, null, null, pId, int.MaxValue) 229 base(null, uri, null, null, null, null, pId, int.MaxValue)
230 { 230 {
231 m_scene = scene; 231 m_scene = scene;
232 m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId); 232 m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId);
@@ -241,6 +241,17 @@ namespace OpenSim.Region.ClientStack.Linden
241 241
242 } 242 }
243 }; 243 };
244
245 Drop = (x, y) =>
246 {
247 lock (responses)
248 {
249 responses.Remove(x);
250 lock(dropedResponses)
251 dropedResponses.Add(x);
252 }
253 };
254
244 GetEvents = (x, y) => 255 GetEvents = (x, y) =>
245 { 256 {
246 lock (responses) 257 lock (responses)
@@ -298,30 +309,48 @@ namespace OpenSim.Region.ClientStack.Linden
298 if(m_scene.ShuttingDown) 309 if(m_scene.ShuttingDown)
299 return; 310 return;
300 311
301 // If the avatar is gone, don't bother to get the texture 312 lock(responses)
302 if (m_scene.GetScenePresence(Id) == null)
303 { 313 {
304 response = new Hashtable(); 314 lock(dropedResponses)
305 315 {
306 response["int_response_code"] = 500; 316 if(dropedResponses.Contains(requestID))
307 response["str_response_string"] = "Script timeout"; 317 {
308 response["content_type"] = "text/plain"; 318 dropedResponses.Remove(requestID);
309 response["keepalive"] = false; 319 return;
310 response["reusecontext"] = false; 320 }
321 }
322
323 // If the avatar is gone, don't bother to get the texture
324 if (m_scene.GetScenePresence(Id) == null)
325 {
326 response = new Hashtable();
311 327
312 lock (responses) 328 response["int_response_code"] = 500;
313 responses[requestID] = new aPollResponse() { bytes = 0, response = response, lod = 0 }; 329 response["str_response_string"] = "Script timeout";
330 response["content_type"] = "text/plain";
331 response["keepalive"] = false;
332 responses[requestID] = new aPollResponse() { bytes = 0, response = response};
314 333
315 return; 334 return;
335 }
316 } 336 }
317 337
318 response = m_getMeshHandler.Handle(requestinfo.request); 338 response = m_getMeshHandler.Handle(requestinfo.request);
339
319 lock (responses) 340 lock (responses)
320 { 341 {
342 lock(dropedResponses)
343 {
344 if(dropedResponses.Contains(requestID))
345 {
346 dropedResponses.Remove(requestID);
347 return;
348 }
349 }
350
321 responses[requestID] = new aPollResponse() 351 responses[requestID] = new aPollResponse()
322 { 352 {
323 bytes = (int)response["int_bytes"], 353 bytes = (int)response["int_bytes"],
324 lod = (int)response["int_lod"],
325 response = response 354 response = response
326 }; 355 };
327 356
@@ -390,7 +419,6 @@ namespace OpenSim.Region.ClientStack.Linden
390 private volatile int lastTimeElapsed = 0; 419 private volatile int lastTimeElapsed = 0;
391 private volatile int BytesSent = 0; 420 private volatile int BytesSent = 0;
392 private int CapSetThrottle = 0; 421 private int CapSetThrottle = 0;
393 private float CapThrottleDistributon = 0.30f;
394 private readonly Scene m_scene; 422 private readonly Scene m_scene;
395 private ThrottleOutPacketType Throttle; 423 private ThrottleOutPacketType Throttle;
396 private readonly UUID User; 424 private readonly UUID User;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 0c20e04..c9f3b7e 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -218,11 +218,12 @@ namespace OpenSim.Region.ClientStack.Linden
218 new List<Hashtable>(); 218 new List<Hashtable>();
219 private Dictionary<UUID, aPollResponse> responses = 219 private Dictionary<UUID, aPollResponse> responses =
220 new Dictionary<UUID, aPollResponse>(); 220 new Dictionary<UUID, aPollResponse>();
221 private HashSet<UUID> dropedResponses = new HashSet<UUID>();
221 222
222 private Scene m_scene; 223 private Scene m_scene;
223 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); 224 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000);
224 public PollServiceTextureEventArgs(UUID pId, Scene scene) : 225 public PollServiceTextureEventArgs(UUID pId, Scene scene) :
225 base(null, "", null, null, null, pId, int.MaxValue) 226 base(null, "", null, null, null, null, pId, int.MaxValue)
226 { 227 {
227 m_scene = scene; 228 m_scene = scene;
228 // x is request id, y is userid 229 // x is request id, y is userid
@@ -236,6 +237,16 @@ namespace OpenSim.Region.ClientStack.Linden
236 237
237 } 238 }
238 }; 239 };
240
241 Drop = (x, y) =>
242 {
243 lock (responses)
244 {
245 responses.Remove(x);
246 dropedResponses.Add(x);
247 }
248 };
249
239 GetEvents = (x, y) => 250 GetEvents = (x, y) =>
240 { 251 {
241 lock (responses) 252 lock (responses)
@@ -304,53 +315,72 @@ namespace OpenSim.Region.ClientStack.Linden
304 if(m_scene.ShuttingDown) 315 if(m_scene.ShuttingDown)
305 return; 316 return;
306 317
307 if (requestinfo.send503) 318 lock (responses)
308 { 319 {
309 response = new Hashtable(); 320 lock(dropedResponses)
321 {
322 if(dropedResponses.Contains(requestID))
323 {
324 dropedResponses.Remove(requestID);
325 return;
326 }
327 }
310 328
311 response["int_response_code"] = 503; 329 if (requestinfo.send503)
312 response["str_response_string"] = "Throttled"; 330 {
313 response["content_type"] = "text/plain"; 331 response = new Hashtable();
314 response["keepalive"] = false;
315 response["reusecontext"] = false;
316 332
317 Hashtable headers = new Hashtable(); 333 response["int_response_code"] = 503;
318 headers["Retry-After"] = 30; 334 response["str_response_string"] = "Throttled";
319 response["headers"] = headers; 335 response["content_type"] = "text/plain";
336 response["keepalive"] = false;
337 response["reusecontext"] = false;
338
339 Hashtable headers = new Hashtable();
340 headers["Retry-After"] = 30;
341 response["headers"] = headers;
320 342
321 lock (responses)
322 responses[requestID] = new aPollResponse() {bytes = 0, response = response}; 343 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
323 344
324 return; 345 return;
325 } 346 }
326 347
327 // If the avatar is gone, don't bother to get the texture 348 // If the avatar is gone, don't bother to get the texture
328 if (m_scene.GetScenePresence(Id) == null) 349 if (m_scene.GetScenePresence(Id) == null)
329 { 350 {
330 response = new Hashtable(); 351 response = new Hashtable();
331 352
332 response["int_response_code"] = 500; 353 response["int_response_code"] = 500;
333 response["str_response_string"] = "Script timeout"; 354 response["str_response_string"] = "Script timeout";
334 response["content_type"] = "text/plain"; 355 response["content_type"] = "text/plain";
335 response["keepalive"] = false; 356 response["keepalive"] = false;
336 response["reusecontext"] = false; 357 response["reusecontext"] = false;
337 358
338 lock (responses)
339 responses[requestID] = new aPollResponse() {bytes = 0, response = response}; 359 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
340 360
341 return; 361 return;
362 }
342 } 363 }
343 364
344 response = m_getTextureHandler.Handle(requestinfo.request); 365 response = m_getTextureHandler.Handle(requestinfo.request);
366
345 lock (responses) 367 lock (responses)
346 { 368 {
369 lock(dropedResponses)
370 {
371 if(dropedResponses.Contains(requestID))
372 {
373 dropedResponses.Remove(requestID);
374 m_throttler.ProcessTime();
375 return;
376 }
377 }
347 responses[requestID] = new aPollResponse() 378 responses[requestID] = new aPollResponse()
348 { 379 {
349 bytes = (int) response["int_bytes"], 380 bytes = (int) response["int_bytes"],
350 response = response 381 response = response
351 }; 382 };
352 383 }
353 }
354 m_throttler.ProcessTime(); 384 m_throttler.ProcessTime();
355 } 385 }
356 386
@@ -423,7 +453,6 @@ namespace OpenSim.Region.ClientStack.Linden
423 453
424 internal sealed class CapsDataThrottler 454 internal sealed class CapsDataThrottler
425 { 455 {
426
427 private volatile int currenttime = 0; 456 private volatile int currenttime = 0;
428 private volatile int lastTimeElapsed = 0; 457 private volatile int lastTimeElapsed = 0;
429 private volatile int BytesSent = 0; 458 private volatile int BytesSent = 0;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index e0ec842..1ea0454 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -61,7 +61,6 @@ namespace OpenSim.Region.ClientStack.Linden
61 public UUID reqID; 61 public UUID reqID;
62 public Hashtable request; 62 public Hashtable request;
63 public ScenePresence presence; 63 public ScenePresence presence;
64 public List<UUID> folders;
65 } 64 }
66 65
67 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 66 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -250,17 +249,28 @@ namespace OpenSim.Region.ClientStack.Linden
250 { 249 {
251 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 250 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
252 251
253 private Dictionary<UUID, Hashtable> responses = 252 private Dictionary<UUID, Hashtable> responses = new Dictionary<UUID, Hashtable>();
254 new Dictionary<UUID, Hashtable>(); 253 private HashSet<UUID> dropedResponses = new HashSet<UUID>();
255 254
256 private WebFetchInvDescModule m_module; 255 private WebFetchInvDescModule m_module;
257 256
258 public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) : 257 public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) :
259 base(null, url, null, null, null, pId, int.MaxValue) 258 base(null, url, null, null, null, null, pId, int.MaxValue)
260 { 259 {
261 m_module = module; 260 m_module = module;
262 261
263 HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); }; 262 HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); };
263
264 Drop = (x, y) =>
265 {
266 lock (responses)
267 {
268 responses.Remove(x);
269 lock(dropedResponses)
270 dropedResponses.Add(x);
271 }
272 };
273
264 GetEvents = (x, y) => 274 GetEvents = (x, y) =>
265 { 275 {
266 lock (responses) 276 lock (responses)
@@ -285,8 +295,10 @@ namespace OpenSim.Region.ClientStack.Linden
285 reqinfo.reqID = x; 295 reqinfo.reqID = x;
286 reqinfo.request = y; 296 reqinfo.request = y;
287 reqinfo.presence = sp; 297 reqinfo.presence = sp;
288 reqinfo.folders = new List<UUID>();
289 298
299/* why where we doing this? just to get cof ?
300 List<UUID> folders = new List<UUID>();
301
290 // Decode the request here 302 // Decode the request here
291 string request = y["body"].ToString(); 303 string request = y["body"].ToString();
292 304
@@ -322,11 +334,11 @@ namespace OpenSim.Region.ClientStack.Linden
322 UUID folderID; 334 UUID folderID;
323 if (UUID.TryParse(folder, out folderID)) 335 if (UUID.TryParse(folder, out folderID))
324 { 336 {
325 if (!reqinfo.folders.Contains(folderID)) 337 if (!folders.Contains(folderID))
326 { 338 {
327 if (sp.COF != UUID.Zero && sp.COF == folderID) 339 if (sp.COF != UUID.Zero && sp.COF == folderID)
328 highPriority = true; 340 highPriority = true;
329 reqinfo.folders.Add(folderID); 341 folders.Add(folderID);
330 } 342 }
331 } 343 }
332 } 344 }
@@ -334,6 +346,7 @@ namespace OpenSim.Region.ClientStack.Linden
334 if (highPriority) 346 if (highPriority)
335 m_queue.PriorityEnqueue(reqinfo); 347 m_queue.PriorityEnqueue(reqinfo);
336 else 348 else
349*/
337 m_queue.Enqueue(reqinfo); 350 m_queue.Enqueue(reqinfo);
338 }; 351 };
339 352
@@ -365,6 +378,19 @@ namespace OpenSim.Region.ClientStack.Linden
365 378
366 UUID requestID = requestinfo.reqID; 379 UUID requestID = requestinfo.reqID;
367 380
381
382 lock(responses)
383 {
384 lock(dropedResponses)
385 {
386 if(dropedResponses.Contains(requestID))
387 {
388 dropedResponses.Remove(requestID);
389 return;
390 }
391 }
392 }
393
368 Hashtable response = new Hashtable(); 394 Hashtable response = new Hashtable();
369 395
370 response["int_response_code"] = 200; 396 response["int_response_code"] = 200;
@@ -377,11 +403,21 @@ namespace OpenSim.Region.ClientStack.Linden
377 403
378 lock (responses) 404 lock (responses)
379 { 405 {
406 lock(dropedResponses)
407 {
408 if(dropedResponses.Contains(requestID))
409 {
410 dropedResponses.Remove(requestID);
411 requestinfo.request.Clear();
412 WebFetchInvDescModule.ProcessedRequestsCount++;
413 return;
414 }
415 }
416
380 if (responses.ContainsKey(requestID)) 417 if (responses.ContainsKey(requestID))
381 m_log.WarnFormat("[FETCH INVENTORY DESCENDENTS2 MODULE]: Caught in the act of loosing responses! Please report this on mantis #7054"); 418 m_log.WarnFormat("[FETCH INVENTORY DESCENDENTS2 MODULE]: Caught in the act of loosing responses! Please report this on mantis #7054");
382 responses[requestID] = response; 419 responses[requestID] = response;
383 } 420 }
384 requestinfo.folders.Clear();
385 requestinfo.request.Clear(); 421 requestinfo.request.Clear();
386 WebFetchInvDescModule.ProcessedRequestsCount++; 422 WebFetchInvDescModule.ProcessedRequestsCount++;
387 } 423 }
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index bb80a88..3f332fa 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
225 string uri = "/lslhttp/" + urlcode.ToString() + "/"; 225 string uri = "/lslhttp/" + urlcode.ToString() + "/";
226 226
227 PollServiceEventArgs args 227 PollServiceEventArgs args
228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000);
229 args.Type = PollServiceEventArgs.EventType.LslHttp; 229 args.Type = PollServiceEventArgs.EventType.LslHttp;
230 m_HttpServer.AddPollServiceHTTPHandler(uri, args); 230 m_HttpServer.AddPollServiceHTTPHandler(uri, args);
231 231
@@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
276 string uri = "/lslhttps/" + urlcode.ToString() + "/"; 276 string uri = "/lslhttps/" + urlcode.ToString() + "/";
277 277
278 PollServiceEventArgs args 278 PollServiceEventArgs args
279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000);
280 args.Type = PollServiceEventArgs.EventType.LslHttp; 280 args.Type = PollServiceEventArgs.EventType.LslHttp;
281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args); 281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args);
282 282
@@ -530,6 +530,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
530 } 530 }
531 } 531 }
532 } 532 }
533
534 private void Drop(UUID requestID, UUID sessionID)
535 {
536 UrlData url = null;
537 lock (m_RequestMap)
538 {
539 if (m_RequestMap.ContainsKey(requestID))
540 {
541 url = m_RequestMap[requestID];
542 m_RequestMap.Remove(requestID);
543 if(url != null)
544 {
545 lock (url.requests)
546 {
547 if(url.requests.ContainsKey(requestID))
548 url.requests.Remove(requestID);
549 }
550 }
551 }
552 }
553 }
554
533 private Hashtable GetEvents(UUID requestID, UUID sessionID) 555 private Hashtable GetEvents(UUID requestID, UUID sessionID)
534 { 556 {
535 UrlData url = null; 557 UrlData url = null;
@@ -689,9 +711,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
689 else 711 else
690 { 712 {
691 queryString = queryString + val + "&"; 713 queryString = queryString + val + "&";
692 }
693 } 714 }
694 } 715 }
716 }
695 if (queryString.Length > 1) 717 if (queryString.Length > 1)
696 queryString = queryString.Substring(0, queryString.Length - 1); 718 queryString = queryString.Substring(0, queryString.Length - 1);
697 719
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs
index 50276ae..9273b20 100644
--- a/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs
+++ b/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs
@@ -52,12 +52,12 @@ namespace OpenSim.Region.DataSnapshot
52 m_externalData = externalData; 52 m_externalData = externalData;
53 53
54 //Register HTTP handler 54 //Register HTTP handler
55 if (MainServer.Instance.AddHTTPHandler("collector", OnGetSnapshot)) 55 if (MainServer.ÚnSecureInstance.AddHTTPHandler("collector", OnGetSnapshot))
56 { 56 {
57 m_log.Info("[DATASNAPSHOT]: Set up snapshot service"); 57 m_log.Info("[DATASNAPSHOT]: Set up snapshot service");
58 } 58 }
59 // Register validation callback handler 59 // Register validation callback handler
60 MainServer.Instance.AddHTTPHandler("validate", OnValidate); 60 MainServer.ÚnSecureInstance.AddHTTPHandler("validate", OnValidate);
61 61
62 } 62 }
63 63
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
index 4dc8fc6..8cac50e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
87 uint port = 9999; 87 uint port = 9999;
88 MainServer.RemoveHttpServer(port); 88 MainServer.RemoveHttpServer(port);
89 89
90 BaseHttpServer server = new BaseHttpServer(port, false, 0, ""); 90 BaseHttpServer server = new BaseHttpServer(port, false, "", "", "");
91 MainServer.AddHttpServer(server); 91 MainServer.AddHttpServer(server);
92 MainServer.Instance = server; 92 MainServer.Instance = server;
93 93
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index c343044..75aef5f 100644
--- a/OpenSim/Server/ServerMain.cs
+++ b/OpenSim/Server/ServerMain.cs
@@ -30,6 +30,8 @@ using log4net;
30using System.Reflection; 30using System.Reflection;
31using System; 31using System;
32using System.Net; 32using System.Net;
33using System.Net.Security;
34using System.Security.Cryptography.X509Certificates;
33using System.Collections.Generic; 35using System.Collections.Generic;
34using OpenSim.Framework.Servers; 36using OpenSim.Framework.Servers;
35using OpenSim.Framework.Servers.HttpServer; 37using OpenSim.Framework.Servers.HttpServer;
@@ -51,12 +53,33 @@ namespace OpenSim.Server
51 new List<IServiceConnector>(); 53 new List<IServiceConnector>();
52 54
53 protected static PluginLoader loader; 55 protected static PluginLoader loader;
56 private static bool m_NoVerifyCertChain = false;
57 private static bool m_NoVerifyCertHostname = false;
58
59 public static bool ValidateServerCertificate(
60 object sender,
61 X509Certificate certificate,
62 X509Chain chain,
63 SslPolicyErrors sslPolicyErrors)
64 {
65 if (m_NoVerifyCertChain)
66 sslPolicyErrors &= ~SslPolicyErrors.RemoteCertificateChainErrors;
67
68 if (m_NoVerifyCertHostname)
69 sslPolicyErrors &= ~SslPolicyErrors.RemoteCertificateNameMismatch;
70
71 if (sslPolicyErrors == SslPolicyErrors.None)
72 return true;
73
74 return false;
75 }
54 76
55 public static int Main(string[] args) 77 public static int Main(string[] args)
56 { 78 {
57 // Make sure we don't get outbound connections queueing 79 // Make sure we don't get outbound connections queueing
58 ServicePointManager.DefaultConnectionLimit = 50; 80 ServicePointManager.DefaultConnectionLimit = 50;
59 ServicePointManager.UseNagleAlgorithm = false; 81 ServicePointManager.UseNagleAlgorithm = false;
82 ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
60 83
61 m_Server = new HttpServerBase("R.O.B.U.S.T.", args); 84 m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
62 85
@@ -69,6 +92,10 @@ namespace OpenSim.Server
69 throw new Exception("Configuration error"); 92 throw new Exception("Configuration error");
70 } 93 }
71 94
95 m_NoVerifyCertChain = serverConfig.GetBoolean("NoVerifyCertChain", m_NoVerifyCertChain);
96 m_NoVerifyCertHostname = serverConfig.GetBoolean("NoVerifyCertHostname", m_NoVerifyCertHostname);
97
98
72 string connList = serverConfig.GetString("ServiceConnectors", String.Empty); 99 string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
73 100
74 registryLocation = serverConfig.GetString("RegistryLocation","."); 101 registryLocation = serverConfig.GetString("RegistryLocation",".");
diff --git a/bin/HttpServer_OpenSim.dll b/bin/HttpServer_OpenSim.dll
index 5db99ef..33a1211 100755
--- a/bin/HttpServer_OpenSim.dll
+++ b/bin/HttpServer_OpenSim.dll
Binary files differ
diff --git a/bin/HttpServer_OpenSim.pdb b/bin/HttpServer_OpenSim.pdb
index 25b6760..2ab14a1 100644
--- a/bin/HttpServer_OpenSim.pdb
+++ b/bin/HttpServer_OpenSim.pdb
Binary files differ
diff --git a/bin/HttpServer_OpenSim.xml b/bin/HttpServer_OpenSim.xml
deleted file mode 100644
index 7b6912e..0000000
--- a/bin/HttpServer_OpenSim.xml
+++ /dev/null
@@ -1,5574 +0,0 @@
1<?xml version="1.0"?>
2<doc>
3 <assembly>
4 <name>HttpServer_OpenSim</name>
5 </assembly>
6 <members>
7 <member name="T:HttpServer.Authentication.AuthenticationHandler">
8 <summary>
9 Delegate used to let authentication modules authenticate the user name and password.
10 </summary>
11 <param name="realm">Realm that the user want to authenticate in</param>
12 <param name="userName">User name specified by client</param>
13 <param name="token">Can either be user password or implementation specific token.</param>
14 <param name="login">object that will be stored in a session variable called <see cref="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag"/> if authentication was successful.</param>
15 <exception cref="T:HttpServer.Exceptions.ForbiddenException">throw forbidden exception if too many attempts have been made.</exception>
16 <remarks>
17 <para>
18 Use <see cref="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"/> to specify that the token is a HA1 token. (MD5 generated
19 string from realm, user name and password); Md5String(userName + ":" + realm + ":" + password);
20 </para>
21 </remarks>
22 </member>
23 <member name="T:HttpServer.Authentication.AuthenticationRequiredHandler">
24 <summary>
25 Let's you decide on a system level if authentication is required.
26 </summary>
27 <param name="request">HTTP request from client</param>
28 <returns>true if user should be authenticated.</returns>
29 <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> if no more attempts are allowed.</remarks>
30 <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception>
31 </member>
32 <member name="T:HttpServer.Authentication.AuthenticationModule">
33 <summary>
34 Authentication modules are used to implement different
35 kind of HTTP authentication.
36 </summary>
37 </member>
38 <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)">
39 <summary>
40 Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class.
41 </summary>
42 <param name="authenticator">Delegate used to provide information used during authentication.</param>
43 <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param>
44 </member>
45 <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler)">
46 <summary>
47 Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class.
48 </summary>
49 <param name="authenticator">Delegate used to provide information used during authentication.</param>
50 </member>
51 <member name="P:HttpServer.Authentication.AuthenticationModule.Name">
52 <summary>
53 name used in HTTP request.
54 </summary>
55 </member>
56 <member name="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag">
57 <summary>
58 Tag used for authentication.
59 </summary>
60 </member>
61 <member name="M:HttpServer.Authentication.AuthenticationModule.CreateResponse(System.String,System.Object[])">
62 <summary>
63 Create a response that can be sent in the WWW-Authenticate header.
64 </summary>
65 <param name="realm">Realm that the user should authenticate in</param>
66 <param name="options">Array with optional options.</param>
67 <returns>A correct authentication request.</returns>
68 <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception>
69 </member>
70 <member name="M:HttpServer.Authentication.AuthenticationModule.Authenticate(System.String,System.String,System.String,System.Object[])">
71 <summary>
72 An authentication response have been received from the web browser.
73 Check if it's correct
74 </summary>
75 <param name="authenticationHeader">Contents from the Authorization header</param>
76 <param name="realm">Realm that should be authenticated</param>
77 <param name="httpVerb">GET/POST/PUT/DELETE etc.</param>
78 <param name="options">options to specific implementations</param>
79 <returns>Authentication object that is stored for the request. A user class or something like that.</returns>
80 <exception cref="T:System.ArgumentException">if <paramref name="authenticationHeader"/> is invalid</exception>
81 <exception cref="T:System.ArgumentNullException">If any of the parameters is empty or null.</exception>
82 </member>
83 <member name="M:HttpServer.Authentication.AuthenticationModule.CheckAuthentication(System.String,System.String,System.String@,System.Object@)">
84 <summary>
85 Used to invoke the authentication delegate that is used to lookup the user name/realm.
86 </summary>
87 <param name="realm">Realm (domain) that user want to authenticate in</param>
88 <param name="userName">User name</param>
89 <param name="password">Password used for validation. Some implementations got password in clear text, they are then sent to client.</param>
90 <param name="login">object that will be stored in the request to help you identify the user if authentication was successful.</param>
91 <returns>true if authentication was successful</returns>
92 </member>
93 <member name="M:HttpServer.Authentication.AuthenticationModule.AuthenticationRequired(HttpServer.IHttpRequest)">
94 <summary>
95 Determines if authentication is required.
96 </summary>
97 <param name="request">HTTP request from browser</param>
98 <returns>true if user should be authenticated.</returns>
99 <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> from your delegate if no more attempts are allowed.</remarks>
100 <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception>
101 </member>
102 <member name="T:HttpServer.Authentication.BasicAuthentication">
103 <summary>
104 The "basic" authentication scheme is based on the model that the
105 client must authenticate itself with a user-ID and a password for
106 each realm. The realm value should be considered an opaque string
107 which can only be compared for equality with other realms on that
108 server. The server will service the request only if it can validate
109 the user-ID and password for the protection space of the Request-URI.
110 There are no optional authentication parameters.
111 </summary>
112 </member>
113 <member name="M:HttpServer.Authentication.BasicAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)">
114 <summary>
115 Initializes a new instance of the <see cref="T:HttpServer.Authentication.BasicAuthentication"/> class.
116 </summary>
117 <param name="authenticator">Delegate used to provide information used during authentication.</param>
118 <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param>
119 </member>
120 <member name="M:HttpServer.Authentication.BasicAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)">
121 <summary>
122 Initializes a new instance of the <see cref="T:HttpServer.Authentication.BasicAuthentication"/> class.
123 </summary>
124 <param name="authenticator">Delegate used to provide information used during authentication.</param>
125 </member>
126 <member name="M:HttpServer.Authentication.BasicAuthentication.CreateResponse(System.String,System.Object[])">
127 <summary>
128 Create a response that can be sent in the WWW-Authenticate header.
129 </summary>
130 <param name="realm">Realm that the user should authenticate in</param>
131 <param name="options">Not used in basic auth</param>
132 <returns>A correct auth request.</returns>
133 </member>
134 <member name="M:HttpServer.Authentication.BasicAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])">
135 <summary>
136 An authentication response have been received from the web browser.
137 Check if it's correct
138 </summary>
139 <param name="authenticationHeader">Contents from the Authorization header</param>
140 <param name="realm">Realm that should be authenticated</param>
141 <param name="httpVerb">GET/POST/PUT/DELETE etc.</param>
142 <param name="options">Not used in basic auth</param>
143 <returns>Authentication object that is stored for the request. A user class or something like that.</returns>
144 <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception>
145 <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception>
146 </member>
147 <member name="P:HttpServer.Authentication.BasicAuthentication.Name">
148 <summary>
149 name used in http request.
150 </summary>
151 </member>
152 <member name="T:HttpServer.Authentication.DigestAuthentication">
153 <summary>
154 Implements HTTP Digest authentication. It's more secure than Basic auth since password is
155 encrypted with a "key" from the server.
156 </summary>
157 <remarks>
158 Keep in mind that the password is encrypted with MD5. Use a combination of SSL and digest auth to be secure.
159 </remarks>
160 </member>
161 <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)">
162 <summary>
163 Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class.
164 </summary>
165 <param name="authenticator">Delegate used to provide information used during authentication.</param>
166 <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param>
167 </member>
168 <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)">
169 <summary>
170 Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class.
171 </summary>
172 <param name="authenticator">Delegate used to provide information used during authentication.</param>
173 </member>
174 <member name="F:HttpServer.Authentication.DigestAuthentication.DisableNonceCheck">
175 <summary>
176 Used by test classes to be able to use hardcoded values
177 </summary>
178 </member>
179 <member name="P:HttpServer.Authentication.DigestAuthentication.Name">
180 <summary>
181 name used in http request.
182 </summary>
183 </member>
184 <member name="M:HttpServer.Authentication.DigestAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])">
185 <summary>
186 An authentication response have been received from the web browser.
187 Check if it's correct
188 </summary>
189 <param name="authenticationHeader">Contents from the Authorization header</param>
190 <param name="realm">Realm that should be authenticated</param>
191 <param name="httpVerb">GET/POST/PUT/DELETE etc.</param>
192 <param name="options">First option: true if username/password is correct but not cnonce</param>
193 <returns>
194 Authentication object that is stored for the request. A user class or something like that.
195 </returns>
196 <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception>
197 <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception>
198 </member>
199 <member name="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1">
200 <summary>
201 Gets or sets whether the token supplied in <see cref="T:HttpServer.Authentication.AuthenticationHandler"/> is a
202 HA1 generated string.
203 </summary>
204 </member>
205 <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
206 <summary>
207 Encrypts parameters into a Digest string
208 </summary>
209 <param name="realm">Realm that the user want to log into.</param>
210 <param name="userName">User logging in</param>
211 <param name="password">Users password.</param>
212 <param name="method">HTTP method.</param>
213 <param name="uri">Uri/domain that generated the login prompt.</param>
214 <param name="qop">Quality of Protection.</param>
215 <param name="nonce">"Number used ONCE"</param>
216 <param name="nc">Hexadecimal request counter.</param>
217 <param name="cnonce">"Client Number used ONCE"</param>
218 <returns>Digest encrypted string</returns>
219 </member>
220 <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String)">
221 <summary>
222
223 </summary>
224 <param name="ha1">Md5 hex encoded "userName:realm:password", without the quotes.</param>
225 <param name="ha2">Md5 hex encoded "method:uri", without the quotes</param>
226 <param name="qop">Quality of Protection</param>
227 <param name="nonce">"Number used ONCE"</param>
228 <param name="nc">Hexadecimal request counter.</param>
229 <param name="cnonce">Client number used once</param>
230 <returns></returns>
231 </member>
232 <member name="M:HttpServer.Authentication.DigestAuthentication.CreateResponse(System.String,System.Object[])">
233 <summary>
234 Create a response that can be sent in the WWW-Authenticate header.
235 </summary>
236 <param name="realm">Realm that the user should authenticate in</param>
237 <param name="options">First options specifies if true if username/password is correct but not cnonce.</param>
238 <returns>A correct auth request.</returns>
239 <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception>
240 </member>
241 <member name="M:HttpServer.Authentication.DigestAuthentication.Decode(System.String,System.Text.Encoding)">
242 <summary>
243 Decodes authorization header value
244 </summary>
245 <param name="buffer">header value</param>
246 <param name="encoding">Encoding that the buffer is in</param>
247 <returns>All headers and their values if successful; otherwise null</returns>
248 <example>
249 NameValueCollection header = DigestAuthentication.Decode("response=\"6629fae49393a05397450978507c4ef1\",\r\nc=00001", Encoding.ASCII);
250 </example>
251 <remarks>Can handle lots of whitespaces and new lines without failing.</remarks>
252 </member>
253 <member name="M:HttpServer.Authentication.DigestAuthentication.GetCurrentNonce">
254 <summary>
255 Gets the current nonce.
256 </summary>
257 <returns></returns>
258 </member>
259 <member name="M:HttpServer.Authentication.DigestAuthentication.GetMD5HashBinHex2(System.String)">
260 <summary>
261 Gets the Md5 hash bin hex2.
262 </summary>
263 <param name="toBeHashed">To be hashed.</param>
264 <returns></returns>
265 </member>
266 <member name="M:HttpServer.Authentication.DigestAuthentication.IsValidNonce(System.String)">
267 <summary>
268 determines if the nonce is valid or has expired.
269 </summary>
270 <param name="nonce">nonce value (check wikipedia for info)</param>
271 <returns>true if the nonce has not expired.</returns>
272 </member>
273 <member name="T:HttpServer.Check">
274 <summary>
275 Small design by contract implementation.
276 </summary>
277 </member>
278 <member name="M:HttpServer.Check.NotEmpty(System.String,System.String)">
279 <summary>
280 Check whether a parameter is empty.
281 </summary>
282 <param name="value">Parameter value</param>
283 <param name="parameterOrErrorMessage">Parameter name, or error description.</param>
284 <exception cref="T:System.ArgumentException">value is empty.</exception>
285 </member>
286 <member name="M:HttpServer.Check.Require(System.Object,System.String)">
287 <summary>
288 Checks whether a parameter is null.
289 </summary>
290 <param name="value">Parameter value</param>
291 <param name="parameterOrErrorMessage">Parameter name, or error description.</param>
292 <exception cref="T:System.ArgumentNullException">value is null.</exception>
293 </member>
294 <member name="M:HttpServer.Check.Min(System.Int32,System.Object,System.String)">
295 <summary>
296 Checks whether a parameter is null.
297 </summary>
298 <param name="minValue"></param>
299 <param name="value">Parameter value</param>
300 <param name="parameterOrErrorMessage">Parameter name, or error description.</param>
301 <exception cref="T:System.ArgumentException">value is null.</exception>
302 </member>
303 <member name="T:HttpServer.ClientAcceptedEventArgs">
304 <summary>
305 Invoked when a client have been accepted by the <see cref="T:HttpServer.HttpListener"/>
306 </summary>
307 <remarks>
308 Can be used to revoke incoming connections
309 </remarks>
310 </member>
311 <member name="M:HttpServer.ClientAcceptedEventArgs.#ctor(System.Net.Sockets.Socket)">
312 <summary>
313 Initializes a new instance of the <see cref="T:HttpServer.ClientAcceptedEventArgs"/> class.
314 </summary>
315 <param name="socket">The socket.</param>
316 </member>
317 <member name="P:HttpServer.ClientAcceptedEventArgs.Socket">
318 <summary>
319 Accepted socket.
320 </summary>
321 </member>
322 <member name="P:HttpServer.ClientAcceptedEventArgs.Revoked">
323 <summary>
324 Client should be revoked.
325 </summary>
326 </member>
327 <member name="M:HttpServer.ClientAcceptedEventArgs.Revoke">
328 <summary>
329 Client may not be handled.
330 </summary>
331 </member>
332 <member name="M:HttpServer.ComponentProvider.AddInstance``1(System.Object)">
333 <summary>
334 Add a component instance
335 </summary>
336 <typeparam name="T">Interface type</typeparam>
337 <param name="instance">Instance to add</param>
338 </member>
339 <member name="M:HttpServer.ComponentProvider.Get``1">
340 <summary>
341 Get a component.
342 </summary>
343 <typeparam name="T">Interface type</typeparam>
344 <returns>Component if registered, otherwise null.</returns>
345 <remarks>
346 Component will get created if needed.
347 </remarks>
348 </member>
349 <member name="M:HttpServer.ComponentProvider.Create(HttpServer.ComponentProvider.TypeInformation)">
350 <exception cref="T:System.InvalidOperationException">If instance cannot be created.</exception>
351 </member>
352 <member name="M:HttpServer.ComponentProvider.Contains(System.Type)">
353 <summary>
354 Checks if the specified component interface have been added.
355 </summary>
356 <param name="interfaceType"></param>
357 <returns>true if found; otherwise false.</returns>
358 </member>
359 <member name="M:HttpServer.ComponentProvider.Add``2">
360 <summary>
361 Add a component.
362 </summary>
363 <typeparam name="InterfaceType">Type being requested.</typeparam>
364 <typeparam name="InstanceType">Type being created.</typeparam>
365 <exception cref="T:System.InvalidOperationException">Type have already been mapped.</exception>
366 </member>
367 <member name="T:HttpServer.ContentType">
368 <summary>
369 Lists content type mime types.
370 </summary>
371 </member>
372 <member name="F:HttpServer.ContentType.Text">
373 <summary>
374 text/plain
375 </summary>
376 </member>
377 <member name="F:HttpServer.ContentType.Html">
378 <summary>
379 text/haml
380 </summary>
381 </member>
382 <member name="F:HttpServer.ContentType.Javascript">
383 <summary>
384 content type for javascript documents = application/javascript
385 </summary>
386 <remarks>
387 <para>
388 RFC 4329 states that text/javascript have been superseeded by
389 application/javascript. You might still want to check browser versions
390 since older ones do not support application/javascript.
391 </para>
392 <para>Browser support: http://krijnhoetmer.nl/stuff/javascript/mime-types/</para>
393 </remarks>
394 </member>
395 <member name="F:HttpServer.ContentType.Xml">
396 <summary>
397 text/xml
398 </summary>
399 </member>
400 <member name="T:HttpServer.ContentTypes">
401 <summary>
402 A list of content types
403 </summary>
404 </member>
405 <member name="M:HttpServer.ContentTypes.#ctor(System.String)">
406 <summary>
407
408 </summary>
409 <param name="types">Semicolon separated content types.</param>
410 </member>
411 <member name="P:HttpServer.ContentTypes.First">
412 <summary>
413 Get this first content type.
414 </summary>
415 </member>
416 <member name="P:HttpServer.ContentTypes.Item(System.String)">
417 <summary>
418 Fetch a content type
419 </summary>
420 <param name="type">Part of type ("xml" would return "application/xml")</param>
421 <returns></returns>
422 <remarks>All content types are in lower case.</remarks>
423 </member>
424 <member name="M:HttpServer.ContentTypes.GetEnumerator">
425 <summary>
426 Returns an enumerator that iterates through a collection.
427 </summary>
428 <returns>
429 An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
430 </returns>
431 </member>
432 <member name="M:HttpServer.ContentTypes.Contains(System.String)">
433 <summary>
434 Searches for the specified type
435 </summary>
436 <param name="type">Can also be a part of a type (searching for "xml" would return true for "application/xml").</param>
437 <returns>true if type was found.</returns>
438 </member>
439 <member name="T:HttpServer.ContextTimeoutManager">
440 <summary>
441 Timeout Manager. Checks for dead clients. Clients with open connections that are not doing anything. Closes sessions opened with keepalive.
442 </summary>
443 </member>
444 <member name="T:HttpServer.ContextTimeoutManager.MonitorType">
445 <summary>
446 Use a Thread or a Timer to monitor the ugly
447 </summary>
448 </member>
449 <member name="M:HttpServer.ContextTimeoutManager.ProcessContextTimeouts">
450 <summary>
451 Causes the watcher to immediately check the connections.
452 </summary>
453 </member>
454 <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCount">
455 <summary>
456 Environment.TickCount is an int but it counts all 32 bits so it goes positive
457 and negative every 24.9 days. This trims down TickCount so it doesn't wrap
458 for the callers.
459 This trims it to a 12 day interval so don't let your frame time get too long.
460 </summary>
461 <returns></returns>
462 </member>
463 <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountSubtract(System.Int32,System.Int32)">
464 <summary>
465 Environment.TickCount is an int but it counts all 32 bits so it goes positive
466 and negative every 24.9 days. Subtracts the passed value (previously fetched by
467 'EnvironmentTickCount()') and accounts for any wrapping.
468 </summary>
469 <param name="newValue"></param>
470 <param name="prevValue"></param>
471 <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
472 </member>
473 <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountAdd(System.Int32,System.Int32)">
474 <summary>
475 Environment.TickCount is an int but it counts all 32 bits so it goes positive
476 and negative every 24.9 days. Subtracts the passed value (previously fetched by
477 'EnvironmentTickCount()') and accounts for any wrapping.
478 </summary>
479 <param name="newValue"></param>
480 <param name="prevValue"></param>
481 <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
482 </member>
483 <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountSubtract(System.Int32)">
484 <summary>
485 Environment.TickCount is an int but it counts all 32 bits so it goes positive
486 and negative every 24.9 days. Subtracts the passed value (previously fetched by
487 'EnvironmentTickCount()') and accounts for any wrapping.
488 </summary>
489 <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
490 </member>
491 <member name="T:HttpServer.ExceptionHandler">
492 <summary>
493 We dont want to let the server to die due to exceptions thrown in worker threads.
494 therefore we use this delegate to give you a change to handle uncaught exceptions.
495 </summary>
496 <param name="source">Class that the exception was thrown in.</param>
497 <param name="exception">Exception</param>
498 <remarks>
499 Server will throw a InternalServerException in release version if you dont
500 handle this delegate.
501 </remarks>
502 </member>
503 <member name="T:HttpServer.Exceptions.BadRequestException">
504 <summary>
505 The request could not be understood by the server due to malformed syntax.
506 The client SHOULD NOT repeat the request without modifications.
507
508 Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php
509 </summary>
510 </member>
511 <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String)">
512 <summary>
513 Create a new bad request exception.
514 </summary>
515 <param name="errMsg">reason to why the request was bad.</param>
516 </member>
517 <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String,System.Exception)">
518 <summary>
519 Create a new bad request exception.
520 </summary>
521 <param name="errMsg">reason to why the request was bad.</param>
522 <param name="inner">inner exception</param>
523 </member>
524 <member name="T:HttpServer.Exceptions.ForbiddenException">
525 <summary>
526 The server understood the request, but is refusing to fulfill it.
527 Authorization will not help and the request SHOULD NOT be repeated.
528 If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled,
529 it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information
530 available to the client, the status code 404 (Not Found) can be used instead.
531
532 Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php
533 </summary>
534 </member>
535 <member name="M:HttpServer.Exceptions.ForbiddenException.#ctor(System.String)">
536 <summary>
537 Initializes a new instance of the <see cref="T:HttpServer.Exceptions.ForbiddenException"/> class.
538 </summary>
539 <param name="errorMsg">error message</param>
540 </member>
541 <member name="T:HttpServer.Exceptions.HttpException">
542 <summary>
543 All HTTP based exceptions will derive this class.
544 </summary>
545 </member>
546 <member name="M:HttpServer.Exceptions.HttpException.#ctor(System.Net.HttpStatusCode,System.String)">
547 <summary>
548 Create a new HttpException
549 </summary>
550 <param name="code">http status code (sent in the response)</param>
551 <param name="message">error description</param>
552 </member>
553 <member name="M:HttpServer.Exceptions.HttpException.#ctor(System.Net.HttpStatusCode,System.String,System.Exception)">
554 <summary>
555 Create a new HttpException
556 </summary>
557 <param name="code">http status code (sent in the response)</param>
558 <param name="message">error description</param>
559 <param name="inner">inner exception</param>
560 </member>
561 <member name="P:HttpServer.Exceptions.HttpException.HttpStatusCode">
562 <summary>
563 status code to use in the response.
564 </summary>
565 </member>
566 <member name="T:HttpServer.Exceptions.InternalServerException">
567 <summary>
568 The server encountered an unexpected condition which prevented it from fulfilling the request.
569 </summary>
570 </member>
571 <member name="M:HttpServer.Exceptions.InternalServerException.#ctor">
572 <summary>
573 Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class.
574 </summary>
575 </member>
576 <member name="M:HttpServer.Exceptions.InternalServerException.#ctor(System.String)">
577 <summary>
578 Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class.
579 </summary>
580 <param name="message">error message.</param>
581 </member>
582 <member name="M:HttpServer.Exceptions.InternalServerException.#ctor(System.String,System.Exception)">
583 <summary>
584 Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class.
585 </summary>
586 <param name="message">error message.</param>
587 <param name="inner">inner exception.</param>
588 </member>
589 <member name="T:HttpServer.Exceptions.NotFoundException">
590 <summary>
591 The requested resource was not found in the web server.
592 </summary>
593 </member>
594 <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String,System.Exception)">
595 <summary>
596 Create a new exception
597 </summary>
598 <param name="message">message describing the error</param>
599 <param name="inner">inner exception</param>
600 </member>
601 <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String)">
602 <summary>
603 Create a new exception
604 </summary>
605 <param name="message">message describing the error</param>
606 </member>
607 <member name="T:HttpServer.Exceptions.UnauthorizedException">
608 <summary>
609 The request requires user authentication. The response MUST include a
610 WWW-Authenticate header field (section 14.47) containing a challenge
611 applicable to the requested resource.
612
613 The client MAY repeat the request with a suitable Authorization header
614 field (section 14.8). If the request already included Authorization
615 credentials, then the 401 response indicates that authorization has been
616 refused for those credentials. If the 401 response contains the same challenge
617 as the prior response, and the user agent has already attempted authentication
618 at least once, then the user SHOULD be presented the entity that was given in the response,
619 since that entity might include relevant diagnostic information.
620
621 HTTP access authentication is explained in rfc2617:
622 http://www.ietf.org/rfc/rfc2617.txt
623
624 (description is taken from
625 http://www.submissionchamber.com/help-guides/error-codes.php#sec10.4.2)
626 </summary>
627 </member>
628 <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor">
629 <summary>
630 Create a new unauhtorized exception.
631 </summary>
632 <seealso cref="T:HttpServer.Exceptions.UnauthorizedException"/>
633 </member>
634 <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String,System.Exception)">
635 <summary>
636 Create a new unauhtorized exception.
637 </summary>
638 <param name="message">reason to why the request was unauthorized.</param>
639 <param name="inner">inner exception</param>
640 </member>
641 <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String)">
642 <summary>
643 Create a new unauhtorized exception.
644 </summary>
645 <param name="message">reason to why the request was unauthorized.</param>
646 </member>
647 <member name="T:HttpServer.FormDecoders.FormDecoderProvider">
648 <summary>
649 This provider is used to let us implement any type of form decoding we want without
650 having to rewrite anything else in the server.
651 </summary>
652 </member>
653 <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Decode(System.String,System.IO.Stream,System.Text.Encoding)">
654 <summary>
655
656 </summary>
657 <param name="contentType">Should contain boundary and type, as in: multipart/form-data; boundary=---------------------------230051238959</param>
658 <param name="stream">Stream containing form data.</param>
659 <param name="encoding">Encoding used when decoding the stream</param>
660 <returns><see cref="F:HttpServer.HttpInput.Empty"/> if no parser was found.</returns>
661 <exception cref="T:System.ArgumentException">If stream is null or not readable.</exception>
662 <exception cref="T:System.IO.InvalidDataException">If stream contents cannot be decoded properly.</exception>
663 </member>
664 <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Add(HttpServer.FormDecoders.IFormDecoder)">
665 <summary>
666 Add a decoder.
667 </summary>
668 <param name="decoder"></param>
669 <exception cref="T:System.ArgumentNullException"></exception>
670 </member>
671 <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Count">
672 <summary>
673 Number of added decoders.
674 </summary>
675 </member>
676 <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Decoders">
677 <summary>
678 Use with care.
679 </summary>
680 </member>
681 <member name="P:HttpServer.FormDecoders.FormDecoderProvider.DefaultDecoder">
682 <summary>
683 Decoder used for unknown content types.
684 </summary>
685 </member>
686 <member name="T:HttpServer.FormDecoders.HttpMultipart.Element">
687 <summary>Represents a field in a multipart form</summary>
688 </member>
689 <member name="M:HttpServer.FormDecoders.HttpMultipart.ReadLine">
690 <summary>
691
692 </summary>
693 <returns></returns>
694 <exception cref="T:System.ArgumentOutOfRangeException"></exception>
695 <exception cref="T:System.ObjectDisposedException"></exception>
696 </member>
697 <member name="T:HttpServer.FormDecoders.IFormDecoder">
698 <summary>
699 Interface for form content decoders.
700 </summary>
701 </member>
702 <member name="M:HttpServer.FormDecoders.IFormDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)">
703 <summary>
704
705 </summary>
706 <param name="stream">Stream containing the content</param>
707 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param>
708 <param name="encoding">Stream enconding</param>
709 <returns>A http form, or null if content could not be parsed.</returns>
710 <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception>
711 </member>
712 <member name="M:HttpServer.FormDecoders.IFormDecoder.CanParse(System.String)">
713 <summary>
714 Checks if the decoder can handle the mime type
715 </summary>
716 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param>
717 <returns>True if the decoder can parse the specified content type</returns>
718 </member>
719 <member name="T:HttpServer.FormDecoders.MultipartDecoder">
720 <summary>
721
722 </summary>
723 <remarks>
724 http://www.faqs.org/rfcs/rfc1867.html
725 </remarks>
726 </member>
727 <member name="F:HttpServer.FormDecoders.MultipartDecoder.MimeType">
728 <summary>
729 multipart/form-data
730 </summary>
731 </member>
732 <member name="F:HttpServer.FormDecoders.MultipartDecoder.FormData">
733 <summary>
734 form-data
735 </summary>
736 </member>
737 <member name="M:HttpServer.FormDecoders.MultipartDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)">
738 <summary>
739
740 </summary>
741 <param name="stream">Stream containing the content</param>
742 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param>
743 <param name="encoding">Stream enconding</param>
744 <returns>A http form, or null if content could not be parsed.</returns>
745 <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception>
746 <exception cref="T:System.ArgumentNullException">If any parameter is null</exception>
747 </member>
748 <member name="M:HttpServer.FormDecoders.MultipartDecoder.CanParse(System.String)">
749 <summary>
750 Checks if the decoder can handle the mime type
751 </summary>
752 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param>
753 <returns>True if the decoder can parse the specified content type</returns>
754 </member>
755 <member name="T:HttpServer.FormDecoders.UrlDecoder">
756 <summary>
757 Can handle application/x-www-form-urlencoded
758 </summary>
759 </member>
760 <member name="M:HttpServer.FormDecoders.UrlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)">
761 <summary>
762 </summary>
763 <param name="stream">Stream containing the content</param>
764 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param>
765 <param name="encoding">Stream encoding</param>
766 <returns>
767 A HTTP form, or null if content could not be parsed.
768 </returns>
769 <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception>
770 </member>
771 <member name="M:HttpServer.FormDecoders.UrlDecoder.CanParse(System.String)">
772 <summary>
773 Checks if the decoder can handle the mime type
774 </summary>
775 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param>
776 <returns>True if the decoder can parse the specified content type</returns>
777 </member>
778 <member name="T:HttpServer.FormDecoders.XmlDecoder">
779 <summary>
780 This decoder converts XML documents to form items.
781 Each element becomes a subitem in the form, and each attribute becomes an item.
782 </summary>
783 <example>
784 // xml: <hello id="1">something<world id="2">data</world></hello>
785 // result:
786 // form["hello"].Value = "something"
787 // form["hello"]["id"].Value = 1
788 // form["hello"]["world]["id"].Value = 1
789 // form["hello"]["world"].Value = "data"
790 </example>
791 <remarks>
792 The original xml document is stored in form["__xml__"].Value.
793 </remarks>
794 </member>
795 <member name="M:HttpServer.FormDecoders.XmlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)">
796 <summary>
797
798 </summary>
799 <param name="stream">Stream containing the content</param>
800 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param>
801 <param name="encoding">Stream encoding</param>
802 Note: contentType and encoding are not used?
803 <returns>A http form, or null if content could not be parsed.</returns>
804 <exception cref="T:System.IO.InvalidDataException"></exception>
805 </member>
806 <member name="M:HttpServer.FormDecoders.XmlDecoder.TraverseNode(HttpServer.IHttpInput,System.Xml.XmlNode)">
807 <summary>
808 Recursive function that will go through an xml element and store it's content
809 to the form item.
810 </summary>
811 <param name="item">(parent) Item in form that content should be added to.</param>
812 <param name="node">Node that should be parsed.</param>
813 </member>
814 <member name="M:HttpServer.FormDecoders.XmlDecoder.CanParse(System.String)">
815 <summary>
816 Checks if the decoder can handle the mime type
817 </summary>
818 <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param>
819 <returns>True if the decoder can parse the specified content type</returns>
820 </member>
821 <member name="T:HttpServer.Helpers.FormHelper">
822 <summary>
823 Helpers making it easier to work with forms.
824 </summary>
825 <seealso cref="T:HttpServer.Helpers.ObjectForm"/>
826 </member>
827 <member name="F:HttpServer.Helpers.FormHelper.JSImplementation">
828 <summary>
829 Used to let the website use different JavaScript libraries.
830 Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/>
831 </summary>
832 </member>
833 <member name="M:HttpServer.Helpers.FormHelper.Start(System.String,System.String,System.Boolean,System.String[])">
834 <summary>
835 Create a &lt;form&gt; tag.
836 </summary>
837 <param name="id">name of form</param>
838 <param name="action">action to invoke on submit</param>
839 <param name="isAjax">form should be posted as Ajax</param>
840 <returns>HTML code</returns>
841 <example>
842 <code>
843 // without options
844 WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax);
845
846 // with options
847 WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax, "style", "display:inline", "class", "greenForm");
848 </code>
849 </example>
850 <param name="options">HTML attributes or JavaScript options.</param>
851 <remarks>Method will ALWAYS be POST.</remarks>
852 <exception cref="T:System.ArgumentException">options must consist of name, value, name, value</exception>
853 </member>
854 <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)">
855 <summary>
856 Creates a select list with the values in a collection.
857 </summary>
858 <param name="name">Name of the SELECT-tag</param>
859 <param name="collection">collection used to generate options.</param>
860 <param name="getIdTitle">delegate used to return id and title from objects.</param>
861 <param name="selectedValue">value that should be marked as selected.</param>
862 <param name="firstEmpty">First row should contain an empty value.</param>
863 <returns>string containing a SELECT-tag.</returns>
864 <seealso cref="T:HttpServer.Helpers.GetIdTitle"/>
865 </member>
866 <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)">
867 <summary>
868 Creates a select list with the values in a collection.
869 </summary>
870 <param name="name">Name of the SELECT-tag</param>
871 <param name="id">Id of the SELECT-tag</param>
872 <param name="collection">collection used to generate options.</param>
873 <param name="getIdTitle">delegate used to return id and title from objects.</param>
874 <param name="selectedValue">value that should be marked as selected.</param>
875 <param name="firstEmpty">First row should contain an empty value.</param>
876 <returns>string containing a SELECT-tag.</returns>
877 <seealso cref="T:HttpServer.Helpers.GetIdTitle"/>
878 <example>
879 <code>
880 // Class that is going to be used in a SELECT-tag.
881 public class User
882 {
883 private readonly string _realName;
884 private readonly int _id;
885 public User(int id, string realName)
886 {
887 _id = id;
888 _realName = realName;
889 }
890 public string RealName
891 {
892 get { return _realName; }
893 }
894
895 public int Id
896 {
897 get { return _id; }
898 }
899 }
900
901 // Using an inline delegate to generate the select list
902 public void UserInlineDelegate()
903 {
904 List&lt;User&gt; items = new List&lt;User&gt;();
905 items.Add(new User(1, "adam"));
906 items.Add(new User(2, "bertial"));
907 items.Add(new User(3, "david"));
908 string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value)
909 {
910 User user = (User)o;
911 id = user.Id;
912 value = user.RealName;
913 }, 2, true);
914 }
915
916 // Using an method as delegate to generate the select list.
917 public void UseExternalDelegate()
918 {
919 List&lt;User&gt; items = new List&lt;User&gt;();
920 items.Add(new User(1, "adam"));
921 items.Add(new User(2, "bertial"));
922 items.Add(new User(3, "david"));
923 string htmlSelect = Select("users", "users", items, UserOptions, 1, true);
924 }
925
926 // delegate returning id and title
927 public static void UserOptions(object o, out object id, out object title)
928 {
929 User user = (User)o;
930 id = user.Id;
931 value = user.RealName;
932 }
933 </code>
934 </example>
935 <exception cref="T:System.ArgumentNullException"><c>name</c>, <c>id</c>, <c>collection</c> or <c>getIdTitle</c> is null.</exception>
936 </member>
937 <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean,System.String[])">
938 <summary>
939 Creates a select list with the values in a collection.
940 </summary>
941 <param name="name">Name of the SELECT-tag</param>
942 <param name="id">Id of the SELECT-tag</param>
943 <param name="collection">collection used to generate options.</param>
944 <param name="getIdTitle">delegate used to return id and title from objects.</param>
945 <param name="selectedValue">value that should be marked as selected.</param>
946 <param name="firstEmpty">First row should contain an empty value.</param>
947 <param name="htmlAttributes">name, value collection of extra HTML attributes.</param>
948 <returns>string containing a SELECT-tag.</returns>
949 <seealso cref="T:HttpServer.Helpers.GetIdTitle"/>
950 <exception cref="T:System.ArgumentNullException"><c>name</c>, <c>id</c>, <c>collection</c> or <c>getIdTitle</c> is null.</exception>
951 <exception cref="T:System.ArgumentException">Invalid HTML attribute list.</exception>
952 </member>
953 <member name="M:HttpServer.Helpers.FormHelper.Options(System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)">
954 <summary>
955 Generate a list of HTML options
956 </summary>
957 <param name="collection">collection used to generate options.</param>
958 <param name="getIdTitle">delegate used to return id and title from objects.</param>
959 <param name="selectedValue">value that should be marked as selected.</param>
960 <param name="firstEmpty">First row should contain an empty value.</param>
961 <returns></returns>
962 <exception cref="T:System.ArgumentNullException"><c>collection</c> or <c>getIdTitle</c> is null.</exception>
963 </member>
964 <member name="M:HttpServer.Helpers.FormHelper.Options(System.Text.StringBuilder,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)">
965 <exception cref="T:System.ArgumentNullException"><c>sb</c> is null.</exception>
966 </member>
967 <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.Object,System.Object,System.String[])">
968 <summary>
969 Creates a check box.
970 </summary>
971 <param name="name">element name</param>
972 <param name="value">element value</param>
973 <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the
974 type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
975 the box is checked or not. </param>
976 <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param>
977 <returns>a generated radio button</returns>
978 </member>
979 <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.String,System.Object,System.Object,System.String[])">
980 <summary>
981 Creates a check box.
982 </summary>
983 <param name="name">element name</param>
984 <param name="id">element id</param>
985 <param name="value">element value</param>
986 <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the
987 type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
988 the box is checked or not. </param>
989 <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param>
990 <returns>a generated radio button</returns>
991 <remarks>
992 value in your business object. (check box will be selected if it matches the element value)
993 </remarks>
994 </member>
995 <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.String,System.Object,System.String[])">
996 <summary>
997 Creates a check box.
998 </summary>
999 <param name="name">element name</param>
1000 <param name="id">element id</param>
1001 <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the
1002 type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
1003 the box is checked or not. </param>
1004 <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param>
1005 <returns>a generated radio button</returns>
1006 <remarks>will set value to "1".</remarks>
1007 </member>
1008 <member name="M:HttpServer.Helpers.FormHelper.RadioButton(System.String,System.Object,System.Object,System.String[])">
1009 <summary>
1010 Creates a RadioButton.
1011 </summary>
1012 <param name="name">element name</param>
1013 <param name="value">element value</param>
1014 <param name="isSelected">determines if the radio button is selected or not. This is done differently depending on the
1015 type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
1016 the box is checked or not. </param>
1017 <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param>
1018 <returns>a generated radio button</returns>
1019 </member>
1020 <member name="M:HttpServer.Helpers.FormHelper.RadioButton(System.String,System.String,System.Object,System.Object,System.String[])">
1021 <summary>
1022 Creates a RadioButton.
1023 </summary>
1024 <param name="name">element name</param>
1025 <param name="id">element id</param>
1026 <param name="value">element value</param>
1027 <param name="isSelected">determines if the radio button is selected or not. This is done differently depending on the
1028 type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
1029 the box is checked or not. </param>
1030 <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param>
1031 <returns>a generated radio button</returns>
1032 </member>
1033 <member name="M:HttpServer.Helpers.FormHelper.End">
1034 <summary>
1035 form close tag
1036 </summary>
1037 <returns></returns>
1038 </member>
1039 <member name="T:HttpServer.Helpers.GetIdTitle">
1040 <summary>
1041 Delegate used by <see cref="M:HttpServer.Helpers.FormHelper.Select(System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"/> to populate select options.
1042 </summary>
1043 <param name="obj">current object (for instance a User).</param>
1044 <param name="id">Text that should be displayed in the value part of a &lt;optiongt;-tag.</param>
1045 <param name="title">Text shown in the select list.</param>
1046 <example>
1047 // Class that is going to be used in a SELECT-tag.
1048 public class User
1049 {
1050 private readonly string _realName;
1051 private readonly int _id;
1052 public User(int id, string realName)
1053 {
1054 _id = id;
1055 _realName = realName;
1056 }
1057 public string RealName
1058 {
1059 get { return _realName; }
1060 }
1061
1062 public int Id
1063 {
1064 get { return _id; }
1065 }
1066 }
1067
1068 // Using an inline delegate to generate the select list
1069 public void UserInlineDelegate()
1070 {
1071 List&lt;User&gt; items = new List&lt;User&gt;();
1072 items.Add(new User(1, "adam"));
1073 items.Add(new User(2, "bertial"));
1074 items.Add(new User(3, "david"));
1075 string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value)
1076 {
1077 User user = (User)o;
1078 id = user.Id;
1079 value = user.RealName;
1080 }, 2, true);
1081 }
1082
1083 // Using an method as delegate to generate the select list.
1084 public void UseExternalDelegate()
1085 {
1086 List&lt;User&gt; items = new List&lt;User&gt;();
1087 items.Add(new User(1, "adam"));
1088 items.Add(new User(2, "bertial"));
1089 items.Add(new User(3, "david"));
1090 string htmlSelect = Select("users", "users", items, UserOptions, 1, true);
1091 }
1092
1093 // delegate returning id and title
1094 public static void UserOptions(object o, out object id, out object title)
1095 {
1096 User user = (User)o;
1097 id = user.Id;
1098 value = user.RealName;
1099 } /// </example>
1100 </member>
1101 <member name="T:HttpServer.Helpers.Implementations.PrototypeImp">
1102 <summary>
1103 PrototypeJS implementation of the javascript functions.
1104 </summary>
1105 </member>
1106 <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxRequest(System.String,System.String[])">
1107 <summary>
1108 Requests a url through ajax
1109 </summary>
1110 <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param>
1111 <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param>
1112 <returns>a link tag</returns>
1113 <remarks>onclick attribute is used by this method.</remarks>
1114 <example>
1115 <code>
1116 // plain text
1117 JSHelper.AjaxRequest("'/user/show/1'");
1118
1119 // ajax request using this.href
1120 string link = "&lt;a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/&lt;call user&lt;/a&gt;";
1121 </code>
1122 </example>
1123 </member>
1124 <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.Contains(System.Collections.Generic.IEnumerable{System.String},System.String)">
1125 <summary>
1126 Determins if a list of strings contains a specific value
1127 </summary>
1128 <param name="options">options to check in</param>
1129 <param name="value">value to find</param>
1130 <returns>true if value was found</returns>
1131 <remarks>case insensitive</remarks>
1132 </member>
1133 <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxUpdater(System.String,System.String,System.String[])">
1134 <summary>
1135 Ajax requests that updates an element with
1136 the fetched content
1137 </summary>
1138 <param name="url">URL to fetch. URL is NOT enclosed in quotes by the implementation. You need to do that yourself.</param>
1139 <param name="targetId">element to update</param>
1140 <param name="options">options in format "key, value, key, value". All keys should end with colon.</param>
1141 <returns>A link tag.</returns>
1142 <example>
1143 <code>
1144 JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true");
1145 </code>
1146 </example>
1147 </member>
1148 <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])">
1149 <summary>
1150 A link that pop ups a Dialog (overlay div)
1151 </summary>
1152 <param name="url">URL to contents of dialog</param>
1153 <param name="title">link title</param>
1154 <param name="htmlAttributes">name, value, name, value</param>
1155 <returns>
1156 A "a"-tag that popups a dialog when clicked
1157 </returns>
1158 <remarks><para>Requires Control.Modal found here: http://livepipe.net/projects/control_modal/</para>
1159 And the following JavaScript (load it in application.js):
1160 <code>
1161 Event.observe(window, 'load',
1162 function() {
1163 document.getElementsByClassName('modal').each(function(link){ new Control.Modal(link); });
1164 }
1165 );
1166 </code>
1167 </remarks>
1168 <example>
1169 WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');");
1170 </example>
1171 </member>
1172 <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CreateDialog(System.String,System.String,System.String[])">
1173 <summary>
1174 create a modal dialog (usually using DIVs)
1175 </summary>
1176 <param name="url">url to fetch</param>
1177 <param name="title">dialog title</param>
1178 <param name="options">javascript/html attributes. javascript options ends with colon ':'.</param>
1179 <returns></returns>
1180 </member>
1181 <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CloseDialog">
1182 <summary>
1183 Close a javascript dialog window/div.
1184 </summary>
1185 <returns>javascript for closing a dialog.</returns>
1186 <see cref="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])" />
1187 </member>
1188 <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxFormOnSubmit(System.String[])">
1189 <summary>
1190 javascript action that should be added to the "onsubmit" event in the form tag.
1191 </summary>
1192 <param name="options">remember to encapsulate strings in ''</param>
1193 <returns></returns>
1194 <remarks>All javascript option names should end with colon.</remarks>
1195 <example>
1196 <code>
1197 JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);");
1198 </code>
1199 </example>
1200 </member>
1201 <member name="T:HttpServer.Helpers.JSHelper">
1202 <summary>
1203 Will contain helper functions for javascript.
1204 </summary>
1205 </member>
1206 <member name="M:HttpServer.Helpers.JSHelper.AjaxRequest(System.String,System.String[])">
1207 <summary>
1208 Requests a url through ajax
1209 </summary>
1210 <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param>
1211 <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param>
1212 <returns>a link tag</returns>
1213 <remarks>onclick attribute is used by this method.</remarks>
1214 <example>
1215 <code>
1216 // plain text
1217 JSHelper.AjaxRequest("'/user/show/1'");
1218
1219 // ajax request using this.href
1220 string link = "&lt;a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/&lt;call user&lt;/a&gt;";
1221 </code>
1222 </example>
1223 </member>
1224 <member name="M:HttpServer.Helpers.JSHelper.AjaxUpdater(System.String,System.String,System.String[])">
1225 <summary>
1226 Ajax requests that updates an element with
1227 the fetched content
1228 </summary>
1229 <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param>
1230 <param name="targetId">element to update</param>
1231 <param name="options">options in format "key, value, key, value". All keys should end with colon.</param>
1232 <returns>A link tag.</returns>
1233 <example>
1234 <code>
1235 JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true");
1236 </code>
1237 </example>
1238 </member>
1239 <member name="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])">
1240 <summary>
1241 Opens contents in a dialog window.
1242 </summary>
1243 <param name="url">url to contents of dialog</param>
1244 <param name="title">link title</param>
1245 <param name="options">name, value, name, value, all parameter names should end with colon.</param>
1246 </member>
1247 <member name="M:HttpServer.Helpers.JSHelper.CloseDialog">
1248 <summary>
1249 Close a javascript dialog window/div.
1250 </summary>
1251 <returns>javascript for closing a dialog.</returns>
1252 <see cref="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])" />
1253 </member>
1254 <member name="T:HttpServer.Helpers.ObjectForm">
1255 <summary>
1256 The object form class takes an object and creates form items for it.
1257 </summary>
1258 </member>
1259 <member name="M:HttpServer.Helpers.ObjectForm.#ctor(System.String,System.String,System.Object,System.String)">
1260 <summary>
1261 Initializes a new instance of the <see cref="T:HttpServer.Helpers.ObjectForm"/> class.
1262 </summary>
1263 <param name="method"></param>
1264 <param name="name">form name *and* id.</param>
1265 <param name="action">action to do when form is posted.</param>
1266 <param name="obj"></param>
1267 </member>
1268 <member name="M:HttpServer.Helpers.ObjectForm.#ctor(System.String,System.String,System.Object)">
1269 <summary>
1270 Initializes a new instance of the <see cref="T:HttpServer.Helpers.ObjectForm"/> class.
1271 </summary>
1272 <param name="name">form name *and* id.</param>
1273 <param name="action">action to do when form is posted.</param>
1274 <param name="obj">object to get values from</param>
1275 </member>
1276 <member name="M:HttpServer.Helpers.ObjectForm.#ctor(System.String,System.Object)">
1277 <summary>
1278 Initializes a new instance of the <see cref="T:HttpServer.Helpers.ObjectForm"/> class.
1279 </summary>
1280 <param name="action">form action.</param>
1281 <param name="obj">object to get values from.</param>
1282 </member>
1283 <member name="M:HttpServer.Helpers.ObjectForm.Begin">
1284 <summary>
1285 write out the FORM-tag.
1286 </summary>
1287 <returns>generated html code</returns>
1288 </member>
1289 <member name="M:HttpServer.Helpers.ObjectForm.Begin(System.Boolean)">
1290 <summary>
1291 Writeout the form tag
1292 </summary>
1293 <param name="isAjax">form should be posted through ajax.</param>
1294 <returns>generated html code</returns>
1295 </member>
1296 <member name="M:HttpServer.Helpers.ObjectForm.Tb(System.String,System.Object[])">
1297 <summary>
1298 Generates a text box.
1299 </summary>
1300 <param name="propertyName"></param>
1301 <param name="options"></param>
1302 <returns>generated html code</returns>
1303 </member>
1304 <member name="M:HttpServer.Helpers.ObjectForm.Pb(System.String,System.Object[])">
1305 <summary>
1306 password box
1307 </summary>
1308 <param name="propertyName"></param>
1309 <param name="options"></param>
1310 <returns>generated html code</returns>
1311 </member>
1312 <member name="M:HttpServer.Helpers.ObjectForm.Hidden(System.String,System.Object[])">
1313 <summary>
1314 Hiddens the specified property name.
1315 </summary>
1316 <param name="propertyName">Name of the property.</param>
1317 <param name="options">The options.</param>
1318 <returns>generated html code</returns>
1319 </member>
1320 <member name="M:HttpServer.Helpers.ObjectForm.Label(System.String,System.String)">
1321 <summary>
1322 Labels the specified property name.
1323 </summary>
1324 <param name="propertyName">property in object.</param>
1325 <param name="label">caption</param>
1326 <returns>generated html code</returns>
1327 </member>
1328 <member name="M:HttpServer.Helpers.ObjectForm.Cb(System.String,System.String,System.Object[])">
1329 <summary>
1330 Generate a checkbox
1331 </summary>
1332 <param name="propertyName">property in object</param>
1333 <param name="value">checkbox value</param>
1334 <param name="options">additional html attributes.</param>
1335 <returns>generated html code</returns>
1336 </member>
1337 <member name="M:HttpServer.Helpers.ObjectForm.Select(System.String,System.String,System.String,System.Object[])">
1338 <summary>
1339 Write a html select tag
1340 </summary>
1341 <param name="propertyName">object property.</param>
1342 <param name="idColumn">id column</param>
1343 <param name="titleColumn">The title column.</param>
1344 <param name="options">The options.</param>
1345 <returns></returns>
1346 </member>
1347 <member name="M:HttpServer.Helpers.ObjectForm.Select(System.String,System.Collections.IEnumerable,System.String,System.String,System.Object[])">
1348 <summary>
1349 Selects the specified property name.
1350 </summary>
1351 <param name="propertyName">Name of the property.</param>
1352 <param name="items">The items.</param>
1353 <param name="idColumn">The id column.</param>
1354 <param name="titleColumn">The title column.</param>
1355 <param name="options">The options.</param>
1356 <returns></returns>
1357 </member>
1358 <member name="M:HttpServer.Helpers.ObjectForm.Submit(System.String)">
1359 <summary>
1360 Write a submit tag.
1361 </summary>
1362 <param name="value">button caption</param>
1363 <returns>html submit tag</returns>
1364 </member>
1365 <member name="M:HttpServer.Helpers.ObjectForm.End">
1366 <summary>
1367 html end form tag
1368 </summary>
1369 <returns>html</returns>
1370 </member>
1371 <member name="T:HttpServer.Helpers.ResourceInfo">
1372 <summary>
1373 Container to bind resource names to assemblies
1374 </summary>
1375 </member>
1376 <member name="M:HttpServer.Helpers.ResourceInfo.#ctor(System.String,System.String,System.Reflection.Assembly)">
1377 <summary>
1378 Instantiates an instance of <see cref="T:HttpServer.Helpers.ResourceInfo"/>
1379 </summary>
1380 <param name="uri">The dot seperated uri the resource maps to</param>
1381 <param name="resourceName">The full resource name</param>
1382 <param name="assembly">The assembly the resource exists in</param>
1383 </member>
1384 <member name="P:HttpServer.Helpers.ResourceInfo.Assembly">
1385 <summary>
1386 Retrieves the assembly the resource resides in
1387 </summary>
1388 </member>
1389 <member name="P:HttpServer.Helpers.ResourceInfo.Uri">
1390 <summary>
1391 Retrieves the full name/path of the assembly
1392 </summary>
1393 </member>
1394 <member name="P:HttpServer.Helpers.ResourceInfo.Extension">
1395 <summary>
1396 Retrieves the extension of the resource
1397 </summary>
1398 </member>
1399 <member name="P:HttpServer.Helpers.ResourceInfo.ExtensionLessUri">
1400 <summary>Returns the Uri without extension</summary>
1401 </member>
1402 <member name="P:HttpServer.Helpers.ResourceInfo.ResourceName">
1403 <summary>Retrieves the full path name to the resource file</summary>
1404 </member>
1405 <member name="M:HttpServer.Helpers.ResourceInfo.GetStream">
1406 <summary>
1407 Retrieves a stream to the resource
1408 </summary>
1409 <returns>Null if the resource couldn't be located somehow</returns>
1410 </member>
1411 <member name="T:HttpServer.Helpers.ResourceManager">
1412 <summary>Class to handle loading of resource files</summary>
1413 </member>
1414 <member name="M:HttpServer.Helpers.ResourceManager.#ctor">
1415 <summary>
1416 Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class.
1417 </summary>
1418 </member>
1419 <member name="M:HttpServer.Helpers.ResourceManager.#ctor(HttpServer.ILogWriter)">
1420 <summary>
1421 Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class.
1422 </summary>
1423 <param name="writer">logger.</param>
1424 </member>
1425 <member name="M:HttpServer.Helpers.ResourceManager.LoadResources(System.String,System.Reflection.Assembly,System.String)">
1426 <summary>
1427 Loads resources from a namespace in the given assembly to an URI
1428 </summary>
1429 <param name="toUri">The URI to map the resources to</param>
1430 <param name="fromAssembly">The assembly in which the resources reside</param>
1431 <param name="fromNamespace">The namespace from which to load the resources</param>
1432 <usage>
1433 <code>
1434 resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views");
1435 </code>
1436 Will make the resource MyLib.Models.User.Views.list.Haml accessible via /user/list.haml or /user/list/
1437 </usage>
1438 <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns>
1439 <exception cref="T:System.InvalidOperationException">If a resource has already been mapped to an uri</exception>
1440 </member>
1441 <member name="M:HttpServer.Helpers.ResourceManager.GetResourceStream(System.String)">
1442 <summary>
1443 Retrieves a stream for the specified resource path if loaded otherwise null
1444 </summary>
1445 <param name="path">Path to the resource to retrieve a stream for</param>
1446 <returns>A stream or null if the resource couldn't be found</returns>
1447 </member>
1448 <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String)">
1449 <summary>
1450 Fetch all files from the resource that matches the specified arguments.
1451 </summary>
1452 <param name="path">The path to the resource to extract</param>
1453 <returns>
1454 a list of files if found; or an empty array if no files are found.
1455 </returns>
1456 <exception cref="T:System.ArgumentException">Search path must end with an asterisk for finding arbitrary files</exception>
1457 </member>
1458 <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String,System.String)">
1459 <summary>
1460 Fetch all files from the resource that matches the specified arguments.
1461 </summary>
1462 <param name="path">Where the file should reside.</param>
1463 <param name="filename">Files to check</param>
1464 <returns>
1465 a list of files if found; or an empty array if no files are found.
1466 </returns>
1467 </member>
1468 <member name="M:HttpServer.Helpers.ResourceManager.ContainsResource(System.String)">
1469 <summary>
1470 Returns whether or not the loader has an instance of the file requested
1471 </summary>
1472 <param name="filename">The name of the template/file</param>
1473 <returns>True if the loader can provide the file</returns>
1474 </member>
1475 <member name="T:HttpServer.Helpers.WebHelper">
1476 <summary>
1477 Webhelper provides helpers for common tasks in HTML.
1478 </summary>
1479 </member>
1480 <member name="F:HttpServer.Helpers.WebHelper.JSImplementation">
1481 <summary>
1482 Used to let the website use different javascript libraries.
1483 Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/>
1484 </summary>
1485 </member>
1486 <member name="M:HttpServer.Helpers.WebHelper.AjaxRequest(System.String,System.String,System.String[])">
1487 <summary>
1488 Creates a link that invokes through ajax.
1489 </summary>
1490 <param name="url">url to fetch</param>
1491 <param name="title">link title</param>
1492 <param name="options">
1493 optional options in format "key, value, key, value".
1494 Javascript options starts with ':'.
1495 </param>
1496 <returns>a link tag</returns>
1497 <example>
1498 WebHelper.AjaxRequest("/users/add/", "Add user", "method:", "post", "onclick", "validate('this');");
1499 </example>
1500 </member>
1501 <member name="M:HttpServer.Helpers.WebHelper.AjaxUpdater(System.String,System.String,System.String,System.String[])">
1502 <summary>
1503 Builds a link that updates an element with the fetched ajax content.
1504 </summary>
1505 <param name="url">Url to fetch content from</param>
1506 <param name="title">link title</param>
1507 <param name="targetId">html element to update with the results of the ajax request.</param>
1508 <param name="options">optional options in format "key, value, key, value"</param>
1509 <returns>A link tag.</returns>
1510 </member>
1511 <member name="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])">
1512 <summary>
1513 A link that pop ups a Dialog (overlay div)
1514 </summary>
1515 <param name="url">url to contents of dialog</param>
1516 <param name="title">link title</param>
1517 <param name="htmlAttributes">name/value of html attributes.</param>
1518 <returns>A "a"-tag that popups a dialog when clicked</returns>
1519 <example>
1520 WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');");
1521 </example>
1522 </member>
1523 <member name="M:HttpServer.Helpers.WebHelper.CreateDialog(System.String,System.String,System.String[])">
1524 <summary>
1525 Create/Open a dialog box using ajax
1526 </summary>
1527 <param name="url"></param>
1528 <param name="title"></param>
1529 <param name="parameters"></param>
1530 <returns></returns>
1531 </member>
1532 <member name="M:HttpServer.Helpers.WebHelper.CloseDialog">
1533 <summary>
1534 Close a javascript dialog window/div.
1535 </summary>
1536 <returns>javascript for closing a dialog.</returns>
1537 <see cref="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"/>
1538 </member>
1539 <member name="M:HttpServer.Helpers.WebHelper.FormStart(System.String,System.String,System.Boolean)">
1540 <summary>
1541 Create a &lt;form&gt; tag.
1542 </summary>
1543 <param name="name">name of form</param>
1544 <param name="action">action to invoke on submit</param>
1545 <param name="isAjax">form should be posted as ajax</param>
1546 <returns>html code</returns>
1547 <example>
1548 WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax);
1549 </example>
1550 </member>
1551 <member name="M:HttpServer.Helpers.WebHelper.Link(System.String,System.String,System.String[])">
1552 <summary>
1553 Create a link tag.
1554 </summary>
1555 <param name="url">url to go to</param>
1556 <param name="title">link title (text that is displayed)</param>
1557 <param name="htmlAttributes">html attributes, name, value, name, value</param>
1558 <returns>html code</returns>
1559 <example>
1560 WebHelper.Link("/user/show/1", "Show user", "id", "showUser", "onclick", "return confirm('Are you shure?');");
1561 </example>
1562 </member>
1563 <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[])">
1564 <summary>
1565 Build a link
1566 </summary>
1567 <param name="url">url to go to.</param>
1568 <param name="title">title of link (displayed text)</param>
1569 <param name="htmlAttributes">extra html attributes.</param>
1570 <returns>a complete link</returns>
1571 </member>
1572 <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[],System.String[])">
1573 <summary>
1574 Build a link
1575 </summary>
1576 <param name="url">url to go to.</param>
1577 <param name="title">title of link (displayed text)</param>
1578 <param name="htmlAttributes">extra html attributes.</param>
1579 <returns>a complete link</returns>
1580 <param name="options">more options</param>
1581 </member>
1582 <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)">
1583 <summary>
1584 Obsolete
1585 </summary>
1586 <param name="name">Obsolete</param>
1587 <param name="collection">Obsolete</param>
1588 <param name="getIdTitle">Obsolete</param>
1589 <param name="selectedValue">Obsolete</param>
1590 <param name="firstEmpty">Obsolete</param>
1591 <returns>Obsolete</returns>
1592 </member>
1593 <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)">
1594 <summary>
1595 Obsolete
1596 </summary>
1597 <param name="name">Obsolete</param>
1598 <param name="id">Obsolete</param>
1599 <param name="collection">Obsolete</param>
1600 <param name="getIdTitle">Obsolete</param>
1601 <param name="selectedValue">Obsolete</param>
1602 <param name="firstEmpty">Obsolete</param>
1603 <returns>Obsolete</returns>
1604 </member>
1605 <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Generic.IEnumerable{System.Object},System.String)">
1606 <summary>
1607 Render errors into a UL with class "errors"
1608 </summary>
1609 <param name="className">class used by UL-tag.</param>
1610 <param name="theList">items to list</param>
1611 <returns>an unordered html list.</returns>
1612 </member>
1613 <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Specialized.NameValueCollection,System.String)">
1614 <summary>
1615 Render errors into a UL with class "errors"
1616 </summary>
1617 <param name="className">class used by UL-tag.</param>
1618 <param name="theList">items to list</param>
1619 <returns>an unordered html list.</returns>
1620 </member>
1621 <member name="M:HttpServer.Helpers.WebHelper.Errors(System.Collections.Specialized.NameValueCollection)">
1622 <summary>
1623 Render errors into a UL with class "errors"
1624 </summary>
1625 <param name="errors"></param>
1626 <returns></returns>
1627 </member>
1628 <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[],System.String[])">
1629 <summary>
1630 Generates a list with html attributes.
1631 </summary>
1632 <param name="sb">StringBuilder that the options should be added to.</param>
1633 <param name="firstOptions">attributes set by user.</param>
1634 <param name="secondOptions">attributes set by any of the helper classes.</param>
1635 </member>
1636 <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[])">
1637 <summary>
1638 Generates a list with html attributes.
1639 </summary>
1640 <param name="sb">StringBuilder that the options should be added to.</param>
1641 <param name="options"></param>
1642 </member>
1643 <member name="T:HttpServer.Helpers.JavascriptHelperImplementation">
1644 <summary>
1645 Purpose of this class is to create a javascript toolkit independent javascript helper.
1646 </summary>
1647 </member>
1648 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.GenerateOptions(System.Text.StringBuilder,System.String[],System.Boolean)">
1649 <summary>
1650 Generates a list with JS options.
1651 </summary>
1652 <param name="sb">StringBuilder that the options should be added to.</param>
1653 <param name="options">the javascript options. name, value pairs. each string value should be escaped by YOU!</param>
1654 <param name="startWithComma">true if we should start with a comma.</param>
1655 </member>
1656 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.RemoveJavascriptOptions(System.String[])">
1657 <summary>
1658 Removes any javascript parameters from an array of parameters
1659 </summary>
1660 <param name="options">The array of parameters to remove javascript params from</param>
1661 <returns>An array of html parameters</returns>
1662 </member>
1663 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxFormOnSubmit(System.String[])">
1664 <summary>
1665 javascript action that should be added to the "onsubmit" event in the form tag.
1666 </summary>
1667 <returns></returns>
1668 <remarks>All javascript option names should end with colon.</remarks>
1669 <example>
1670 <code>
1671 JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);");
1672 </code>
1673 </example>
1674 </member>
1675 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxRequest(System.String,System.String[])">
1676 <summary>
1677 Requests a url through ajax
1678 </summary>
1679 <param name="url">url to fetch</param>
1680 <param name="options">optional options in format "key, value, key, value", used in JS request object.</param>
1681 <returns>a link tag</returns>
1682 <remarks>All javascript option names should end with colon.</remarks>
1683 <example>
1684 <code>
1685 JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);");
1686 </code>
1687 </example>
1688 </member>
1689 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxUpdater(System.String,System.String,System.String[])">
1690 <summary>
1691 Ajax requests that updates an element with
1692 the fetched content
1693 </summary>
1694 <param name="url">Url to fetch content from</param>
1695 <param name="targetId">element to update</param>
1696 <param name="options">optional options in format "key, value, key, value", used in JS updater object.</param>
1697 <returns>A link tag.</returns>
1698 <remarks>All javascript option names should end with colon.</remarks>
1699 <example>
1700 <code>
1701 JSHelper.AjaxUpdater("/user/show/1", "userInfo", "onsuccess:", "alert('Successful!');");
1702 </code>
1703 </example>
1704 </member>
1705 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])">
1706 <summary>
1707 A link that pop ups a Dialog (overlay div)
1708 </summary>
1709 <param name="url">url to contents of dialog</param>
1710 <param name="title">link title</param>
1711 <returns>A "a"-tag that popups a dialog when clicked</returns>
1712 <param name="htmlAttributes">name/value of html attributes</param>
1713 <example>
1714 WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');");
1715 </example>
1716 </member>
1717 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CloseDialog">
1718 <summary>
1719 Close a javascript dialog window/div.
1720 </summary>
1721 <returns>javascript for closing a dialog.</returns>
1722 <see cref="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"/>
1723 </member>
1724 <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CreateDialog(System.String,System.String,System.String[])">
1725 <summary>
1726 Creates a new modal dialog window
1727 </summary>
1728 <param name="url">url to open in window.</param>
1729 <param name="title">window title (may not be supported by all js implementations)</param>
1730 <param name="options"></param>
1731 <returns></returns>
1732 </member>
1733 <member name="T:HttpServer.Helpers.XmlHelper">
1734 <summary>
1735 Helpers to make XML handling easier
1736 </summary>
1737 </member>
1738 <member name="M:HttpServer.Helpers.XmlHelper.Serialize(System.Object)">
1739 <summary>
1740 Serializes object to XML.
1741 </summary>
1742 <param name="value">object to serialize.</param>
1743 <returns>XML</returns>
1744 <remarks>
1745 Removes name spaces and adds indentation
1746 </remarks>
1747 </member>
1748 <member name="M:HttpServer.Helpers.XmlHelper.Deserialize``1(System.String)">
1749 <summary>
1750 Create an object from a XML string
1751 </summary>
1752 <typeparam name="T">Type of object</typeparam>
1753 <param name="xml">XML string</param>
1754 <returns>object</returns>
1755 </member>
1756 <member name="T:HttpServer.HttpClientContext">
1757 <summary>
1758 Contains a connection to a browser/client.
1759 </summary>
1760 <remarks>
1761 Remember to <see cref="M:HttpServer.HttpClientContext.Start"/> after you have hooked the <see cref="E:HttpServer.HttpClientContext.RequestReceived"/> event.
1762 </remarks>
1763 TODO: Maybe this class should be broken up into HttpClientChannel and HttpClientContext?
1764 </member>
1765 <member name="E:HttpServer.HttpClientContext.Cleaned">
1766 <summary>
1767 This context have been cleaned, which means that it can be reused.
1768 </summary>
1769 </member>
1770 <member name="E:HttpServer.HttpClientContext.Started">
1771 <summary>
1772 Context have been started (a new client have connected)
1773 </summary>
1774 </member>
1775 <member name="M:HttpServer.HttpClientContext.#ctor(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,HttpServer.IRequestParserFactory,System.Int32,System.Net.Sockets.Socket)">
1776 <summary>
1777 Initializes a new instance of the <see cref="T:HttpServer.HttpClientContext"/> class.
1778 </summary>
1779 <param name="secured">true if the connection is secured (SSL/TLS)</param>
1780 <param name="remoteEndPoint">client that connected.</param>
1781 <param name="stream">Stream used for communication</param>
1782 <param name="parserFactory">Used to create a <see cref="T:HttpServer.IHttpRequestParser"/>.</param>
1783 <param name="bufferSize">Size of buffer to use when reading data. Must be at least 4096 bytes.</param>
1784 <exception cref="T:System.Net.Sockets.SocketException">If <see cref="M:System.Net.Sockets.Socket.BeginReceive(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags,System.AsyncCallback,System.Object)"/> fails</exception>
1785 <exception cref="T:System.ArgumentException">Stream must be writable and readable.</exception>
1786 </member>
1787 <member name="M:HttpServer.HttpClientContext.OnBodyBytesReceived(System.Object,HttpServer.Parser.BodyEventArgs)">
1788 <summary>
1789 Process incoming body bytes.
1790 </summary>
1791 <param name="sender"><see cref="T:HttpServer.IHttpRequestParser"/></param>
1792 <param name="e">Bytes</param>
1793 </member>
1794 <member name="M:HttpServer.HttpClientContext.OnHeaderReceived(System.Object,HttpServer.Parser.HeaderEventArgs)">
1795 <summary>
1796
1797 </summary>
1798 <param name="sender"></param>
1799 <param name="e"></param>
1800 </member>
1801 <member name="P:HttpServer.HttpClientContext.CurrentRequest">
1802 <summary>
1803 Overload to specify own type.
1804 </summary>
1805 <remarks>
1806 Must be specified before the context is being used.
1807 </remarks>
1808 </member>
1809 <member name="M:HttpServer.HttpClientContext.Start">
1810 <summary>
1811 Start reading content.
1812 </summary>
1813 <remarks>
1814 Make sure to call base.Start() if you override this method.
1815 </remarks>
1816 </member>
1817 <member name="M:HttpServer.HttpClientContext.Cleanup">
1818 <summary>
1819 Clean up context.
1820 </summary>
1821 <remarks>
1822 Make sure to call base.Cleanup() if you override the method.
1823 </remarks>
1824 </member>
1825 <member name="P:HttpServer.HttpClientContext.Secured">
1826 <summary>
1827 Using SSL or other encryption method.
1828 </summary>
1829 </member>
1830 <member name="P:HttpServer.HttpClientContext.IsSecured">
1831 <summary>
1832 Using SSL or other encryption method.
1833 </summary>
1834 </member>
1835 <member name="P:HttpServer.HttpClientContext.LogWriter">
1836 <summary>
1837 Specify which logger to use.
1838 </summary>
1839 </member>
1840 <member name="P:HttpServer.HttpClientContext.Stream">
1841 <summary>
1842 Gets or sets the network stream.
1843 </summary>
1844 </member>
1845 <member name="P:HttpServer.HttpClientContext.RemoteAddress">
1846 <summary>
1847 Gets or sets IP address that the client connected from.
1848 </summary>
1849 </member>
1850 <member name="P:HttpServer.HttpClientContext.RemotePort">
1851 <summary>
1852 Gets or sets port that the client connected from.
1853 </summary>
1854 </member>
1855 <member name="M:HttpServer.HttpClientContext.Disconnect(System.Net.Sockets.SocketError)">
1856 <summary>
1857 Disconnect from client
1858 </summary>
1859 <param name="error">error to report in the <see cref="E:HttpServer.HttpClientContext.Disconnected"/> event.</param>
1860 </member>
1861 <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)">
1862 <summary>
1863 Send a response.
1864 </summary>
1865 <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param>
1866 <param name="statusCode">HTTP status code</param>
1867 <param name="reason">reason for the status code.</param>
1868 <param name="body">HTML body contents, can be null or empty.</param>
1869 <param name="contentType">A content type to return the body as, i.e. 'text/html' or 'text/plain', defaults to 'text/html' if null or empty</param>
1870 <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception>
1871 </member>
1872 <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)">
1873 <summary>
1874 Send a response.
1875 </summary>
1876 <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param>
1877 <param name="statusCode">HTTP status code</param>
1878 <param name="reason">reason for the status code.</param>
1879 </member>
1880 <member name="M:HttpServer.HttpClientContext.Respond(System.String)">
1881 <summary>
1882 Send a response.
1883 </summary>
1884 <exception cref="T:System.ArgumentNullException"></exception>
1885 </member>
1886 <member name="M:HttpServer.HttpClientContext.Send(System.Byte[])">
1887 <summary>
1888 send a whole buffer
1889 </summary>
1890 <param name="buffer">buffer to send</param>
1891 <exception cref="T:System.ArgumentNullException"></exception>
1892 </member>
1893 <member name="M:HttpServer.HttpClientContext.Send(System.Byte[],System.Int32,System.Int32)">
1894 <summary>
1895 Send data using the stream
1896 </summary>
1897 <param name="buffer">Contains data to send</param>
1898 <param name="offset">Start position in buffer</param>
1899 <param name="size">number of bytes to send</param>
1900 <exception cref="T:System.ArgumentNullException"></exception>
1901 <exception cref="T:System.ArgumentOutOfRangeException"></exception>
1902 </member>
1903 <member name="E:HttpServer.HttpClientContext.Disconnected">
1904 <summary>
1905 The context have been disconnected.
1906 </summary>
1907 <remarks>
1908 Event can be used to clean up a context, or to reuse it.
1909 </remarks>
1910 </member>
1911 <member name="E:HttpServer.HttpClientContext.RequestReceived">
1912 <summary>
1913 A request have been received in the context.
1914 </summary>
1915 </member>
1916 <member name="T:HttpServer.HttpContextFactory">
1917 <summary>
1918 Used to create and reuse contexts.
1919 </summary>
1920 </member>
1921 <member name="M:HttpServer.HttpContextFactory.#ctor(HttpServer.ILogWriter,System.Int32,HttpServer.IRequestParserFactory)">
1922 <summary>
1923 Initializes a new instance of the <see cref="T:HttpServer.HttpContextFactory"/> class.
1924 </summary>
1925 <param name="writer">The writer.</param>
1926 <param name="bufferSize">Amount of bytes to read from the incoming socket stream.</param>
1927 <param name="factory">Used to create a request parser.</param>
1928 </member>
1929 <member name="P:HttpServer.HttpContextFactory.UseTraceLogs">
1930 <summary>
1931 True if detailed trace logs should be written.
1932 </summary>
1933 </member>
1934 <member name="M:HttpServer.HttpContextFactory.CreateContext(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,System.Net.Sockets.Socket)">
1935 <summary>
1936 Create a new context.
1937 </summary>
1938 <param name="isSecured">true if socket is running HTTPS.</param>
1939 <param name="endPoint">Client that connected</param>
1940 <param name="stream">Network/SSL stream.</param>
1941 <returns>A context.</returns>
1942 </member>
1943 <member name="M:HttpServer.HttpContextFactory.CreateNewContext(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,System.Net.Sockets.Socket)">
1944 <summary>
1945 Create a new context.
1946 </summary>
1947 <param name="isSecured">true if HTTPS is used.</param>
1948 <param name="endPoint">Remote client</param>
1949 <param name="stream">Network stream, <see cref="T:HttpServer.HttpClientContext"/> uses <see cref="T:HttpServer.ReusableSocketNetworkStream"/>.</param>
1950 <returns>A new context (always).</returns>
1951 </member>
1952 <member name="M:HttpServer.HttpContextFactory.CreateSecureContext(System.Net.Sockets.Socket,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)">
1953 <summary>
1954 Create a secure <see cref="T:HttpServer.IHttpClientContext"/>.
1955 </summary>
1956 <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param>
1957 <param name="certificate">HTTPS certificate to use.</param>
1958 <param name="protocol">Kind of HTTPS protocol. Usually TLS or SSL.</param>
1959 <returns>
1960 A created <see cref="T:HttpServer.IHttpClientContext"/>.
1961 </returns>
1962 </member>
1963 <member name="E:HttpServer.HttpContextFactory.RequestReceived">
1964 <summary>
1965 A request have been received from one of the contexts.
1966 </summary>
1967 </member>
1968 <member name="M:HttpServer.HttpContextFactory.CreateContext(System.Net.Sockets.Socket)">
1969 <summary>
1970 Creates a <see cref="T:HttpServer.IHttpClientContext"/> that handles a connected client.
1971 </summary>
1972 <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param>
1973 <returns>
1974 A creates <see cref="T:HttpServer.IHttpClientContext"/>.
1975 </returns>
1976 </member>
1977 <member name="M:HttpServer.HttpContextFactory.Shutdown">
1978 <summary>
1979 Server is shutting down so shut down the factory
1980 </summary>
1981 </member>
1982 <member name="T:HttpServer.ReusableSocketNetworkStream">
1983 <summary>
1984 Custom network stream to mark sockets as reusable when disposing the stream.
1985 </summary>
1986 </member>
1987 <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket)">
1988 <summary>
1989 Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" />.
1990 </summary>
1991 <param name="socket">
1992 The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data.
1993 </param>
1994 <exception cref="T:System.ArgumentNullException">
1995 The <paramref name="socket" /> parameter is null.
1996 </exception>
1997 <exception cref="T:System.IO.IOException">
1998 The <paramref name="socket" /> parameter is not connected.
1999 -or-
2000 The <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />.
2001 -or-
2002 The <paramref name="socket" /> parameter is in a nonblocking state.
2003 </exception>
2004 </member>
2005 <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.Boolean)">
2006 <summary>
2007 Initializes a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified <see cref="T:System.Net.Sockets.Socket" /> ownership.
2008 </summary>
2009 <param name="socket">
2010 The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data.
2011 </param>
2012 <param name="ownsSocket">
2013 Set to true to indicate that the <see cref="T:System.Net.Sockets.NetworkStream" /> will take ownership of the <see cref="T:System.Net.Sockets.Socket" />; otherwise, false.
2014 </param>
2015 <exception cref="T:System.ArgumentNullException">
2016 The <paramref name="socket" /> parameter is null.
2017 </exception>
2018 <exception cref="T:System.IO.IOException">
2019 The <paramref name="socket" /> parameter is not connected.
2020 -or-
2021 the value of the <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />.
2022 -or-
2023 the <paramref name="socket" /> parameter is in a nonblocking state.
2024 </exception>
2025 </member>
2026 <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.IO.FileAccess)">
2027 <summary>
2028 Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified access rights.
2029 </summary>
2030 <param name="socket">
2031 The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data.
2032 </param>
2033 <param name="access">
2034 A bitwise combination of the <see cref="T:System.IO.FileAccess" /> values that specify the type of access given to the <see cref="T:System.Net.Sockets.NetworkStream" /> over the provided <see cref="T:System.Net.Sockets.Socket" />.
2035 </param>
2036 <exception cref="T:System.ArgumentNullException">
2037 The <paramref name="socket" /> parameter is null.
2038 </exception>
2039 <exception cref="T:System.IO.IOException">
2040 The <paramref name="socket" /> parameter is not connected.
2041 -or-
2042 the <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />.
2043 -or-
2044 the <paramref name="socket" /> parameter is in a nonblocking state.
2045 </exception>
2046 </member>
2047 <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.IO.FileAccess,System.Boolean)">
2048 <summary>
2049 Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified access rights and the specified <see cref="T:System.Net.Sockets.Socket" /> ownership.
2050 </summary>
2051 <param name="socket">
2052 The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data.
2053 </param>
2054 <param name="access">
2055 A bitwise combination of the <see cref="T:System.IO.FileAccess" /> values that specifies the type of access given to the <see cref="T:System.Net.Sockets.NetworkStream" /> over the provided <see cref="T:System.Net.Sockets.Socket" />.
2056 </param>
2057 <param name="ownsSocket">
2058 Set to true to indicate that the <see cref="T:System.Net.Sockets.NetworkStream" /> will take ownership of the <see cref="T:System.Net.Sockets.Socket" />; otherwise, false.
2059 </param>
2060 <exception cref="T:System.ArgumentNullException">
2061 The <paramref name="socket" /> parameter is null.
2062 </exception>
2063 <exception cref="T:System.IO.IOException">
2064 The <paramref name="socket" /> parameter is not connected.
2065 -or-
2066 The <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />.
2067 -or-
2068 The <paramref name="socket" /> parameter is in a nonblocking state.
2069 </exception>
2070 </member>
2071 <member name="M:HttpServer.ReusableSocketNetworkStream.Close">
2072 <summary>
2073 Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
2074 </summary>
2075 </member>
2076 <member name="M:HttpServer.ReusableSocketNetworkStream.Dispose(System.Boolean)">
2077 <summary>
2078 Releases the unmanaged resources used by the <see cref="T:System.Net.Sockets.NetworkStream"/> and optionally releases the managed resources.
2079 </summary>
2080 <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
2081 </member>
2082 <member name="T:HttpServer.IHttpContextFactory">
2083 <summary>
2084 Used to create <see cref="T:HttpServer.IHttpClientContext"/>es.
2085 </summary>
2086 </member>
2087 <member name="M:HttpServer.IHttpContextFactory.CreateContext(System.Net.Sockets.Socket)">
2088 <summary>
2089 Creates a <see cref="T:HttpServer.IHttpClientContext"/> that handles a connected client.
2090 </summary>
2091 <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param>
2092 <returns>A creates <see cref="T:HttpServer.IHttpClientContext"/>.</returns>
2093 </member>
2094 <member name="M:HttpServer.IHttpContextFactory.CreateSecureContext(System.Net.Sockets.Socket,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)">
2095 <summary>
2096 Create a secure <see cref="T:HttpServer.IHttpClientContext"/>.
2097 </summary>
2098 <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param>
2099 <param name="certificate">HTTPS certificate to use.</param>
2100 <param name="protocol">Kind of HTTPS protocol. Usually TLS or SSL.</param>
2101 <returns>A created <see cref="T:HttpServer.IHttpClientContext"/>.</returns>
2102 </member>
2103 <member name="E:HttpServer.IHttpContextFactory.RequestReceived">
2104 <summary>
2105 A request have been received from one of the contexts.
2106 </summary>
2107 </member>
2108 <member name="M:HttpServer.IHttpContextFactory.Shutdown">
2109 <summary>
2110 Server is shutting down so shut down the factory
2111 </summary>
2112 </member>
2113 <member name="T:HttpServer.HttpFile">
2114 <summary>
2115 Container class for posted files
2116 </summary>
2117 </member>
2118 <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)">
2119 <summary>
2120 Creates a container for a posted file
2121 </summary>
2122 <param name="name">The identifier of the post field</param>
2123 <param name="filename">The file path</param>
2124 <param name="contentType">The content type of the file</param>
2125 <param name="uploadFilename">The name of the file uploaded</param>
2126 <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception>
2127 </member>
2128 <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String)">
2129 <summary>
2130 Creates a container for a posted file <see cref="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"/>
2131 </summary>
2132 <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception>
2133 </member>
2134 <member name="M:HttpServer.HttpFile.Finalize">
2135 <summary>Destructor disposing the file</summary>
2136 </member>
2137 <member name="P:HttpServer.HttpFile.Name">
2138 <summary>
2139 The name/id of the file
2140 </summary>
2141 </member>
2142 <member name="P:HttpServer.HttpFile.Filename">
2143 <summary>
2144 The full file path
2145 </summary>
2146 </member>
2147 <member name="P:HttpServer.HttpFile.UploadFilename">
2148 <summary>
2149 The name of the uploaded file
2150 </summary>
2151 </member>
2152 <member name="P:HttpServer.HttpFile.ContentType">
2153 <summary>
2154 The type of file
2155 </summary>
2156 </member>
2157 <member name="M:HttpServer.HttpFile.Dispose(System.Boolean)">
2158 <summary>
2159 Deletes the temporary file
2160 </summary>
2161 <param name="disposing">True if manual dispose</param>
2162 </member>
2163 <member name="M:HttpServer.HttpFile.Dispose">
2164 <summary>
2165 Disposing interface, cleans up managed resources (the temporary file) and suppresses finalization
2166 </summary>
2167 </member>
2168 <member name="T:HttpServer.HttpForm">
2169 <summary>Container for posted form data</summary>
2170 </member>
2171 <member name="F:HttpServer.HttpForm.EmptyForm">
2172 <summary>Instance to help mark a non-initialized form</summary>
2173 </member>
2174 <member name="M:HttpServer.HttpForm.#ctor">
2175 <summary>Initializes a form container with the specified name</summary>
2176 </member>
2177 <member name="M:HttpServer.HttpForm.#ctor(HttpServer.HttpInput)">
2178 <summary>
2179 Makes a deep copy of the input
2180 </summary>
2181 <param name="input">The input to copy</param>
2182 </member>
2183 <member name="M:HttpServer.HttpForm.AddFile(HttpServer.HttpFile)">
2184 <summary>
2185 Adds a file to the collection of posted files
2186 </summary>
2187 <param name="file">The file to add</param>
2188 <exception cref="T:System.ArgumentException">If the file is already added</exception>
2189 <exception cref="T:System.ArgumentNullException">If file is null</exception>
2190 <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception>
2191 </member>
2192 <member name="M:HttpServer.HttpForm.ContainsFile(System.String)">
2193 <summary>
2194 Checks if the form contains a specified file
2195 </summary>
2196 <param name="name">Field name of the file parameter</param>
2197 <returns>True if the file exists</returns>
2198 <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception>
2199 </member>
2200 <member name="M:HttpServer.HttpForm.GetFile(System.String)">
2201 <summary>
2202 Retrieves a file held by by the form
2203 </summary>
2204 <param name="name">The identifier of the file</param>
2205 <returns>The requested file or null if the file was not found</returns>
2206 <exception cref="T:System.ArgumentNullException">If name is null or empty</exception>
2207 <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception>
2208 </member>
2209 <member name="P:HttpServer.HttpForm.Files">
2210 <summary>
2211 Retrieves the number of files added to the <see cref="T:HttpServer.HttpForm"/>
2212 </summary>
2213 <returns>0 if no files are added</returns>
2214 </member>
2215 <member name="M:HttpServer.HttpForm.Clear">
2216 <summary>Disposes all held HttpFile's and resets values</summary>
2217 </member>
2218 <member name="T:HttpServer.HttpHelper">
2219 <summary>
2220 Generic helper functions for HTTP
2221 </summary>
2222 </member>
2223 <member name="F:HttpServer.HttpHelper.HTTP10">
2224 <summary>
2225 Version string for HTTP v1.0
2226 </summary>
2227 </member>
2228 <member name="F:HttpServer.HttpHelper.HTTP11">
2229 <summary>
2230 Version string for HTTP v1.1
2231 </summary>
2232 </member>
2233 <member name="F:HttpServer.HttpHelper.EmptyUri">
2234 <summary>
2235 An empty URI
2236 </summary>
2237 </member>
2238 <member name="M:HttpServer.HttpHelper.ParseQueryString(System.String)">
2239 <summary>
2240 Parses a query string.
2241 </summary>
2242 <param name="queryString">Query string (URI encoded)</param>
2243 <returns>A <see cref="T:HttpServer.HttpInput"/> object if successful; otherwise <see cref="F:HttpServer.HttpInput.Empty"/></returns>
2244 <exception cref="T:System.ArgumentNullException"><c>queryString</c> is null.</exception>
2245 <exception cref="T:System.FormatException">If string cannot be parsed.</exception>
2246 </member>
2247 <member name="T:HttpServer.HttpInput">
2248 <summary>
2249 Contains some kind of input from the browser/client.
2250 can be QueryString, form data or any other request body content.
2251 </summary>
2252 </member>
2253 <member name="F:HttpServer.HttpInput.Empty">
2254 <summary> Representation of a non-initialized class instance </summary>
2255 </member>
2256 <member name="F:HttpServer.HttpInput._ignoreChanges">
2257 <summary> Variable telling the class that it is non-initialized <see cref="F:HttpServer.HttpInput.Empty"/> </summary>
2258 </member>
2259 <member name="M:HttpServer.HttpInput.#ctor(System.String)">
2260 <summary>
2261 Initializes a new instance of the <see cref="T:HttpServer.HttpInput"/> class.
2262 </summary>
2263 <param name="name">form name.</param>
2264 </member>
2265 <member name="M:HttpServer.HttpInput.#ctor(System.String,System.Boolean)">
2266 <summary>
2267 Initializes a new instance of the <see cref="T:HttpServer.HttpInput"/> class.
2268 </summary>
2269 <param name="name">form name.</param>
2270 <param name="ignoreChanges">if set to <c>true</c> all changes will be ignored. </param>
2271 <remarks>this constructor should only be used by Empty</remarks>
2272 </member>
2273 <member name="M:HttpServer.HttpInput.#ctor(HttpServer.HttpInput)">
2274 <summary>Creates a deep copy of the HttpInput class</summary>
2275 <param name="input">The object to copy</param>
2276 <remarks>The function makes a deep copy of quite a lot which can be slow</remarks>
2277 </member>
2278 <member name="P:HttpServer.HttpInput.Name">
2279 <summary>
2280 Form name as lower case
2281 </summary>
2282 </member>
2283 <member name="M:HttpServer.HttpInput.Add(System.String,System.String)">
2284 <summary>
2285 Add a new element. Form array elements are parsed
2286 and added in a correct hierarchy.
2287 </summary>
2288 <param name="name">Name is converted to lower case.</param>
2289 <param name="value"></param>
2290 <exception cref="T:System.ArgumentNullException"><c>name</c> is null.</exception>
2291 <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception>
2292 </member>
2293 <member name="P:HttpServer.HttpInput.Item(System.String)">
2294 <summary>
2295 Get a form item.
2296 </summary>
2297 <param name="name"></param>
2298 <returns>Returns <see cref="F:HttpServer.HttpInputItem.Empty"/> if item was not found.</returns>
2299 </member>
2300 <member name="M:HttpServer.HttpInput.Contains(System.String)">
2301 <summary>
2302 Returns true if the class contains a <see cref="T:HttpServer.HttpInput"/> with the corresponding name.
2303 </summary>
2304 <param name="name">The field/query string name</param>
2305 <returns>True if the value exists</returns>
2306 </member>
2307 <member name="M:HttpServer.HttpInput.ParseItem(System.String,System.String)">
2308 <summary>
2309 Parses an item and returns it.
2310 This function is primarily used to parse array items as in user[name].
2311 </summary>
2312 <param name="name"></param>
2313 <param name="value"></param>
2314 <returns></returns>
2315 </member>
2316 <member name="M:HttpServer.HttpInput.ToString">
2317 <summary> Outputs the instance representing all its values joined together </summary>
2318 <returns></returns>
2319 </member>
2320 <member name="M:HttpServer.HttpInput.ToString(System.Boolean)">
2321 <summary>Returns all items as an unescaped query string.</summary>
2322 <returns></returns>
2323 </member>
2324 <member name="M:HttpServer.HttpInput.ExtractOne(System.String)">
2325 <summary>
2326 Extracts one parameter from an array
2327 </summary>
2328 <param name="value">Containing the string array</param>
2329 <returns>All but the first value</returns>
2330 <example>
2331 string test1 = ExtractOne("system[user][extension][id]");
2332 string test2 = ExtractOne(test1);
2333 string test3 = ExtractOne(test2);
2334 // test1 = user[extension][id]
2335 // test2 = extension[id]
2336 // test3 = id
2337 </example>
2338 </member>
2339 <member name="M:HttpServer.HttpInput.Clear">
2340 <summary>Resets all data contained by class</summary>
2341 </member>
2342 <member name="M:HttpServer.HttpInput.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator">
2343 <summary>
2344 Returns an enumerator that iterates through the collection.
2345 </summary>
2346
2347 <returns>
2348 A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection.
2349 </returns>
2350 <filterpriority>1</filterpriority>
2351 </member>
2352 <member name="M:HttpServer.HttpInput.GetEnumerator">
2353 <summary>
2354 Returns an enumerator that iterates through a collection.
2355 </summary>
2356
2357 <returns>
2358 An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection.
2359 </returns>
2360 <filterpriority>2</filterpriority>
2361 </member>
2362 <member name="T:HttpServer.IHttpInput">
2363 <summary>
2364 Base class for request data containers
2365 </summary>
2366 </member>
2367 <member name="M:HttpServer.IHttpInput.Add(System.String,System.String)">
2368 <summary>
2369 Adds a parameter mapped to the presented name
2370 </summary>
2371 <param name="name">The name to map the parameter to</param>
2372 <param name="value">The parameter value</param>
2373 </member>
2374 <member name="P:HttpServer.IHttpInput.Item(System.String)">
2375 <summary>
2376 Returns a request parameter
2377 </summary>
2378 <param name="name">The name associated with the parameter</param>
2379 <returns></returns>
2380 </member>
2381 <member name="M:HttpServer.IHttpInput.Contains(System.String)">
2382 <summary>
2383 Returns true if the container contains the requested parameter
2384 </summary>
2385 <param name="name">Parameter id</param>
2386 <returns>True if parameter exists</returns>
2387 </member>
2388 <member name="T:HttpServer.HttpInputItem">
2389 <summary>
2390 represents a HTTP input item. Each item can have multiple sub items, a sub item
2391 is made in a HTML form by using square brackets
2392 </summary>
2393 <example>
2394 // <input type="text" name="user[FirstName]" value="jonas" /> becomes:
2395 Console.WriteLine("Value: {0}", form["user"]["FirstName"].Value);
2396 </example>
2397 <remarks>
2398 All names in a form SHOULD be in lowercase.
2399 </remarks>
2400 </member>
2401 <member name="F:HttpServer.HttpInputItem.Empty">
2402 <summary> Representation of a non-initialized <see cref="T:HttpServer.HttpInputItem"/>.</summary>
2403 </member>
2404 <member name="M:HttpServer.HttpInputItem.#ctor(System.String,System.String)">
2405 <summary>
2406 Initializes an input item setting its name/identifier and value
2407 </summary>
2408 <param name="name">Parameter name/id</param>
2409 <param name="value">Parameter value</param>
2410 </member>
2411 <member name="M:HttpServer.HttpInputItem.#ctor(HttpServer.HttpInputItem)">
2412 <summary>Creates a deep copy of the item specified</summary>
2413 <param name="item">The item to copy</param>
2414 <remarks>The function makes a deep copy of quite a lot which can be slow</remarks>
2415 </member>
2416 <member name="P:HttpServer.HttpInputItem.Count">
2417 <summary>
2418 Number of values
2419 </summary>
2420 </member>
2421 <member name="P:HttpServer.HttpInputItem.Item(System.String)">
2422 <summary>
2423 Get a sub item
2424 </summary>
2425 <param name="name">name in lower case.</param>
2426 <returns><see cref="F:HttpServer.HttpInputItem.Empty"/> if no item was found.</returns>
2427 </member>
2428 <member name="P:HttpServer.HttpInputItem.Name">
2429 <summary>
2430 Name of item (in lower case).
2431 </summary>
2432 </member>
2433 <member name="P:HttpServer.HttpInputItem.Value">
2434 <summary>
2435 Returns the first value, or null if no value exist.
2436 </summary>
2437 </member>
2438 <member name="P:HttpServer.HttpInputItem.LastValue">
2439 <summary>
2440 Returns the last value, or null if no value exist.
2441 </summary>
2442 </member>
2443 <member name="P:HttpServer.HttpInputItem.Values">
2444 <summary>
2445 Returns the list with values.
2446 </summary>
2447 </member>
2448 <member name="M:HttpServer.HttpInputItem.Add(System.String)">
2449 <summary>
2450 Add another value to this item
2451 </summary>
2452 <param name="value">Value to add.</param>
2453 <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception>
2454 </member>
2455 <member name="M:HttpServer.HttpInputItem.Contains(System.String)">
2456 <summary>
2457 checks if a sub-item exists (and has a value).
2458 </summary>
2459 <param name="name">name in lower case</param>
2460 <returns>true if the sub-item exists and has a value; otherwise false.</returns>
2461 </member>
2462 <member name="M:HttpServer.HttpInputItem.ToString">
2463 <summary> Returns a formatted representation of the instance with the values of all contained parameters </summary>
2464 </member>
2465 <member name="M:HttpServer.HttpInputItem.ToString(System.String,System.Boolean)">
2466 <summary>
2467 Outputs the string in a formatted manner
2468 </summary>
2469 <param name="prefix">A prefix to append, used internally</param>
2470 <param name="asQuerySting">produce a query string</param>
2471 </member>
2472 <member name="P:HttpServer.HttpInputItem.HttpServer#IHttpInput#Item(System.String)">
2473 <summary>
2474
2475 </summary>
2476 <param name="name">name in lower case</param>
2477 <returns></returns>
2478 </member>
2479 <member name="M:HttpServer.HttpInputItem.Add(System.String,System.String)">
2480 <summary>
2481 Add a sub item.
2482 </summary>
2483 <param name="name">Can contain array formatting, the item is then parsed and added in multiple levels</param>
2484 <param name="value">Value to add.</param>
2485 <exception cref="T:System.ArgumentNullException">Argument is null.</exception>
2486 <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception>
2487 </member>
2488 <member name="M:HttpServer.HttpInputItem.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator">
2489 <summary>
2490 Returns an enumerator that iterates through the collection.
2491 </summary>
2492
2493 <returns>
2494 A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection.
2495 </returns>
2496 <filterpriority>1</filterpriority>
2497 </member>
2498 <member name="M:HttpServer.HttpInputItem.GetEnumerator">
2499 <summary>
2500 Returns an enumerator that iterates through a collection.
2501 </summary>
2502
2503 <returns>
2504 An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection.
2505 </returns>
2506 <filterpriority>2</filterpriority>
2507 </member>
2508 <member name="M:HttpServer.HttpInputItem.ToString(System.String)">
2509 <summary>
2510 Outputs the string in a formatted manner
2511 </summary>
2512 <param name="prefix">A prefix to append, used internally</param>
2513 <returns></returns>
2514 </member>
2515 <member name="T:HttpServer.HttpListener">
2516 <summary>
2517 New implementation of the HTTP listener.
2518 </summary>
2519 <remarks>
2520 Use the <c>Create</c> methods to create a default listener.
2521 </remarks>
2522 </member>
2523 <member name="E:HttpServer.HttpListener.Accepted">
2524 <summary>
2525 A client have been accepted, but not handled, by the listener.
2526 </summary>
2527 </member>
2528 <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)">
2529 <summary>
2530 Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class.
2531 </summary>
2532 <param name="address">IP Address to accept connections on</param>
2533 <param name="port">TCP Port to listen on, default HTTP port is 80.</param>
2534 <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param>
2535 <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception>
2536 <exception cref="T:System.ArgumentException">Port must be a positive number.</exception>
2537 </member>
2538 <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)">
2539 <summary>
2540 Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class.
2541 </summary>
2542 <param name="address">The address.</param>
2543 <param name="port">The port.</param>
2544 <param name="factory">The factory.</param>
2545 <param name="certificate">The certificate.</param>
2546 </member>
2547 <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)">
2548 <summary>
2549 Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class.
2550 </summary>
2551 <param name="address">The address.</param>
2552 <param name="port">The port.</param>
2553 <param name="factory">The factory.</param>
2554 <param name="certificate">The certificate.</param>
2555 <param name="protocol">The protocol.</param>
2556 </member>
2557 <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32)">
2558 <summary>
2559 Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories.
2560 </summary>
2561 <param name="address">Address that the listener should accept connections on.</param>
2562 <param name="port">Port that listener should accept connections on.</param>
2563 <returns>Created HTTP listener.</returns>
2564 </member>
2565 <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)">
2566 <summary>
2567 Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories.
2568 </summary>
2569 <param name="address">Address that the listener should accept connections on.</param>
2570 <param name="port">Port that listener should accept connections on.</param>
2571 <param name="certificate">Certificate to use</param>
2572 <returns>Created HTTP listener.</returns>
2573 </member>
2574 <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)">
2575 <summary>
2576 Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories.
2577 </summary>
2578 <param name="address">Address that the listener should accept connections on.</param>
2579 <param name="port">Port that listener should accept connections on.</param>
2580 <param name="certificate">Certificate to use</param>
2581 <param name="protocol">which HTTPS protocol to use, default is TLS.</param>
2582 <returns>Created HTTP listener.</returns>
2583 </member>
2584 <member name="M:HttpServer.HttpListener.OnAcceptingSocket(System.Net.Sockets.Socket)">
2585 <summary>
2586 Can be used to create filtering of new connections.
2587 </summary>
2588 <param name="socket">Accepted socket</param>
2589 <returns>
2590 true if connection can be accepted; otherwise false.
2591 </returns>
2592 </member>
2593 <member name="T:HttpServer.HttpListenerBase">
2594 <summary>
2595 Contains a listener that doesn't do anything with the connections.
2596 </summary>
2597 </member>
2598 <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)">
2599 <summary>
2600 Listen for regular HTTP connections
2601 </summary>
2602 <param name="address">IP Address to accept connections on</param>
2603 <param name="port">TCP Port to listen on, default HTTP port is 80.</param>
2604 <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param>
2605 <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception>
2606 <exception cref="T:System.ArgumentException">Port must be a positive number.</exception>
2607 </member>
2608 <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)">
2609 <summary>
2610 Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class.
2611 </summary>
2612 <param name="address">IP Address to accept connections on</param>
2613 <param name="port">TCP Port to listen on, default HTTPS port is 443</param>
2614 <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param>
2615 <param name="certificate">Certificate to use</param>
2616 </member>
2617 <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)">
2618 <summary>
2619 Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class.
2620 </summary>
2621 <param name="address">IP Address to accept connections on</param>
2622 <param name="port">TCP Port to listen on, default HTTPS port is 443</param>
2623 <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param>
2624 <param name="certificate">Certificate to use</param>
2625 <param name="protocol">which HTTPS protocol to use, default is TLS.</param>
2626 </member>
2627 <member name="P:HttpServer.HttpListenerBase.LogWriter">
2628 <summary>
2629 Gives you a change to receive log entries for all internals of the HTTP library.
2630 </summary>
2631 <remarks>
2632 You may not switch log writer after starting the listener.
2633 </remarks>
2634 </member>
2635 <member name="P:HttpServer.HttpListenerBase.UseTraceLogs">
2636 <summary>
2637 True if we should turn on trace logs.
2638 </summary>
2639 </member>
2640 <member name="M:HttpServer.HttpListenerBase.OnAccept(System.IAsyncResult)">
2641 <exception cref="T:System.Exception"><c>Exception</c>.</exception>
2642 </member>
2643 <member name="M:HttpServer.HttpListenerBase.RetryBeginAccept">
2644 <summary>
2645 Will try to accept connections one more time.
2646 </summary>
2647 <exception cref="T:System.Exception">If any exceptions is thrown.</exception>
2648 </member>
2649 <member name="M:HttpServer.HttpListenerBase.OnAcceptingSocket(System.Net.Sockets.Socket)">
2650 <summary>
2651 Can be used to create filtering of new connections.
2652 </summary>
2653 <param name="socket">Accepted socket</param>
2654 <returns>true if connection can be accepted; otherwise false.</returns>
2655 </member>
2656 <member name="M:HttpServer.HttpListenerBase.Start(System.Int32)">
2657 <summary>
2658 Start listen for new connections
2659 </summary>
2660 <param name="backlog">Number of connections that can stand in a queue to be accepted.</param>
2661 <exception cref="T:System.InvalidOperationException">Listener have already been started.</exception>
2662 </member>
2663 <member name="M:HttpServer.HttpListenerBase.Stop">
2664 <summary>
2665 Stop the listener
2666 </summary>
2667 <exception cref="T:System.Net.Sockets.SocketException"></exception>
2668 </member>
2669 <member name="E:HttpServer.HttpListenerBase.ExceptionThrown">
2670 <summary>
2671 Catch exceptions not handled by the listener.
2672 </summary>
2673 <remarks>
2674 Exceptions will be thrown during debug mode if this event is not used,
2675 exceptions will be printed to console and suppressed during release mode.
2676 </remarks>
2677 </member>
2678 <member name="E:HttpServer.HttpListenerBase.RequestReceived">
2679 <summary>
2680 A request have been received from a <see cref="T:HttpServer.IHttpClientContext"/>.
2681 </summary>
2682 </member>
2683 <member name="T:HttpServer.HttpModules.FileModule">
2684 <summary>
2685 The purpose of this module is to serve files.
2686 </summary>
2687 </member>
2688 <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String,System.Boolean)">
2689 <summary>
2690 Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class.
2691 </summary>
2692 <param name="baseUri">Uri to serve, for instance "/files/"</param>
2693 <param name="basePath">Path on hard drive where we should start looking for files</param>
2694 <param name="useLastModifiedHeader">If true a Last-Modifed header will be sent upon requests urging web browser to cache files</param>
2695 </member>
2696 <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String)">
2697 <summary>
2698 Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class.
2699 </summary>
2700 <param name="baseUri">Uri to serve, for instance "/files/"</param>
2701 <param name="basePath">Path on hard drive where we should start looking for files</param>
2702 </member>
2703 <member name="P:HttpServer.HttpModules.FileModule.MimeTypes">
2704 <summary>
2705 List with all mime-type that are allowed.
2706 </summary>
2707 <remarks>All other mime types will result in a Forbidden http status code.</remarks>
2708 </member>
2709 <member name="P:HttpServer.HttpModules.FileModule.ForbiddenChars">
2710 <summary>
2711 characters that may not exist in a path.
2712 </summary>
2713 <example>
2714 fileMod.ForbiddenChars = new string[]{ "\\", "..", ":" };
2715 </example>
2716 </member>
2717 <member name="M:HttpServer.HttpModules.FileModule.AddDefaultMimeTypes">
2718 <summary>
2719 Mimtypes that this class can handle per default
2720 </summary>
2721 </member>
2722 <member name="M:HttpServer.HttpModules.FileModule.CanHandle(System.Uri)">
2723 <summary>
2724 Determines if the request should be handled by this module.
2725 Invoked by the <see cref="T:HttpServer.HttpServer"/>
2726 </summary>
2727 <param name="uri"></param>
2728 <returns>true if this module should handle it.</returns>
2729 </member>
2730 <member name="M:HttpServer.HttpModules.FileModule.GetPath(System.Uri)">
2731 <exception cref="T:HttpServer.Exceptions.BadRequestException">Illegal path</exception>
2732 </member>
2733 <member name="M:HttpServer.HttpModules.FileModule.Contains(System.String,System.Collections.Generic.IEnumerable{System.String})">
2734 <summary>
2735 check if source contains any of the chars.
2736 </summary>
2737 <param name="source"></param>
2738 <param name="chars"></param>
2739 <returns></returns>
2740 </member>
2741 <member name="M:HttpServer.HttpModules.FileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)">
2742 <summary>
2743 Method that process the Uri.
2744 </summary>
2745 <param name="request">Information sent by the browser about the request</param>
2746 <param name="response">Information that is being sent back to the client.</param>
2747 <param name="session">Session used to </param>
2748 <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to find file extension</exception>
2749 <exception cref="T:HttpServer.Exceptions.ForbiddenException">File type is forbidden.</exception>
2750 </member>
2751 <member name="M:HttpServer.HttpModules.FileModule.GetFileExtension(System.String)">
2752 <summary>
2753 return a file extension from an absolute Uri path (or plain filename)
2754 </summary>
2755 <param name="uri"></param>
2756 <returns></returns>
2757 </member>
2758 <member name="T:HttpServer.HttpModules.HttpModule">
2759 <summary>
2760 A HttpModule can be used to serve Uri's. The module itself
2761 decides if it should serve a Uri or not. In this way, you can
2762 get a very flexible http application since you can let multiple modules
2763 serve almost similar urls.
2764 </summary>
2765 <remarks>
2766 Throw <see cref="T:HttpServer.Exceptions.UnauthorizedException"/> if you are using a <see cref="T:HttpServer.Authentication.AuthenticationModule"/> and want to prompt for user name/password.
2767 </remarks>
2768 </member>
2769 <member name="M:HttpServer.HttpModules.HttpModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)">
2770 <summary>
2771 Method that process the url
2772 </summary>
2773 <param name="request">Information sent by the browser about the request</param>
2774 <param name="response">Information that is being sent back to the client.</param>
2775 <param name="session">Session used to </param>
2776 <returns>true if this module handled the request.</returns>
2777 </member>
2778 <member name="M:HttpServer.HttpModules.HttpModule.SetLogWriter(HttpServer.ILogWriter)">
2779 <summary>
2780 Set the log writer to use.
2781 </summary>
2782 <param name="writer">logwriter to use.</param>
2783 </member>
2784 <member name="M:HttpServer.HttpModules.HttpModule.Write(HttpServer.LogPrio,System.String)">
2785 <summary>
2786 Log something.
2787 </summary>
2788 <param name="prio">importance of log message</param>
2789 <param name="message">message</param>
2790 </member>
2791 <member name="P:HttpServer.HttpModules.HttpModule.AllowSecondaryProcessing">
2792 <summary>
2793 If true specifies that the module doesn't consume the processing of a request so that subsequent modules
2794 can continue processing afterwards. Default is false.
2795 </summary>
2796 </member>
2797 <member name="T:HttpServer.HttpModules.HttpModuleExceptionEventArgs">
2798 <summary>
2799 Used to inform http server that
2800 </summary>
2801 </member>
2802 <member name="M:HttpServer.HttpModules.HttpModuleExceptionEventArgs.#ctor(System.Exception)">
2803 <summary>
2804 Eventarguments used when an exception is thrown by a module
2805 </summary>
2806 <param name="e">the exception</param>
2807 </member>
2808 <member name="P:HttpServer.HttpModules.HttpModuleExceptionEventArgs.Exception">
2809 <summary>
2810 Exception thrown in a module
2811 </summary>
2812 </member>
2813 <member name="T:HttpServer.HttpModules.ResourceFileModule">
2814 <summary>
2815 Serves files that are stored in embedded resources.
2816 </summary>
2817 </member>
2818 <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor">
2819 <summary>
2820 Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class.
2821 Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later
2822 through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired.
2823 </summary>
2824 </member>
2825 <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor(HttpServer.ILogWriter)">
2826 <summary>
2827 Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class.
2828 Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later
2829 through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired.
2830 </summary>
2831 <param name="logWriter">The log writer to use when logging events</param>
2832 </member>
2833 <member name="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes">
2834 <summary>
2835 List with all mime-type that are allowed.
2836 </summary>
2837 <remarks>All other mime types will result in a Forbidden http status code.</remarks>
2838 </member>
2839 <member name="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes">
2840 <summary>
2841 Mimtypes that this class can handle per default
2842 </summary>
2843 </member>
2844 <member name="M:HttpServer.HttpModules.ResourceFileModule.AddResources(System.String,System.Reflection.Assembly,System.String)">
2845 <summary>
2846 Loads resources from a namespace in the given assembly to an uri
2847 </summary>
2848 <param name="toUri">The uri to map the resources to</param>
2849 <param name="fromAssembly">The assembly in which the resources reside</param>
2850 <param name="fromNamespace">The namespace from which to load the resources</param>
2851 <usage>
2852 resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views");
2853
2854 will make ie the resource MyLib.Models.User.Views.stylesheet.css accessible via /user/stylesheet.css
2855 </usage>
2856 <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns>
2857 </member>
2858 <member name="M:HttpServer.HttpModules.ResourceFileModule.CanHandle(HttpServer.IHttpRequest)">
2859 <summary>
2860 Returns true if the module can handle the request
2861 </summary>
2862 </member>
2863 <member name="M:HttpServer.HttpModules.ResourceFileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)">
2864 <summary>
2865 Method that process the url
2866 </summary>
2867 <param name="request">Information sent by the browser about the request</param>
2868 <param name="response">Information that is being sent back to the client.</param>
2869 <param name="session">Session used to </param>
2870 <returns>true if this module handled the request.</returns>
2871 </member>
2872 <member name="T:HttpServer.HttpModules.ReverseProxyModule">
2873 <summary>
2874 A reverse proxy are used to act as a bridge between local (protected/hidden) websites
2875 and public clients.
2876
2877 A typical usage is to allow web servers on non standard ports to still be available
2878 to the public clients, or allow web servers on private ips to be available.
2879 </summary>
2880 </member>
2881 <member name="M:HttpServer.HttpModules.ReverseProxyModule.#ctor(System.String,System.String)">
2882 <summary>
2883
2884 </summary>
2885 <param name="source">Base url requested from browser</param>
2886 <param name="destination">Base url on private web server</param>
2887 <example>
2888 // this will return contents from http://192.168.1.128/view/jonas when client requests http://www.gauffin.com/user/view/jonas
2889 _server.Add(new ReverseProxyModule("http://www.gauffin.com/user/", "http://192.168.1.128/");
2890 </example>
2891 </member>
2892 <member name="M:HttpServer.HttpModules.ReverseProxyModule.CanHandle(System.Uri)">
2893 <summary>
2894 Method that determines if an url should be handled or not by the module
2895 </summary>
2896 <param name="uri">Url requested by the client.</param>
2897 <returns>true if module should handle the url.</returns>
2898 </member>
2899 <member name="M:HttpServer.HttpModules.ReverseProxyModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)">
2900 <summary>
2901 Method that process the url
2902 </summary>
2903 <param name="request">Information sent by the browser about the request</param>
2904 <param name="response">Information that is being sent back to the client.</param>
2905 <param name="session">Session used to </param>
2906 </member>
2907 <member name="T:HttpServer.HttpModules.WebSiteModule">
2908 <summary>
2909 The website module let's you handle multiple websites in the same server.
2910 It uses the "Host" header to check which site you want.
2911 </summary>
2912 <remarks>It's recommended that you do not
2913 add any other modules to HttpServer if you are using the website module. Instead,
2914 add all wanted modules to each website.</remarks>
2915 </member>
2916 <member name="M:HttpServer.HttpModules.WebSiteModule.#ctor(System.String,System.String)">
2917 <summary>
2918
2919 </summary>
2920 <param name="host">domain name that should be handled.</param>
2921 <param name="name"></param>
2922 </member>
2923 <member name="P:HttpServer.HttpModules.WebSiteModule.SiteName">
2924 <summary>
2925 Name of site.
2926 </summary>
2927 </member>
2928 <member name="M:HttpServer.HttpModules.WebSiteModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)">
2929 <summary>
2930 Method that process the url
2931 </summary>
2932 <param name="request">Information sent by the browser about the request</param>
2933 <param name="response">Information that is being sent back to the client.</param>
2934 <param name="session">Session used to </param>
2935 </member>
2936 <member name="T:HttpServer.HttpParam">
2937 <summary>
2938 Returns item either from a form or a query string (checks them in that order)
2939 </summary>
2940 </member>
2941 <member name="F:HttpServer.HttpParam.Empty">
2942 <summary> Representation of a non-initialized HttpParam </summary>
2943 </member>
2944 <member name="M:HttpServer.HttpParam.#ctor(HttpServer.IHttpInput,HttpServer.IHttpInput)">
2945 <summary>Initialises the class to hold a value either from a post request or a querystring request</summary>
2946 </member>
2947 <member name="M:HttpServer.HttpParam.Add(System.String,System.String)">
2948 <summary>
2949 The add method is not availible for HttpParam
2950 since HttpParam checks both Request.Form and Request.QueryString
2951 </summary>
2952 <param name="name">name identifying the value</param>
2953 <param name="value">value to add</param>
2954 <exception cref="T:System.NotImplementedException"></exception>
2955 </member>
2956 <member name="M:HttpServer.HttpParam.Contains(System.String)">
2957 <summary>
2958 Checks whether the form or querystring has the specified value
2959 </summary>
2960 <param name="name">Name, case sensitive</param>
2961 <returns>true if found; otherwise false.</returns>
2962 </member>
2963 <member name="P:HttpServer.HttpParam.Item(System.String)">
2964 <summary>
2965 Fetch an item from the form or querystring (in that order).
2966 </summary>
2967 <param name="name"></param>
2968 <returns>Item if found; otherwise HttpInputItem.EmptyLanguageNode</returns>
2969 </member>
2970 <member name="M:HttpServer.HttpParam.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator">
2971 <summary>
2972 Returns an enumerator that iterates through the collection.
2973 </summary>
2974
2975 <returns>
2976 A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection.
2977 </returns>
2978 <filterpriority>1</filterpriority>
2979 </member>
2980 <member name="M:HttpServer.HttpParam.GetEnumerator">
2981 <summary>
2982 Returns an enumerator that iterates through a collection.
2983 </summary>
2984
2985 <returns>
2986 An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection.
2987 </returns>
2988 <filterpriority>2</filterpriority>
2989 </member>
2990 <member name="T:HttpServer.HttpRequest">
2991 <summary>
2992 Contains server side HTTP request information.
2993 </summary>
2994 </member>
2995 <member name="F:HttpServer.HttpRequest.UriSplitters">
2996 <summary>
2997 Chars used to split an URL path into multiple parts.
2998 </summary>
2999 </member>
3000 <member name="P:HttpServer.HttpRequest.Secure">
3001 <summary>
3002 Gets or sets a value indicating whether this <see cref="T:HttpServer.HttpRequest"/> is secure.
3003 </summary>
3004 </member>
3005 <member name="P:HttpServer.HttpRequest.UriPath">
3006 <summary>
3007 Path and query (will be merged with the host header) and put in Uri
3008 </summary>
3009 <see cref="P:HttpServer.HttpRequest.Uri"/>
3010 </member>
3011 <member name="M:HttpServer.HttpRequest.AssignForm(HttpServer.HttpForm)">
3012 <summary>
3013 Assign a form.
3014 </summary>
3015 <param name="form"></param>
3016 </member>
3017 <member name="P:HttpServer.HttpRequest.BodyIsComplete">
3018 <summary>
3019 Gets whether the body is complete.
3020 </summary>
3021 </member>
3022 <member name="P:HttpServer.HttpRequest.AcceptTypes">
3023 <summary>
3024 Gets kind of types accepted by the client.
3025 </summary>
3026 </member>
3027 <member name="P:HttpServer.HttpRequest.Body">
3028 <summary>
3029 Gets or sets body stream.
3030 </summary>
3031 </member>
3032 <member name="P:HttpServer.HttpRequest.Connection">
3033 <summary>
3034 Gets or sets kind of connection used for the session.
3035 </summary>
3036 </member>
3037 <member name="P:HttpServer.HttpRequest.ContentLength">
3038 <summary>
3039 Gets or sets number of bytes in the body.
3040 </summary>
3041 </member>
3042 <member name="P:HttpServer.HttpRequest.Headers">
3043 <summary>
3044 Gets headers sent by the client.
3045 </summary>
3046 </member>
3047 <member name="P:HttpServer.HttpRequest.HttpVersion">
3048 <summary>
3049 Gets or sets version of HTTP protocol that's used.
3050 </summary>
3051 <remarks>
3052 Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>.
3053 </remarks>
3054 <seealso cref="T:HttpServer.HttpHelper"/>
3055 </member>
3056 <member name="P:HttpServer.HttpRequest.Method">
3057 <summary>
3058 Gets or sets requested method.
3059 </summary>
3060 <value></value>
3061 <remarks>
3062 Will always be in upper case.
3063 </remarks>
3064 <see cref="!:HttpServer.Method"/>
3065 </member>
3066 <member name="P:HttpServer.HttpRequest.QueryString">
3067 <summary>
3068 Gets variables sent in the query string
3069 </summary>
3070 </member>
3071 <member name="P:HttpServer.HttpRequest.Uri">
3072 <summary>
3073 Gets or sets requested URI.
3074 </summary>
3075 </member>
3076 <member name="P:HttpServer.HttpRequest.UriParts">
3077 <summary>
3078 Uri absolute path splitted into parts.
3079 </summary>
3080 <example>
3081 // uri is: http://gauffin.com/code/tiny/
3082 Console.WriteLine(request.UriParts[0]); // result: code
3083 Console.WriteLine(request.UriParts[1]); // result: tiny
3084 </example>
3085 <remarks>
3086 If you're using controllers than the first part is controller name,
3087 the second part is method name and the third part is Id property.
3088 </remarks>
3089 <seealso cref="P:HttpServer.HttpRequest.Uri"/>
3090 </member>
3091 <member name="P:HttpServer.HttpRequest.Param">
3092 <summary>
3093 Gets parameter from <see cref="P:HttpServer.HttpRequest.QueryString"/> or <see cref="P:HttpServer.HttpRequest.Form"/>.
3094 </summary>
3095 </member>
3096 <member name="P:HttpServer.HttpRequest.Form">
3097 <summary>
3098 Gets form parameters.
3099 </summary>
3100 </member>
3101 <member name="P:HttpServer.HttpRequest.IsAjax">
3102 <summary>
3103 Gets whether the request was made by Ajax (Asynchronous JavaScript)
3104 </summary>
3105 </member>
3106 <member name="P:HttpServer.HttpRequest.Cookies">
3107 <summary>
3108 Gets cookies that was sent with the request.
3109 </summary>
3110 </member>
3111 <member name="M:HttpServer.HttpRequest.Clone">
3112 <summary>
3113 Creates a new object that is a copy of the current instance.
3114 </summary>
3115
3116 <returns>
3117 A new object that is a copy of this instance.
3118 </returns>
3119 <filterpriority>2</filterpriority>
3120 </member>
3121 <member name="M:HttpServer.HttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)">
3122 <summary>
3123 Decode body into a form.
3124 </summary>
3125 <param name="providers">A list with form decoders.</param>
3126 <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception>
3127 <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception>
3128 </member>
3129 <member name="M:HttpServer.HttpRequest.SetCookies(HttpServer.RequestCookies)">
3130 <summary>
3131 Cookies
3132 </summary>
3133 <param name="cookies">the cookies</param>
3134 </member>
3135 <member name="M:HttpServer.HttpRequest.CreateResponse(HttpServer.IHttpClientContext)">
3136 <summary>
3137 Create a response object.
3138 </summary>
3139 <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns>
3140 </member>
3141 <member name="M:HttpServer.HttpRequest.AddHeader(System.String,System.String)">
3142 <summary>
3143 Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>.
3144 </summary>
3145 <param name="name">Name of the header, should not be URL encoded</param>
3146 <param name="value">Value of the header, should not be URL encoded</param>
3147 <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception>
3148 </member>
3149 <member name="M:HttpServer.HttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)">
3150 <summary>
3151 Add bytes to the body
3152 </summary>
3153 <param name="bytes">buffer to read bytes from</param>
3154 <param name="offset">where to start read</param>
3155 <param name="length">number of bytes to read</param>
3156 <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns>
3157 <exception cref="T:System.InvalidOperationException">If body is not writable</exception>
3158 <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception>
3159 <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception>
3160 </member>
3161 <member name="M:HttpServer.HttpRequest.Clear">
3162 <summary>
3163 Clear everything in the request
3164 </summary>
3165 </member>
3166 <member name="T:HttpServer.HttpResponse">
3167 <summary>
3168 Response that is sent back to the web browser / client.
3169 </summary>
3170 <remarks>
3171 <para>
3172 A response can be sent if different ways. The easiest one is
3173 to just fill the Body stream with content, everything else
3174 will then be taken care of by the framework. The default content-type
3175 is text/html, you should change it if you send anything else.
3176 </para><para>
3177 The second and slightly more complex way is to send the response
3178 as parts. Start with sending the header using the SendHeaders method and
3179 then you can send the body using SendBody method, but do not forget
3180 to set <see cref="P:HttpServer.HttpResponse.ContentType"/> and <see cref="P:HttpServer.HttpResponse.ContentLength"/> before doing so.
3181 </para>
3182 </remarks>
3183 <example>
3184 <code>
3185 // Example using response body.
3186 class MyModule : HttpModule
3187 {
3188 public override bool Process(IHttpRequest request, IHttpResponse response, IHttpSession session)
3189 {
3190 StreamWriter writer = new StreamWriter(response.Body);
3191 writer.WriteLine("Hello dear World!");
3192 writer.Flush();
3193
3194 // return true to tell webserver that we've handled the url
3195 return true;
3196 }
3197 }
3198 </code>
3199 </example>
3200 todo: add two examples, using SendHeaders/SendBody and just the Body stream.
3201 </member>
3202 <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)">
3203 <summary>
3204 Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class.
3205 </summary>
3206 <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param>
3207 <param name="request">Contains information of what the client want to receive.</param>
3208 <exception cref="T:System.ArgumentException"><see cref="P:HttpServer.IHttpRequest.HttpVersion"/> cannot be empty.</exception>
3209 </member>
3210 <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,System.String,HttpServer.ConnectionType)">
3211 <summary>
3212 Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class.
3213 </summary>
3214 <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param>
3215 <param name="httpVersion">Version of HTTP protocol that the client uses.</param>
3216 <param name="connectionType">Type of HTTP connection used.</param>
3217 </member>
3218 <member name="P:HttpServer.HttpResponse.Body">
3219 <summary>
3220 The body stream is used to cache the body contents
3221 before sending everything to the client. It's the simplest
3222 way to serve documents.
3223 </summary>
3224 </member>
3225 <member name="P:HttpServer.HttpResponse.Chunked">
3226 <summary>
3227 The chunked encoding modifies the body of a message in order to
3228 transfer it as a series of chunks, each with its own size indicator,
3229 followed by an OPTIONAL trailer containing entity-header fields. This
3230 allows dynamically produced content to be transferred along with the
3231 information necessary for the recipient to verify that it has
3232 received the full message.
3233 </summary>
3234 </member>
3235 <member name="P:HttpServer.HttpResponse.ProtocolVersion">
3236 <summary>
3237 Defines the version of the HTTP Response for applications where it's required
3238 for this to be forced.
3239 </summary>
3240 </member>
3241 <member name="P:HttpServer.HttpResponse.Connection">
3242 <summary>
3243 Kind of connection
3244 </summary>
3245 </member>
3246 <member name="P:HttpServer.HttpResponse.Encoding">
3247 <summary>
3248 Encoding to use when sending stuff to the client.
3249 </summary>
3250 <remarks>Default is UTF8</remarks>
3251 </member>
3252 <member name="P:HttpServer.HttpResponse.KeepAlive">
3253 <summary>
3254 Number of seconds to keep connection alive
3255 </summary>
3256 <remarks>Only used if Connection property is set to <see cref="F:HttpServer.ConnectionType.KeepAlive"/>.</remarks>
3257 </member>
3258 <member name="P:HttpServer.HttpResponse.Status">
3259 <summary>
3260 Status code that is sent to the client.
3261 </summary>
3262 <remarks>Default is <see cref="F:System.Net.HttpStatusCode.OK"/></remarks>
3263 </member>
3264 <member name="P:HttpServer.HttpResponse.Reason">
3265 <summary>
3266 Information about why a specific status code was used.
3267 </summary>
3268 </member>
3269 <member name="P:HttpServer.HttpResponse.ContentLength">
3270 <summary>
3271 Size of the body. MUST be specified before sending the header,
3272 unless property Chunked is set to true.
3273 </summary>
3274 </member>
3275 <member name="P:HttpServer.HttpResponse.ContentType">
3276 <summary>
3277 Kind of content in the body
3278 </summary>
3279 <remarks>Default type is "text/html"</remarks>
3280 </member>
3281 <member name="P:HttpServer.HttpResponse.HeadersSent">
3282 <summary>
3283 Headers have been sent to the client-
3284 </summary>
3285 <remarks>You can not send any additional headers if they have already been sent.</remarks>
3286 </member>
3287 <member name="P:HttpServer.HttpResponse.Sent">
3288 <summary>
3289 The whole response have been sent.
3290 </summary>
3291 </member>
3292 <member name="P:HttpServer.HttpResponse.Cookies">
3293 <summary>
3294 Cookies that should be created/changed.
3295 </summary>
3296 </member>
3297 <member name="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)">
3298 <summary>
3299 Add another header to the document.
3300 </summary>
3301 <param name="name">Name of the header, case sensitive, use lower cases.</param>
3302 <param name="value">Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n</param>
3303 <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception>
3304 <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception>
3305 <remarks>Adding any header will override the default ones and those specified by properties.</remarks>
3306 </member>
3307 <member name="M:HttpServer.HttpResponse.Send">
3308 <summary>
3309 Send headers and body to the browser.
3310 </summary>
3311 <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception>
3312 </member>
3313 <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)">
3314 <summary>
3315 Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first.
3316 </summary>
3317 <param name="buffer"></param>
3318 <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception>
3319 <see cref="M:HttpServer.HttpResponse.SendHeaders"/>
3320 <param name="offset">offset of first byte to send</param>
3321 <param name="count">number of bytes to send.</param>
3322 <seealso cref="M:HttpServer.HttpResponse.Send"/>
3323 <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/>
3324 <remarks>This method can be used if you want to send body contents without caching them first. This
3325 is recommended for larger files to keep the memory usage low.</remarks>
3326 </member>
3327 <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[])">
3328 <summary>
3329 Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first.
3330 </summary>
3331 <param name="buffer"></param>
3332 <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception>
3333 <see cref="M:HttpServer.HttpResponse.SendHeaders"/>
3334 <seealso cref="M:HttpServer.HttpResponse.Send"/>
3335 <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/>
3336 <remarks>This method can be used if you want to send body contents without caching them first. This
3337 is recommended for larger files to keep the memory usage low.</remarks>
3338 </member>
3339 <member name="M:HttpServer.HttpResponse.SendHeaders">
3340 <summary>
3341 Send headers to the client.
3342 </summary>
3343 <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception>
3344 <seealso cref="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"/>
3345 <seealso cref="M:HttpServer.HttpResponse.Send"/>
3346 <seealso cref="M:HttpServer.HttpResponse.SendBody(System.Byte[])"/>
3347 </member>
3348 <member name="M:HttpServer.HttpResponse.Redirect(System.Uri)">
3349 <summary>
3350 Redirect client to somewhere else using the 302 status code.
3351 </summary>
3352 <param name="uri">Destination of the redirect</param>
3353 <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception>
3354 <remarks>You can not do anything more with the request when a redirect have been done. This should be your last
3355 action.</remarks>
3356 </member>
3357 <member name="M:HttpServer.HttpResponse.Redirect(System.String)">
3358 <summary>
3359 redirect to somewhere
3360 </summary>
3361 <param name="url">where the redirect should go</param>
3362 <remarks>
3363 No body are allowed when doing redirects.
3364 </remarks>
3365 </member>
3366 <member name="T:HttpServer.RealmHandler">
3367 <summary>
3368 Delegate used to find a realm/domain.
3369 </summary>
3370 <param name="domain"></param>
3371 <returns></returns>
3372 <remarks>
3373 Realms are used during HTTP Authentication
3374 </remarks>
3375 <seealso cref="T:HttpServer.Authentication.AuthenticationModule"/>
3376 <seealso cref="T:HttpServer.Authentication.AuthenticationHandler"/>
3377 </member>
3378 <member name="T:HttpServer.HttpServer">
3379 <summary>
3380 A complete HTTP server, you need to add a module to it to be able to handle incoming requests.
3381 </summary>
3382 <example>
3383 <code>
3384 // this small example will add two web site modules, thus handling
3385 // two different sites. In reality you should add Controller modules or something
3386 // two the website modules to be able to handle different requests.
3387 HttpServer server = new HttpServer();
3388 server.Add(new WebSiteModule("www.gauffin.com", "Gauffin Telecom AB"));
3389 server.Add(new WebSiteModule("www.vapadi.se", "Remote PBX"));
3390
3391 // start regular http
3392 server.Start(IPAddress.Any, 80);
3393
3394 // start https
3395 server.Start(IPAddress.Any, 443, myCertificate);
3396 </code>
3397 </example>
3398 <seealso cref="T:HttpServer.HttpModules.HttpModule"/>
3399 <seealso cref="T:HttpServer.HttpModules.FileModule"/>
3400 <seealso cref="T:HttpServer.HttpListener"/>
3401 </member>
3402 <member name="P:HttpServer.HttpServer.Current">
3403 <summary>
3404 Server that is handling the current request.
3405 </summary>
3406 <remarks>
3407 Will be set as soon as a request arrives to the <see cref="T:HttpServer.HttpServer"/> object.
3408 </remarks>
3409 </member>
3410 <member name="M:HttpServer.HttpServer.#ctor(HttpServer.IComponentProvider)">
3411 <summary>
3412 Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class.
3413 </summary>
3414 <param name="provider">Used to get all components used in the server..</param>
3415 </member>
3416 <member name="M:HttpServer.HttpServer.#ctor">
3417 <summary>
3418 Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class.
3419 </summary>
3420 </member>
3421 <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider)">
3422 <summary>
3423 Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class.
3424 </summary>
3425 <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param>
3426 <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/>
3427 <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/>
3428 </member>
3429 <member name="M:HttpServer.HttpServer.#ctor(HttpServer.Sessions.IHttpSessionStore)">
3430 <summary>
3431 Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class.
3432 </summary>
3433 <param name="sessionStore">A session store is used to save and retrieve sessions</param>
3434 <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/>
3435 </member>
3436 <member name="M:HttpServer.HttpServer.#ctor(HttpServer.ILogWriter)">
3437 <summary>
3438 Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class.
3439 </summary>
3440 <param name="logWriter">The log writer.</param>
3441 <seealso cref="P:HttpServer.HttpServer.LogWriter"/>
3442 </member>
3443 <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.ILogWriter)">
3444 <summary>
3445 Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class.
3446 </summary>
3447 <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param>
3448 <param name="logWriter">The log writer.</param>
3449 <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/>
3450 <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/>
3451 <seealso cref="P:HttpServer.HttpServer.LogWriter"/>
3452 </member>
3453 <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.Sessions.IHttpSessionStore,HttpServer.ILogWriter)">
3454 <summary>
3455 Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class.
3456 </summary>
3457 <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param>
3458 <param name="sessionStore">A session store is used to save and retrieve sessions</param>
3459 <param name="logWriter">The log writer.</param>
3460 <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/>
3461 <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/>
3462 <seealso cref="P:HttpServer.HttpServer.LogWriter"/>
3463 <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/>
3464 </member>
3465 <member name="P:HttpServer.HttpServer.AuthenticationModules">
3466 <summary>
3467 Modules used for authentication. The module that is is added first is used as
3468 the default authentication module.
3469 </summary>
3470 <remarks>Use the corresponding property
3471 in the <see cref="T:HttpServer.HttpModules.WebSiteModule"/> if you are using multiple websites.</remarks>
3472 </member>
3473 <member name="P:HttpServer.HttpServer.FormDecoderProviders">
3474 <summary>
3475 Form decoder providers are used to decode request body (which normally contains form data).
3476 </summary>
3477 </member>
3478 <member name="P:HttpServer.HttpServer.ServerName">
3479 <summary>
3480 Server name sent in HTTP responses.
3481 </summary>
3482 <remarks>
3483 Do NOT include version in name, since it makes it
3484 easier for hackers.
3485 </remarks>
3486 </member>
3487 <member name="P:HttpServer.HttpServer.SessionCookieName">
3488 <summary>
3489 Name of cookie where session id is stored.
3490 </summary>
3491 </member>
3492 <member name="P:HttpServer.HttpServer.LogWriter">
3493 <summary>
3494 Specified where logging should go.
3495 </summary>
3496 <seealso cref="T:HttpServer.NullLogWriter"/>
3497 <seealso cref="T:HttpServer.ConsoleLogWriter"/>
3498 <seealso cref="P:HttpServer.HttpServer.LogWriter"/>
3499 </member>
3500 <member name="P:HttpServer.HttpServer.BackLog">
3501 <summary>
3502 Number of connections that can wait to be accepted by the server.
3503 </summary>
3504 <remarks>Default is 10.</remarks>
3505 </member>
3506 <member name="P:HttpServer.HttpServer.MaxRequestCount">
3507 <summary>
3508 Gets or sets maximum number of allowed simultaneous requests.
3509 </summary>
3510 <remarks>
3511 <para>
3512 This property is useful in busy systems. The HTTP server
3513 will start queuing new requests if this limit is hit, instead
3514 of trying to process all incoming requests directly.
3515 </para>
3516 <para>
3517 The default number if allowed simultaneous requests are 10.
3518 </para>
3519 </remarks>
3520 </member>
3521 <member name="P:HttpServer.HttpServer.MaxQueueSize">
3522 <summary>
3523 Gets or sets maximum number of requests queuing to be handled.
3524 </summary>
3525 <remarks>
3526 <para>
3527 The WebServer will start turning requests away if response code
3528 <see cref="F:System.Net.HttpStatusCode.ServiceUnavailable"/> to indicate that the server
3529 is too busy to be able to handle the request.
3530 </para>
3531 </remarks>
3532 </member>
3533 <member name="M:HttpServer.HttpServer.Add(HttpServer.Rules.IRule)">
3534 <summary>
3535 Adds the specified rule.
3536 </summary>
3537 <param name="rule">The rule.</param>
3538 </member>
3539 <member name="M:HttpServer.HttpServer.Add(HttpServer.HttpModules.HttpModule)">
3540 <summary>
3541 Add a <see cref="T:HttpServer.HttpModules.HttpModule"/> to the server.
3542 </summary>
3543 <param name="module">mode to add</param>
3544 </member>
3545 <member name="M:HttpServer.HttpServer.DecodeBody(HttpServer.IHttpRequest)">
3546 <summary>
3547 Decodes the request body.
3548 </summary>
3549 <param name="request">The request.</param>
3550 <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to decode form data.</exception>
3551 </member>
3552 <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,System.Net.HttpStatusCode,System.String)">
3553 <summary>
3554 Generate a HTTP error page (that will be added to the response body).
3555 response status code is also set.
3556 </summary>
3557 <param name="response">Response that the page will be generated in.</param>
3558 <param name="error"><see cref="T:System.Net.HttpStatusCode"/>.</param>
3559 <param name="body">response body contents.</param>
3560 </member>
3561 <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,HttpServer.Exceptions.HttpException)">
3562 <summary>
3563 Generate a HTTP error page (that will be added to the response body).
3564 response status code is also set.
3565 </summary>
3566 <param name="response">Response that the page will be generated in.</param>
3567 <param name="err">exception.</param>
3568 </member>
3569 <member name="M:HttpServer.HttpServer.GetRealm(HttpServer.IHttpRequest)">
3570 <summary>
3571 Realms are used by the <see cref="T:HttpServer.Authentication.AuthenticationModule"/>s.
3572 </summary>
3573 <param name="request">HTTP request</param>
3574 <returns>domain/realm.</returns>
3575 </member>
3576 <member name="M:HttpServer.HttpServer.HandleRequest(HttpServer.IHttpClientContext,HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)">
3577 <summary>
3578 Process an incoming request.
3579 </summary>
3580 <param name="context">connection to client</param>
3581 <param name="request">request information</param>
3582 <param name="response">response that should be filled</param>
3583 <param name="session">session information</param>
3584 </member>
3585 <member name="M:HttpServer.HttpServer.OnClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)">
3586 <summary>
3587 Can be overloaded to implement stuff when a client have been connected.
3588 </summary>
3589 <remarks>
3590 Default implementation does nothing.
3591 </remarks>
3592 <param name="client">client that disconnected</param>
3593 <param name="error">disconnect reason</param>
3594 </member>
3595 <member name="M:HttpServer.HttpServer.ProcessAuthentication(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)">
3596 <summary>
3597 Handle authentication
3598 </summary>
3599 <param name="request"></param>
3600 <param name="response"></param>
3601 <param name="session"></param>
3602 <returns>true if request can be handled; false if not.</returns>
3603 <exception cref="T:HttpServer.Exceptions.BadRequestException">Invalid authorization header</exception>
3604 </member>
3605 <member name="M:HttpServer.HttpServer.RequestAuthentication(HttpServer.Authentication.AuthenticationModule,HttpServer.IHttpRequest,HttpServer.IHttpResponse)">
3606 <summary>
3607 Will request authentication.
3608 </summary>
3609 <remarks>
3610 Sends respond to client, nothing else can be done with the response after this.
3611 </remarks>
3612 <param name="mod"></param>
3613 <param name="request"></param>
3614 <param name="response"></param>
3615 </member>
3616 <member name="M:HttpServer.HttpServer.OnRequest(System.Object,HttpServer.RequestEventArgs)">
3617 <summary>
3618 Received from a <see cref="T:HttpServer.IHttpClientContext"/> when a request have been parsed successfully.
3619 </summary>
3620 <param name="source"><see cref="T:HttpServer.IHttpClientContext"/> that received the request.</param>
3621 <param name="args">The request.</param>
3622 </member>
3623 <member name="M:HttpServer.HttpServer.ProcessRequestWrapper(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)">
3624 <summary>
3625 To be able to track request count.
3626 </summary>
3627 <param name="context"></param>
3628 <param name="request"></param>
3629 </member>
3630 <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32)">
3631 <summary>
3632 Start the web server using regular HTTP.
3633 </summary>
3634 <param name="address">IP Address to listen on, use <c>IpAddress.Any </c>to accept connections on all IP addresses/network cards.</param>
3635 <param name="port">Port to listen on. 80 can be a good idea =)</param>
3636 <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception>
3637 <exception cref="T:System.ArgumentException">Port must be a positive number.</exception>
3638 </member>
3639 <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)">
3640 <summary>
3641 Accept secure connections.
3642 </summary>
3643 <param name="address">IP Address to listen on, use <see cref="F:System.Net.IPAddress.Any"/> to accept connections on all IP Addresses / network cards.</param>
3644 <param name="port">Port to listen on. 80 can be a good idea =)</param>
3645 <param name="certificate">Certificate to use</param>
3646 <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception>
3647 <exception cref="T:System.ArgumentException">Port must be a positive number.</exception>
3648 </member>
3649 <member name="M:HttpServer.HttpServer.Stop">
3650 <summary>
3651 shut down the server and listeners
3652 </summary>
3653 </member>
3654 <member name="M:HttpServer.HttpServer.WriteLog(HttpServer.LogPrio,System.String)">
3655 <summary>
3656 write an entry to the log file
3657 </summary>
3658 <param name="prio">importance of the message</param>
3659 <param name="message">log message</param>
3660 </member>
3661 <member name="M:HttpServer.HttpServer.WriteLog(System.Object,HttpServer.LogPrio,System.String)">
3662 <summary>
3663 write an entry to the log file
3664 </summary>
3665 <param name="source">object that wrote the message</param>
3666 <param name="prio">importance of the message</param>
3667 <param name="message">log message</param>
3668 </member>
3669 <member name="E:HttpServer.HttpServer.RealmWanted">
3670 <summary>
3671 Realms are used during HTTP authentication.
3672 Default realm is same as server name.
3673 </summary>
3674 </member>
3675 <member name="E:HttpServer.HttpServer.ExceptionThrown">
3676 <summary>
3677 Let's to receive unhandled exceptions from the threads.
3678 </summary>
3679 <remarks>
3680 Exceptions will be thrown during debug mode if this event is not used,
3681 exceptions will be printed to console and suppressed during release mode.
3682 </remarks>
3683 </member>
3684 <member name="T:HttpServer.IComponentProvider">
3685 <summary>
3686 Inversion of control interface.
3687 </summary>
3688 </member>
3689 <member name="M:HttpServer.IComponentProvider.AddInstance``1(System.Object)">
3690 <summary>
3691 Add a component instance
3692 </summary>
3693 <typeparam name="T">Interface type</typeparam>
3694 <param name="instance">Instance to add</param>
3695 </member>
3696 <member name="M:HttpServer.IComponentProvider.Get``1">
3697 <summary>
3698 Get a component.
3699 </summary>
3700 <typeparam name="T">Interface type</typeparam>
3701 <returns>Component if registered, otherwise null.</returns>
3702 <remarks>
3703 Component will get created if needed.
3704 </remarks>
3705 </member>
3706 <member name="M:HttpServer.IComponentProvider.Contains(System.Type)">
3707 <summary>
3708 Checks if the specified component interface have been added.
3709 </summary>
3710 <param name="interfaceType"></param>
3711 <returns>true if found; otherwise false.</returns>
3712 </member>
3713 <member name="M:HttpServer.IComponentProvider.Add``2">
3714 <summary>
3715 Add a component.
3716 </summary>
3717 <typeparam name="InterfaceType">Type being requested.</typeparam>
3718 <typeparam name="InstanceType">Type being created.</typeparam>
3719 </member>
3720 <member name="T:HttpServer.IHttpClientContext">
3721 <summary>
3722 Contains a connection to a browser/client.
3723 </summary>
3724 </member>
3725 <member name="P:HttpServer.IHttpClientContext.Secured">
3726 <summary>
3727 Using SSL or other encryption method.
3728 </summary>
3729 </member>
3730 <member name="P:HttpServer.IHttpClientContext.IsSecured">
3731 <summary>
3732 Using SSL or other encryption method.
3733 </summary>
3734 </member>
3735 <member name="M:HttpServer.IHttpClientContext.Disconnect(System.Net.Sockets.SocketError)">
3736 <summary>
3737 Disconnect from client
3738 </summary>
3739 <param name="error">error to report in the <see cref="E:HttpServer.IHttpClientContext.Disconnected"/> event.</param>
3740 </member>
3741 <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)">
3742 <summary>
3743 Send a response.
3744 </summary>
3745 <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param>
3746 <param name="statusCode">HTTP status code</param>
3747 <param name="reason">reason for the status code.</param>
3748 <param name="body">HTML body contents, can be null or empty.</param>
3749 <param name="contentType">A content type to return the body as, i.e. 'text/html' or 'text/plain', defaults to 'text/html' if null or empty</param>
3750 <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception>
3751 </member>
3752 <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)">
3753 <summary>
3754 Send a response.
3755 </summary>
3756 <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param>
3757 <param name="statusCode">HTTP status code</param>
3758 <param name="reason">reason for the status code.</param>
3759 </member>
3760 <member name="M:HttpServer.IHttpClientContext.Respond(System.String)">
3761 <summary>
3762 Send a response.
3763 </summary>
3764 <exception cref="T:System.ArgumentNullException"></exception>
3765 </member>
3766 <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[])">
3767 <summary>
3768 send a whole buffer
3769 </summary>
3770 <param name="buffer">buffer to send</param>
3771 <exception cref="T:System.ArgumentNullException"></exception>
3772 </member>
3773 <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[],System.Int32,System.Int32)">
3774 <summary>
3775 Send data using the stream
3776 </summary>
3777 <param name="buffer">Contains data to send</param>
3778 <param name="offset">Start position in buffer</param>
3779 <param name="size">number of bytes to send</param>
3780 <exception cref="T:System.ArgumentNullException"></exception>
3781 <exception cref="T:System.ArgumentOutOfRangeException"></exception>
3782 </member>
3783 <member name="M:HttpServer.IHttpClientContext.Close">
3784 <summary>
3785 Closes the streams and disposes of the unmanaged resources
3786 </summary>
3787 </member>
3788 <member name="E:HttpServer.IHttpClientContext.Disconnected">
3789 <summary>
3790 The context have been disconnected.
3791 </summary>
3792 <remarks>
3793 Event can be used to clean up a context, or to reuse it.
3794 </remarks>
3795 </member>
3796 <member name="E:HttpServer.IHttpClientContext.RequestReceived">
3797 <summary>
3798 A request have been received in the context.
3799 </summary>
3800 </member>
3801 <member name="T:HttpServer.DisconnectedEventArgs">
3802 <summary>
3803 A <see cref="T:HttpServer.IHttpClientContext"/> have been disconnected.
3804 </summary>
3805 </member>
3806 <member name="P:HttpServer.DisconnectedEventArgs.Error">
3807 <summary>
3808 Gets reason to why client disconnected.
3809 </summary>
3810 </member>
3811 <member name="M:HttpServer.DisconnectedEventArgs.#ctor(System.Net.Sockets.SocketError)">
3812 <summary>
3813 Initializes a new instance of the <see cref="T:HttpServer.DisconnectedEventArgs"/> class.
3814 </summary>
3815 <param name="error">Reason to disconnection.</param>
3816 </member>
3817 <member name="T:HttpServer.RequestEventArgs">
3818 <summary>
3819
3820 </summary>
3821 </member>
3822 <member name="P:HttpServer.RequestEventArgs.Request">
3823 <summary>
3824 Gets received request.
3825 </summary>
3826 </member>
3827 <member name="M:HttpServer.RequestEventArgs.#ctor(HttpServer.IHttpRequest)">
3828 <summary>
3829 Initializes a new instance of the <see cref="T:HttpServer.RequestEventArgs"/> class.
3830 </summary>
3831 <param name="request">The request.</param>
3832 </member>
3833 <member name="T:HttpServer.IHttpContextHandler">
3834 <summary>
3835 Class that receives Requests from a <see cref="T:HttpServer.IHttpClientContext"/>.
3836 </summary>
3837 </member>
3838 <member name="M:HttpServer.IHttpContextHandler.ClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)">
3839 <summary>
3840 Client have been disconnected.
3841 </summary>
3842 <param name="client">Client that was disconnected.</param>
3843 <param name="error">Reason</param>
3844 <see cref="T:HttpServer.IHttpClientContext"/>
3845 </member>
3846 <member name="M:HttpServer.IHttpContextHandler.RequestReceived(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)">
3847 <summary>
3848 Invoked when a client context have received a new HTTP request
3849 </summary>
3850 <param name="client">Client that received the request.</param>
3851 <param name="request">Request that was received.</param>
3852 <see cref="T:HttpServer.IHttpClientContext"/>
3853 </member>
3854 <member name="T:HttpServer.IHttpRequest">
3855 <summary>
3856 Contains server side HTTP request information.
3857 </summary>
3858 </member>
3859 <member name="P:HttpServer.IHttpRequest.AcceptTypes">
3860 <summary>
3861 Gets kind of types accepted by the client.
3862 </summary>
3863 </member>
3864 <member name="P:HttpServer.IHttpRequest.Body">
3865 <summary>
3866 Gets or sets body stream.
3867 </summary>
3868 </member>
3869 <member name="P:HttpServer.IHttpRequest.BodyIsComplete">
3870 <summary>
3871 Gets whether the body is complete.
3872 </summary>
3873 </member>
3874 <member name="P:HttpServer.IHttpRequest.Connection">
3875 <summary>
3876 Gets or sets kind of connection used for the session.
3877 </summary>
3878 </member>
3879 <member name="P:HttpServer.IHttpRequest.ContentLength">
3880 <summary>
3881 Gets or sets number of bytes in the body.
3882 </summary>
3883 </member>
3884 <member name="P:HttpServer.IHttpRequest.Cookies">
3885 <summary>
3886 Gets cookies that was sent with the request.
3887 </summary>
3888 </member>
3889 <member name="P:HttpServer.IHttpRequest.Form">
3890 <summary>
3891 Gets form parameters.
3892 </summary>
3893 </member>
3894 <member name="P:HttpServer.IHttpRequest.Headers">
3895 <summary>
3896 Gets headers sent by the client.
3897 </summary>
3898 </member>
3899 <member name="P:HttpServer.IHttpRequest.HttpVersion">
3900 <summary>
3901 Gets or sets version of HTTP protocol that's used.
3902 </summary>
3903 <remarks>
3904 Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>.
3905 </remarks>
3906 <seealso cref="T:HttpServer.HttpHelper"/>
3907 </member>
3908 <member name="P:HttpServer.IHttpRequest.IsAjax">
3909 <summary>
3910 Gets whether the request was made by Ajax (Asynchronous JavaScript)
3911 </summary>
3912 </member>
3913 <member name="P:HttpServer.IHttpRequest.Method">
3914 <summary>
3915 Gets or sets requested method.
3916 </summary>
3917 <remarks>
3918 Will always be in upper case.
3919 </remarks>
3920 <see cref="P:HttpServer.IHttpRequest.Method"/>
3921 </member>
3922 <member name="P:HttpServer.IHttpRequest.Param">
3923 <summary>
3924 Gets parameter from <see cref="P:HttpServer.IHttpRequest.QueryString"/> or <see cref="P:HttpServer.IHttpRequest.Form"/>.
3925 </summary>
3926 </member>
3927 <member name="P:HttpServer.IHttpRequest.QueryString">
3928 <summary>
3929 Gets variables sent in the query string
3930 </summary>
3931 </member>
3932 <member name="P:HttpServer.IHttpRequest.Uri">
3933 <summary>
3934 Gets or sets requested URI.
3935 </summary>
3936 </member>
3937 <member name="P:HttpServer.IHttpRequest.UriParts">
3938 <summary>
3939 Gets URI absolute path divided into parts.
3940 </summary>
3941 <example>
3942 // URI is: http://gauffin.com/code/tiny/
3943 Console.WriteLine(request.UriParts[0]); // result: code
3944 Console.WriteLine(request.UriParts[1]); // result: tiny
3945 </example>
3946 <remarks>
3947 If you're using controllers than the first part is controller name,
3948 the second part is method name and the third part is Id property.
3949 </remarks>
3950 <seealso cref="P:HttpServer.IHttpRequest.Uri"/>
3951 </member>
3952 <member name="P:HttpServer.IHttpRequest.UriPath">
3953 <summary>
3954 Gets or sets path and query.
3955 </summary>
3956 <see cref="P:HttpServer.IHttpRequest.Uri"/>
3957 <remarks>
3958 Are only used during request parsing. Cannot be set after "Host" header have been
3959 added.
3960 </remarks>
3961 </member>
3962 <member name="M:HttpServer.IHttpRequest.AddHeader(System.String,System.String)">
3963 <summary>
3964 Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>.
3965 </summary>
3966 <param name="name">Name of the header, should not be URL encoded</param>
3967 <param name="value">Value of the header, should not be URL encoded</param>
3968 <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception>
3969 </member>
3970 <member name="M:HttpServer.IHttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)">
3971 <summary>
3972 Add bytes to the body
3973 </summary>
3974 <param name="bytes">buffer to read bytes from</param>
3975 <param name="offset">where to start read</param>
3976 <param name="length">number of bytes to read</param>
3977 <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns>
3978 <exception cref="T:System.InvalidOperationException">If body is not writable</exception>
3979 <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception>
3980 <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception>
3981 </member>
3982 <member name="M:HttpServer.IHttpRequest.Clear">
3983 <summary>
3984 Clear everything in the request
3985 </summary>
3986 </member>
3987 <member name="M:HttpServer.IHttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)">
3988 <summary>
3989 Decode body into a form.
3990 </summary>
3991 <param name="providers">A list with form decoders.</param>
3992 <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception>
3993 <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception>
3994 </member>
3995 <member name="M:HttpServer.IHttpRequest.SetCookies(HttpServer.RequestCookies)">
3996 <summary>
3997 Sets the cookies.
3998 </summary>
3999 <param name="cookies">The cookies.</param>
4000 </member>
4001 <member name="M:HttpServer.IHttpRequest.CreateResponse(HttpServer.IHttpClientContext)">
4002 <summary>
4003 Create a response object.
4004 </summary>
4005 <param name="context">Context for the connected client.</param>
4006 <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns>
4007 </member>
4008 <member name="T:HttpServer.IHttpRequestParser">
4009 <summary>
4010 Event driven parser used to parse incoming HTTP requests.
4011 </summary>
4012 <remarks>
4013 The parser supports partial messages and keeps the states between
4014 each parsed buffer. It's therefore important that the parser gets
4015 <see cref="M:HttpServer.IHttpRequestParser.Clear"/>ed if a client disconnects.
4016 </remarks>
4017 </member>
4018 <member name="P:HttpServer.IHttpRequestParser.CurrentState">
4019 <summary>
4020 Current state in parser.
4021 </summary>
4022 </member>
4023 <member name="M:HttpServer.IHttpRequestParser.Parse(System.Byte[],System.Int32,System.Int32)">
4024 <summary>
4025 Parse partial or complete message.
4026 </summary>
4027 <param name="buffer">buffer containing incoming bytes</param>
4028 <param name="offset">where in buffer that parsing should start</param>
4029 <param name="count">number of bytes to parse</param>
4030 <returns>Unparsed bytes left in buffer.</returns>
4031 <exception cref="T:HttpServer.Exceptions.BadRequestException"><c>BadRequestException</c>.</exception>
4032 </member>
4033 <member name="E:HttpServer.IHttpRequestParser.RequestCompleted">
4034 <summary>
4035 A request have been successfully parsed.
4036 </summary>
4037 </member>
4038 <member name="E:HttpServer.IHttpRequestParser.BodyBytesReceived">
4039 <summary>
4040 More body bytes have been received.
4041 </summary>
4042 </member>
4043 <member name="E:HttpServer.IHttpRequestParser.RequestLineReceived">
4044 <summary>
4045 Request line have been received.
4046 </summary>
4047 </member>
4048 <member name="E:HttpServer.IHttpRequestParser.HeaderReceived">
4049 <summary>
4050 A header have been received.
4051 </summary>
4052 </member>
4053 <member name="M:HttpServer.IHttpRequestParser.Clear">
4054 <summary>
4055 Clear parser state.
4056 </summary>
4057 </member>
4058 <member name="P:HttpServer.IHttpRequestParser.LogWriter">
4059 <summary>
4060 Gets or sets the log writer.
4061 </summary>
4062 </member>
4063 <member name="T:HttpServer.RequestParserState">
4064 <summary>
4065 Current state in the parsing.
4066 </summary>
4067 </member>
4068 <member name="F:HttpServer.RequestParserState.FirstLine">
4069 <summary>
4070 Should parse the request line
4071 </summary>
4072 </member>
4073 <member name="F:HttpServer.RequestParserState.HeaderName">
4074 <summary>
4075 Searching for a complete header name
4076 </summary>
4077 </member>
4078 <member name="F:HttpServer.RequestParserState.AfterName">
4079 <summary>
4080 Searching for colon after header name (ignoring white spaces)
4081 </summary>
4082 </member>
4083 <member name="F:HttpServer.RequestParserState.Between">
4084 <summary>
4085 Searching for start of header value (ignoring white spaces)
4086 </summary>
4087 </member>
4088 <member name="F:HttpServer.RequestParserState.HeaderValue">
4089 <summary>
4090 Searching for a complete header value (can span over multiple lines, as long as they are prefixed with one/more whitespaces)
4091 </summary>
4092 </member>
4093 <member name="F:HttpServer.RequestParserState.Body">
4094 <summary>
4095 Adding bytes to body
4096 </summary>
4097 </member>
4098 <member name="T:HttpServer.IHttpResponse">
4099 <summary>
4100 Response that is sent back to the web browser / client.
4101
4102 A response can be sent if different ways. The easiest one is
4103 to just fill the Body stream with content, everything else
4104 will then be taken care of by the framework. The default content-type
4105 is text/html, you should change it if you send anything else.
4106
4107 The second and slighty more complex way is to send the response
4108 as parts. Start with sending the header using the SendHeaders method and
4109 then you can send the body using SendBody method, but do not forget
4110 to set ContentType and ContentLength before doing so.
4111 </summary>
4112 <example>
4113 public void MyHandler(IHttpRequest request, IHttpResponse response)
4114 {
4115
4116 }
4117 </example>
4118 </member>
4119 <member name="P:HttpServer.IHttpResponse.Body">
4120 <summary>
4121 The body stream is used to cache the body contents
4122 before sending everything to the client. It's the simplest
4123 way to serve documents.
4124 </summary>
4125 </member>
4126 <member name="P:HttpServer.IHttpResponse.ProtocolVersion">
4127 <summary>
4128 Defines the version of the HTTP Response for applications where it's required
4129 for this to be forced.
4130 </summary>
4131 </member>
4132 <member name="P:HttpServer.IHttpResponse.Chunked">
4133 <summary>
4134 The chunked encoding modifies the body of a message in order to
4135 transfer it as a series of chunks, each with its own size indicator,
4136 followed by an OPTIONAL trailer containing entity-header fields. This
4137 allows dynamically produced content to be transferred along with the
4138 information necessary for the recipient to verify that it has
4139 received the full message.
4140 </summary>
4141 </member>
4142 <member name="P:HttpServer.IHttpResponse.Connection">
4143 <summary>
4144 Kind of connection
4145 </summary>
4146 </member>
4147 <member name="P:HttpServer.IHttpResponse.Encoding">
4148 <summary>
4149 Encoding to use when sending stuff to the client.
4150 </summary>
4151 <remarks>Default is UTF8</remarks>
4152 </member>
4153 <member name="P:HttpServer.IHttpResponse.KeepAlive">
4154 <summary>
4155 Number of seconds to keep connection alive
4156 </summary>
4157 <remarks>Only used if Connection property is set to ConnectionType.KeepAlive</remarks>
4158 </member>
4159 <member name="P:HttpServer.IHttpResponse.Status">
4160 <summary>
4161 Status code that is sent to the client.
4162 </summary>
4163 <remarks>Default is HttpStatusCode.Ok</remarks>
4164 </member>
4165 <member name="P:HttpServer.IHttpResponse.Reason">
4166 <summary>
4167 Information about why a specific status code was used.
4168 </summary>
4169 </member>
4170 <member name="P:HttpServer.IHttpResponse.ContentLength">
4171 <summary>
4172 Size of the body. MUST be specified before sending the header,
4173 unless property Chunked is set to true.
4174 </summary>
4175 </member>
4176 <member name="P:HttpServer.IHttpResponse.ContentType">
4177 <summary>
4178 Kind of content in the body
4179 </summary>
4180 <remarks>Default is text/html</remarks>
4181 </member>
4182 <member name="P:HttpServer.IHttpResponse.HeadersSent">
4183 <summary>
4184 Headers have been sent to the client-
4185 </summary>
4186 <remarks>You can not send any additional headers if they have already been sent.</remarks>
4187 </member>
4188 <member name="P:HttpServer.IHttpResponse.Sent">
4189 <summary>
4190 The whole response have been sent.
4191 </summary>
4192 </member>
4193 <member name="P:HttpServer.IHttpResponse.Cookies">
4194 <summary>
4195 Cookies that should be created/changed.
4196 </summary>
4197 </member>
4198 <member name="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)">
4199 <summary>
4200 Add another header to the document.
4201 </summary>
4202 <param name="name">Name of the header, case sensitive, use lower cases.</param>
4203 <param name="value">Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n</param>
4204 <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception>
4205 <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception>
4206 <remarks>Adding any header will override the default ones and those specified by properties.</remarks>
4207 </member>
4208 <member name="M:HttpServer.IHttpResponse.Send">
4209 <summary>
4210 Send headers and body to the browser.
4211 </summary>
4212 <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception>
4213 </member>
4214 <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)">
4215 <summary>
4216 Make sure that you have specified ContentLength and sent the headers first.
4217 </summary>
4218 <param name="buffer"></param>
4219 <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception>
4220 <see cref="M:HttpServer.IHttpResponse.SendHeaders"/>
4221 <param name="offset">offest of first byte to send</param>
4222 <param name="count">number of bytes to send.</param>
4223 <seealso cref="M:HttpServer.IHttpResponse.Send"/>
4224 <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/>
4225 <remarks>This method can be used if you want to send body contents without caching them first. This
4226 is recommended for larger files to keep the memory usage low.</remarks>
4227 </member>
4228 <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[])">
4229 <summary>
4230 Make sure that you have specified ContentLength and sent the headers first.
4231 </summary>
4232 <param name="buffer"></param>
4233 <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception>
4234 <see cref="M:HttpServer.IHttpResponse.SendHeaders"/>
4235 <seealso cref="M:HttpServer.IHttpResponse.Send"/>
4236 <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/>
4237 <remarks>This method can be used if you want to send body contents without caching them first. This
4238 is recommended for larger files to keep the memory usage low.</remarks>
4239 </member>
4240 <member name="M:HttpServer.IHttpResponse.SendHeaders">
4241 <summary>
4242 Send headers to the client.
4243 </summary>
4244 <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception>
4245 <seealso cref="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"/>
4246 <seealso cref="M:HttpServer.IHttpResponse.Send"/>
4247 <seealso cref="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"/>
4248 </member>
4249 <member name="M:HttpServer.IHttpResponse.Redirect(System.Uri)">
4250 <summary>
4251 Redirect client to somewhere else using the 302 status code.
4252 </summary>
4253 <param name="uri">Destination of the redirect</param>
4254 <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception>
4255 <remarks>You can not do anything more with the request when a redirect have been done. This should be your last
4256 action.</remarks>
4257 </member>
4258 <member name="M:HttpServer.IHttpResponse.Redirect(System.String)">
4259 <summary>
4260 redirect to somewhere
4261 </summary>
4262 <param name="url">where the redirect should go</param>
4263 <remarks>
4264 No body are allowed when doing redirects.
4265 </remarks>
4266 </member>
4267 <member name="T:HttpServer.ConnectionType">
4268 <summary>
4269 Type of HTTP connection
4270 </summary>
4271 </member>
4272 <member name="F:HttpServer.ConnectionType.Close">
4273 <summary>
4274 Connection is closed after each request-response
4275 </summary>
4276 </member>
4277 <member name="F:HttpServer.ConnectionType.KeepAlive">
4278 <summary>
4279 Connection is kept alive for X seconds (unless another request have been made)
4280 </summary>
4281 </member>
4282 <member name="T:HttpServer.LogPrio">
4283 <summary>
4284 Priority for log entries
4285 </summary>
4286 <seealso cref="T:HttpServer.ILogWriter"/>
4287 </member>
4288 <member name="F:HttpServer.LogPrio.Trace">
4289 <summary>
4290 Very detailed logs to be able to follow the flow of the program.
4291 </summary>
4292 </member>
4293 <member name="F:HttpServer.LogPrio.Debug">
4294 <summary>
4295 Logs to help debug errors in the application
4296 </summary>
4297 </member>
4298 <member name="F:HttpServer.LogPrio.Info">
4299 <summary>
4300 Information to be able to keep track of state changes etc.
4301 </summary>
4302 </member>
4303 <member name="F:HttpServer.LogPrio.Warning">
4304 <summary>
4305 Something did not go as we expected, but it's no problem.
4306 </summary>
4307 </member>
4308 <member name="F:HttpServer.LogPrio.Error">
4309 <summary>
4310 Something that should not fail failed, but we can still keep
4311 on going.
4312 </summary>
4313 </member>
4314 <member name="F:HttpServer.LogPrio.Fatal">
4315 <summary>
4316 Something failed, and we cannot handle it properly.
4317 </summary>
4318 </member>
4319 <member name="T:HttpServer.ILogWriter">
4320 <summary>
4321 Interface used to write to log files.
4322 </summary>
4323 </member>
4324 <member name="M:HttpServer.ILogWriter.Write(System.Object,HttpServer.LogPrio,System.String)">
4325 <summary>
4326 Write an entry to the log file.
4327 </summary>
4328 <param name="source">object that is writing to the log</param>
4329 <param name="priority">importance of the log message</param>
4330 <param name="message">the message</param>
4331 </member>
4332 <member name="T:HttpServer.ConsoleLogWriter">
4333 <summary>
4334 This class writes to the console. It colors the output depending on the logprio and includes a 3-level stacktrace (in debug mode)
4335 </summary>
4336 <seealso cref="T:HttpServer.ILogWriter"/>
4337 </member>
4338 <member name="F:HttpServer.ConsoleLogWriter.Instance">
4339 <summary>
4340 The actual instance of this class.
4341 </summary>
4342 </member>
4343 <member name="M:HttpServer.ConsoleLogWriter.Write(System.Object,HttpServer.LogPrio,System.String)">
4344 <summary>
4345 Logwriters the specified source.
4346 </summary>
4347 <param name="source">object that wrote the logentry.</param>
4348 <param name="prio">Importance of the log message</param>
4349 <param name="message">The message.</param>
4350 </member>
4351 <member name="M:HttpServer.ConsoleLogWriter.GetColor(HttpServer.LogPrio)">
4352 <summary>
4353 Get color for the specified logprio
4354 </summary>
4355 <param name="prio">prio for the log entry</param>
4356 <returns>A <see cref="T:System.ConsoleColor"/> for the prio</returns>
4357 </member>
4358 <member name="T:HttpServer.NullLogWriter">
4359 <summary>
4360 Default log writer, writes everything to null (nowhere).
4361 </summary>
4362 <seealso cref="T:HttpServer.ILogWriter"/>
4363 </member>
4364 <member name="F:HttpServer.NullLogWriter.Instance">
4365 <summary>
4366 The logging instance.
4367 </summary>
4368 </member>
4369 <member name="M:HttpServer.NullLogWriter.Write(System.Object,HttpServer.LogPrio,System.String)">
4370 <summary>
4371 Writes everything to null
4372 </summary>
4373 <param name="source">object that wrote the log entry.</param>
4374 <param name="prio">Importance of the log message</param>
4375 <param name="message">The message.</param>
4376 </member>
4377 <member name="T:HttpServer.LocklessQueue`1">
4378 <summary>
4379 A thread-safe lockless queue that supports multiple readers and
4380 multiple writers
4381 </summary>
4382 </member>
4383 <member name="T:HttpServer.LocklessQueue`1.SingleLinkNode">
4384 <summary>
4385 Provides a node container for data in a singly linked list
4386 </summary>
4387 </member>
4388 <member name="F:HttpServer.LocklessQueue`1.SingleLinkNode.Next">
4389 <summary>Pointer to the next node in list</summary>
4390 </member>
4391 <member name="F:HttpServer.LocklessQueue`1.SingleLinkNode.Item">
4392 <summary>The data contained by the node</summary>
4393 </member>
4394 <member name="M:HttpServer.LocklessQueue`1.SingleLinkNode.#ctor">
4395 <summary>
4396 Constructor
4397 </summary>
4398 </member>
4399 <member name="M:HttpServer.LocklessQueue`1.SingleLinkNode.#ctor(`0)">
4400 <summary>
4401 Constructor
4402 </summary>
4403 </member>
4404 <member name="F:HttpServer.LocklessQueue`1.head">
4405 <summary>Queue head</summary>
4406 </member>
4407 <member name="F:HttpServer.LocklessQueue`1.tail">
4408 <summary>Queue tail</summary>
4409 </member>
4410 <member name="F:HttpServer.LocklessQueue`1.count">
4411 <summary>Queue item count</summary>
4412 </member>
4413 <member name="P:HttpServer.LocklessQueue`1.Count">
4414 <summary>Gets the current number of items in the queue. Since this
4415 is a lockless collection this value should be treated as a close
4416 estimate</summary>
4417 </member>
4418 <member name="M:HttpServer.LocklessQueue`1.#ctor">
4419 <summary>
4420 Constructor
4421 </summary>
4422 </member>
4423 <member name="M:HttpServer.LocklessQueue`1.Enqueue(`0)">
4424 <summary>
4425 Enqueue an item
4426 </summary>
4427 <param name="item">Item to enqeue</param>
4428 </member>
4429 <member name="M:HttpServer.LocklessQueue`1.TryDequeue(`0@)">
4430 <summary>
4431 Try to dequeue an item
4432 </summary>
4433 <param name="item">Dequeued item if the dequeue was successful</param>
4434 <returns>True if an item was successfully deqeued, otherwise false</returns>
4435 </member>
4436 <member name="T:HttpServer.Method">
4437 <summary>
4438 Contains all HTTP Methods (according to the HTTP 1.1 specification)
4439 <para>
4440 See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
4441 </para>
4442 </summary>
4443 </member>
4444 <member name="F:HttpServer.Method.Delete">
4445 <summary>
4446 The DELETE method requests that the origin server delete the resource identified by the Request-URI.
4447 </summary>
4448 <remarks>
4449 <para>
4450 This method MAY be overridden by human intervention (or other means) on the origin server.
4451 The client cannot be guaranteed that the operation has been carried out, even if the status code
4452 returned from the origin server indicates that the action has been completed successfully.
4453 </para>
4454 <para>
4455 However, the server SHOULD NOT indicate success unless, at the time the response is given,
4456 it intends to delete the resource or move it to an inaccessible location.
4457 </para>
4458 <para>
4459 A successful response SHOULD be 200 (OK) if the response includes an entity describing the status,
4460 202 (Accepted) if the action has not yet been enacted,
4461 or 204 (No Content) if the action has been enacted but the response does not include an entity.
4462 </para>
4463 <para>
4464 If the request passes through a cache and the Request-URI identifies one or more currently cached entities,
4465 those entries SHOULD be treated as stale. Responses to this method are not cacheable.
4466 </para>
4467 </remarks>
4468 </member>
4469 <member name="F:HttpServer.Method.Get">
4470 <summary>
4471 The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
4472 </summary>
4473 <remarks>
4474 <para>
4475 If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the
4476 entity in the response and not the source text of the process, unless that text happens to be the output of the process.
4477 </para>
4478 <para>
4479 The semantics of the GET method change to a "conditional GET" if the request message includes an
4480 If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field.
4481 A conditional GET method requests that the entity be transferred only under the circumstances described
4482 by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network
4483 usage by allowing cached entities to be refreshed without requiring multiple requests or transferring
4484 data already held by the client.
4485 </para>
4486 </remarks>
4487 </member>
4488 <member name="F:HttpServer.Method.Header">
4489 <summary>
4490 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
4491 </summary>
4492 <remarks>
4493 The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the
4494 information sent in response to a GET request. This method can be used for obtaining meta information about
4495 the entity implied by the request without transferring the entity-body itself.
4496
4497 This method is often used for testing hypertext links for validity, accessibility, and recent modification.
4498 </remarks>
4499 </member>
4500 <member name="F:HttpServer.Method.Options">
4501 <summary>
4502 <para>The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.</para>
4503 </summary>
4504 <remarks>
4505 <para>This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.</para>
4506 </remarks>
4507 </member>
4508 <member name="F:HttpServer.Method.Post">
4509 <summary>
4510 The POST method is used to request that the origin server accept the entity enclosed
4511 in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
4512 </summary>
4513 <remarks>
4514 POST is designed to allow a uniform method to cover the following functions:
4515 <list type="bullet">
4516 <item>
4517 Annotation of existing resources;
4518 </item><item>
4519 Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;
4520 </item><item>
4521 Providing a block of data, such as the result of submitting a form, to a data-handling process;
4522 </item><item>
4523 Extending a database through an append operation.
4524 </item>
4525 </list>
4526 <para>
4527 If a resource has been created on the origin server, the response SHOULD be 201 (Created) and
4528 contain an entity which describes the status of the request and refers to the new resource, and a
4529 Location header (see section 14.30).
4530 </para>
4531 <para>
4532 The action performed by the POST method might not result in a resource that can be identified by a URI.
4533 In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on
4534 whether or not the response includes an entity that describes the result.
4535 </para><para>
4536 Responses to this method are not cacheable, unless the response includes appropriate Cache-Control
4537 or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent
4538 to retrieve a cacheable resource.
4539 </para>
4540 </remarks>
4541 </member>
4542 <member name="F:HttpServer.Method.Put">
4543 <summary>
4544 The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
4545 </summary>
4546 <remarks>
4547 <list type="bullet">
4548 <item>
4549 If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a
4550 modified version of the one residing on the origin server.
4551 </item><item>
4552 If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new
4553 resource by the requesting user agent, the origin server can create the resource with that URI.
4554 </item><item>
4555 If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response.
4556 </item><item>
4557 If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to
4558 indicate successful completion of the request.
4559 </item><item>
4560 If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be
4561 given that reflects the nature of the problem.
4562 </item>
4563 </list>
4564 <para>
4565 The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not
4566 understand or implement and MUST return a 501 (Not Implemented) response in such cases.
4567 </para>
4568 </remarks>
4569 </member>
4570 <member name="F:HttpServer.Method.Trace">
4571 <summary>
4572 The TRACE method is used to invoke a remote, application-layer loop- back of the request message.
4573 </summary>
4574 </member>
4575 <member name="T:HttpServer.Methods">
4576 <summary>
4577 Contains all HTTP Methods (according to the HTTP 1.1 specification)
4578 <para>
4579 See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
4580 </para>
4581 </summary>
4582 </member>
4583 <member name="F:HttpServer.Methods.Delete">
4584 <summary>
4585 The DELETE method requests that the origin server delete the resource identified by the Request-URI.
4586 </summary>
4587 <remarks>
4588 <para>
4589 This method MAY be overridden by human intervention (or other means) on the origin server.
4590 The client cannot be guaranteed that the operation has been carried out, even if the status code
4591 returned from the origin server indicates that the action has been completed successfully.
4592 </para>
4593 <para>
4594 However, the server SHOULD NOT indicate success unless, at the time the response is given,
4595 it intends to delete the resource or move it to an inaccessible location.
4596 </para>
4597 <para>
4598 A successful response SHOULD be 200 (OK) if the response includes an entity describing the status,
4599 202 (Accepted) if the action has not yet been enacted,
4600 or 204 (No Content) if the action has been enacted but the response does not include an entity.
4601 </para>
4602 <para>
4603 If the request passes through a cache and the Request-URI identifies one or more currently cached entities,
4604 those entries SHOULD be treated as stale. Responses to this method are not cacheable.
4605 </para>
4606 </remarks>
4607 </member>
4608 <member name="F:HttpServer.Methods.Get">
4609 <summary>
4610 The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
4611 </summary>
4612 <remarks>
4613 <para>
4614 If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the
4615 entity in the response and not the source text of the process, unless that text happens to be the output of the process.
4616 </para>
4617 <para>
4618 The semantics of the GET method change to a "conditional GET" if the request message includes an
4619 If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field.
4620 A conditional GET method requests that the entity be transferred only under the circumstances described
4621 by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network
4622 usage by allowing cached entities to be refreshed without requiring multiple requests or transferring
4623 data already held by the client.
4624 </para>
4625 </remarks>
4626 </member>
4627 <member name="F:HttpServer.Methods.Header">
4628 <summary>
4629 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
4630 </summary>
4631 <remarks>
4632 The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the
4633 information sent in response to a GET request. This method can be used for obtaining meta information about
4634 the entity implied by the request without transferring the entity-body itself.
4635
4636 This method is often used for testing hypertext links for validity, accessibility, and recent modification.
4637 </remarks>
4638 </member>
4639 <member name="F:HttpServer.Methods.Options">
4640 <summary>
4641 <para>The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.</para>
4642 </summary>
4643 <remarks>
4644 <para>This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.</para>
4645 </remarks>
4646 </member>
4647 <member name="F:HttpServer.Methods.Post">
4648 <summary>
4649 The POST method is used to request that the origin server accept the entity enclosed
4650 in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
4651 </summary>
4652 <remarks>
4653 POST is designed to allow a uniform method to cover the following functions:
4654 <list type="bullet">
4655 <item>
4656 Annotation of existing resources;
4657 </item><item>
4658 Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;
4659 </item><item>
4660 Providing a block of data, such as the result of submitting a form, to a data-handling process;
4661 </item><item>
4662 Extending a database through an append operation.
4663 </item>
4664 </list>
4665 <para>
4666 If a resource has been created on the origin server, the response SHOULD be 201 (Created) and
4667 contain an entity which describes the status of the request and refers to the new resource, and a
4668 Location header (see section 14.30).
4669 </para>
4670 <para>
4671 The action performed by the POST method might not result in a resource that can be identified by a URI.
4672 In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on
4673 whether or not the response includes an entity that describes the result.
4674 </para><para>
4675 Responses to this method are not cacheable, unless the response includes appropriate Cache-Control
4676 or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent
4677 to retrieve a cacheable resource.
4678 </para>
4679 </remarks>
4680 </member>
4681 <member name="F:HttpServer.Methods.Put">
4682 <summary>
4683 The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
4684 </summary>
4685 <remarks>
4686 <list type="bullet">
4687 <item>
4688 If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a
4689 modified version of the one residing on the origin server.
4690 </item><item>
4691 If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new
4692 resource by the requesting user agent, the origin server can create the resource with that URI.
4693 </item><item>
4694 If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response.
4695 </item><item>
4696 If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to
4697 indicate successful completion of the request.
4698 </item><item>
4699 If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be
4700 given that reflects the nature of the problem.
4701 </item>
4702 </list>
4703 <para>
4704 The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not
4705 understand or implement and MUST return a 501 (Not Implemented) response in such cases.
4706 </para>
4707 </remarks>
4708 </member>
4709 <member name="F:HttpServer.Methods.Trace">
4710 <summary>
4711 The TRACE method is used to invoke a remote, application-layer loop- back of the request message.
4712 </summary>
4713 </member>
4714 <member name="T:HttpServer.Parser.BodyEventArgs">
4715 <summary>
4716 Arguments used when more body bytes have come.
4717 </summary>
4718 </member>
4719 <member name="M:HttpServer.Parser.BodyEventArgs.#ctor(System.Byte[],System.Int32,System.Int32)">
4720 <summary>
4721 Initializes a new instance of the <see cref="T:HttpServer.Parser.BodyEventArgs"/> class.
4722 </summary>
4723 <param name="buffer">buffer that contains the received bytes.</param>
4724 <param name="offset">offset in buffer where to start processing.</param>
4725 <param name="count">number of bytes from <paramref name="offset"/> that should be parsed.</param>
4726 </member>
4727 <member name="M:HttpServer.Parser.BodyEventArgs.#ctor">
4728 <summary>
4729 Initializes a new instance of the <see cref="T:HttpServer.Parser.BodyEventArgs"/> class.
4730 </summary>
4731 </member>
4732 <member name="P:HttpServer.Parser.BodyEventArgs.Buffer">
4733 <summary>
4734 Gets or sets buffer that contains the received bytes.
4735 </summary>
4736 </member>
4737 <member name="P:HttpServer.Parser.BodyEventArgs.Count">
4738 <summary>
4739 Gets or sets number of bytes from <see cref="P:HttpServer.Parser.BodyEventArgs.Offset"/> that should be parsed.
4740 </summary>
4741 </member>
4742 <member name="P:HttpServer.Parser.BodyEventArgs.Offset">
4743 <summary>
4744 Gets or sets offset in buffer where to start processing.
4745 </summary>
4746 </member>
4747 <member name="T:HttpServer.Parser.HeaderEventArgs">
4748 <summary>
4749 Event arguments used when a new header have been parsed.
4750 </summary>
4751 </member>
4752 <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor(System.String,System.String)">
4753 <summary>
4754 Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class.
4755 </summary>
4756 <param name="name">Name of header.</param>
4757 <param name="value">Header value.</param>
4758 </member>
4759 <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor">
4760 <summary>
4761 Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class.
4762 </summary>
4763 </member>
4764 <member name="P:HttpServer.Parser.HeaderEventArgs.Name">
4765 <summary>
4766 Gets or sets header name.
4767 </summary>
4768 </member>
4769 <member name="P:HttpServer.Parser.HeaderEventArgs.Value">
4770 <summary>
4771 Gets or sets header value.
4772 </summary>
4773 </member>
4774 <member name="T:HttpServer.Parser.HttpRequestParser">
4775 <summary>
4776 Parses a HTTP request directly from a stream
4777 </summary>
4778 </member>
4779 <member name="M:HttpServer.Parser.HttpRequestParser.#ctor(HttpServer.ILogWriter)">
4780 <summary>
4781 Create a new request parser
4782 </summary>
4783 <param name="logWriter">delegate receiving log entries.</param>
4784 </member>
4785 <member name="M:HttpServer.Parser.HttpRequestParser.AddToBody(System.Byte[],System.Int32,System.Int32)">
4786 <summary>
4787 Add a number of bytes to the body
4788 </summary>
4789 <param name="buffer">buffer containing more body bytes.</param>
4790 <param name="offset">starting offset in buffer</param>
4791 <param name="count">number of bytes, from offset, to read.</param>
4792 <returns>offset to continue from.</returns>
4793 </member>
4794 <member name="M:HttpServer.Parser.HttpRequestParser.Clear">
4795 <summary>
4796 Remove all state information for the request.
4797 </summary>
4798 </member>
4799 <member name="P:HttpServer.Parser.HttpRequestParser.LogWriter">
4800 <summary>
4801 Gets or sets the log writer.
4802 </summary>
4803 </member>
4804 <member name="M:HttpServer.Parser.HttpRequestParser.OnFirstLine(System.String)">
4805 <summary>
4806 Parse request line
4807 </summary>
4808 <param name="value"></param>
4809 <exception cref="T:HttpServer.Exceptions.BadRequestException">If line is incorrect</exception>
4810 <remarks>Expects the following format: "Method SP Request-URI SP HTTP-Version CRLF"</remarks>
4811 </member>
4812 <member name="M:HttpServer.Parser.HttpRequestParser.OnHeader(System.String,System.String)">
4813 <summary>
4814 We've parsed a new header.
4815 </summary>
4816 <param name="name">Name in lower case</param>
4817 <param name="value">Value, unmodified.</param>
4818 <exception cref="T:HttpServer.Exceptions.BadRequestException">If content length cannot be parsed.</exception>
4819 </member>
4820 <member name="P:HttpServer.Parser.HttpRequestParser.CurrentState">
4821 <summary>
4822 Current state in parser.
4823 </summary>
4824 </member>
4825 <member name="M:HttpServer.Parser.HttpRequestParser.Parse(System.Byte[],System.Int32,System.Int32)">
4826 <summary>
4827 Parse a message
4828 </summary>
4829 <param name="buffer">bytes to parse.</param>
4830 <param name="offset">where in buffer that parsing should start</param>
4831 <param name="count">number of bytes to parse, starting on <paramref name="offset"/>.</param>
4832 <returns>offset (where to start parsing next).</returns>
4833 <exception cref="T:HttpServer.Exceptions.BadRequestException"><c>BadRequestException</c>.</exception>
4834 </member>
4835 <member name="E:HttpServer.Parser.HttpRequestParser.RequestCompleted">
4836 <summary>
4837 A request have been successfully parsed.
4838 </summary>
4839 </member>
4840 <member name="E:HttpServer.Parser.HttpRequestParser.BodyBytesReceived">
4841 <summary>
4842 More body bytes have been received.
4843 </summary>
4844 </member>
4845 <member name="E:HttpServer.Parser.HttpRequestParser.RequestLineReceived">
4846 <summary>
4847 Request line have been received.
4848 </summary>
4849 </member>
4850 <member name="E:HttpServer.Parser.HttpRequestParser.HeaderReceived">
4851 <summary>
4852 A header have been received.
4853 </summary>
4854 </member>
4855 <member name="T:HttpServer.Parser.RequestLineEventArgs">
4856 <summary>
4857 Used when the request line have been successfully parsed.
4858 </summary>
4859 </member>
4860 <member name="M:HttpServer.Parser.RequestLineEventArgs.#ctor(System.String,System.String,System.String)">
4861 <summary>
4862 Initializes a new instance of the <see cref="T:HttpServer.Parser.RequestLineEventArgs"/> class.
4863 </summary>
4864 <param name="httpMethod">The HTTP method.</param>
4865 <param name="uriPath">The URI path.</param>
4866 <param name="httpVersion">The HTTP version.</param>
4867 </member>
4868 <member name="M:HttpServer.Parser.RequestLineEventArgs.#ctor">
4869 <summary>
4870 Initializes a new instance of the <see cref="T:HttpServer.Parser.RequestLineEventArgs"/> class.
4871 </summary>
4872 </member>
4873 <member name="P:HttpServer.Parser.RequestLineEventArgs.HttpMethod">
4874 <summary>
4875 Gets or sets http method.
4876 </summary>
4877 <remarks>
4878 Should be one of the methods declared in <see cref="T:HttpServer.Method"/>.
4879 </remarks>
4880 </member>
4881 <member name="P:HttpServer.Parser.RequestLineEventArgs.HttpVersion">
4882 <summary>
4883 Gets or sets the version of the HTTP protocol that the client want to use.
4884 </summary>
4885 </member>
4886 <member name="P:HttpServer.Parser.RequestLineEventArgs.UriPath">
4887 <summary>
4888 Gets or sets requested URI path.
4889 </summary>
4890 </member>
4891 <member name="T:HttpServer.RequestParserFactory">
4892 <summary>
4893 Creates request parsers when needed.
4894 </summary>
4895 </member>
4896 <member name="M:HttpServer.RequestParserFactory.CreateParser(HttpServer.ILogWriter)">
4897 <summary>
4898 Create a new request parser.
4899 </summary>
4900 <param name="logWriter">Used when logging should be enabled.</param>
4901 <returns>A new request parser.</returns>
4902 </member>
4903 <member name="T:HttpServer.IRequestParserFactory">
4904 <summary>
4905 Creates request parsers when needed.
4906 </summary>
4907 </member>
4908 <member name="M:HttpServer.IRequestParserFactory.CreateParser(HttpServer.ILogWriter)">
4909 <summary>
4910 Create a new request parser.
4911 </summary>
4912 <param name="logWriter">Used when logging should be enabled.</param>
4913 <returns>A new request parser.</returns>
4914 </member>
4915 <member name="T:HttpServer.RequestCookie">
4916 <summary>
4917 cookie sent by the client/browser
4918 </summary>
4919 <seealso cref="T:HttpServer.ResponseCookie"/>
4920 </member>
4921 <member name="M:HttpServer.RequestCookie.#ctor(System.String,System.String)">
4922 <summary>
4923 Constructor.
4924 </summary>
4925 <param name="id">cookie identifier</param>
4926 <param name="content">cookie content</param>
4927 <exception cref="T:System.ArgumentNullException">id or content is null</exception>
4928 <exception cref="T:System.ArgumentException">id is empty</exception>
4929 </member>
4930 <member name="M:HttpServer.RequestCookie.ToString">
4931 <summary>
4932 Gets the cookie HTML representation.
4933 </summary>
4934 <returns>cookie string</returns>
4935 </member>
4936 <member name="P:HttpServer.RequestCookie.Name">
4937 <summary>
4938 Gets the cookie identifier.
4939 </summary>
4940 </member>
4941 <member name="P:HttpServer.RequestCookie.Value">
4942 <summary>
4943 Cookie value. Set to null to remove cookie.
4944 </summary>
4945 </member>
4946 <member name="T:HttpServer.RequestCookies">
4947 <summary>
4948 This class is created as a wrapper, since there are two different cookie types in .Net (Cookie and HttpCookie).
4949 The framework might switch class in the future and we dont want to have to replace all instances
4950 </summary>
4951 </member>
4952 <member name="M:HttpServer.RequestCookies.#ctor(System.String)">
4953 <summary>
4954 Let's copy all the cookies.
4955 </summary>
4956 <param name="cookies">value from cookie header.</param>
4957 </member>
4958 <member name="M:HttpServer.RequestCookies.Add(HttpServer.RequestCookie)">
4959 <summary>
4960 Adds a cookie in the collection.
4961 </summary>
4962 <param name="cookie">cookie to add</param>
4963 <exception cref="T:System.ArgumentNullException">cookie is null</exception>
4964 </member>
4965 <member name="P:HttpServer.RequestCookies.Count">
4966 <summary>
4967 Gets the count of cookies in the collection.
4968 </summary>
4969 </member>
4970 <member name="P:HttpServer.RequestCookies.Item(System.String)">
4971 <summary>
4972 Gets the cookie of a given identifier (null if not existing).
4973 </summary>
4974 </member>
4975 <member name="M:HttpServer.RequestCookies.GetEnumerator">
4976 <summary>
4977 Gets a collection enumerator on the cookie list.
4978 </summary>
4979 <returns>collection enumerator</returns>
4980 </member>
4981 <member name="M:HttpServer.RequestCookies.Clear">
4982 <summary>
4983 Remove all cookies.
4984 </summary>
4985 </member>
4986 <member name="M:HttpServer.RequestCookies.System#Collections#Generic#IEnumerable{HttpServer#RequestCookie}#GetEnumerator">
4987 <summary>
4988 Returns an enumerator that iterates through the collection.
4989 </summary>
4990
4991 <returns>
4992 A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection.
4993 </returns>
4994 <filterpriority>1</filterpriority>
4995 </member>
4996 <member name="M:HttpServer.RequestCookies.Remove(System.String)">
4997 <summary>
4998 Remove a cookie from the collection.
4999 </summary>
5000 <param name="cookieName">Name of cookie.</param>
5001 </member>
5002 <member name="T:HttpServer.RequestQueue">
5003 <summary>
5004 Used to queue incoming requests.
5005 </summary>
5006 </member>
5007 <member name="M:HttpServer.RequestQueue.#ctor(HttpServer.ProcessRequestHandler)">
5008 <summary>
5009 Initializes a new instance of the <see cref="T:HttpServer.RequestQueue"/> class.
5010 </summary>
5011 <param name="handler">Called when a request should be processed.</param>
5012 </member>
5013 <member name="T:HttpServer.RequestQueue.QueueItem">
5014 <summary>
5015 Used two queue incoming requests to avoid
5016 thread starvation.
5017 </summary>
5018 </member>
5019 <member name="P:HttpServer.RequestQueue.MaxRequestCount">
5020 <summary>
5021 Gets or sets maximum number of allowed simultaneous requests.
5022 </summary>
5023 </member>
5024 <member name="P:HttpServer.RequestQueue.MaxQueueSize">
5025 <summary>
5026 Gets or sets maximum number of requests queuing to be handled.
5027 </summary>
5028 </member>
5029 <member name="P:HttpServer.RequestQueue.CurrentRequestCount">
5030 <summary>
5031 Specifies how many requests the HTTP server is currently processing.
5032 </summary>
5033 </member>
5034 <member name="M:HttpServer.RequestQueue.QueueThread">
5035 <summary>
5036 Used to process queued requests.
5037 </summary>
5038 </member>
5039 <member name="T:HttpServer.ProcessRequestHandler">
5040 <summary>
5041 Method used to process a queued request
5042 </summary>
5043 <param name="context">Context that the request was received from.</param>
5044 <param name="request">Request to process.</param>
5045 </member>
5046 <member name="T:HttpServer.ResponseCookie">
5047 <summary>
5048 cookie being sent back to the browser.
5049 </summary>
5050 <seealso cref="T:HttpServer.ResponseCookie"/>
5051 </member>
5052 <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime)">
5053 <summary>
5054 Constructor.
5055 </summary>
5056 <param name="id">cookie identifier</param>
5057 <param name="content">cookie content</param>
5058 <param name="expiresAt">cookie expiration date. Use DateTime.MinValue for session cookie.</param>
5059 <exception cref="T:System.ArgumentNullException">id or content is null</exception>
5060 <exception cref="T:System.ArgumentException">id is empty</exception>
5061 </member>
5062 <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime,System.String,System.String)">
5063 <summary>
5064 Create a new cookie
5065 </summary>
5066 <param name="name">name identifying the cookie</param>
5067 <param name="value">cookie value</param>
5068 <param name="expires">when the cookie expires. Setting DateTime.MinValue will delete the cookie when the session is closed.</param>
5069 <param name="path">Path to where the cookie is valid</param>
5070 <param name="domain">Domain that the cookie is valid for.</param>
5071 </member>
5072 <member name="M:HttpServer.ResponseCookie.#ctor(HttpServer.RequestCookie,System.DateTime)">
5073 <summary>
5074 Create a new cookie
5075 </summary>
5076 <param name="cookie">Name and value will be used</param>
5077 <param name="expires">when the cookie expires.</param>
5078 </member>
5079 <member name="M:HttpServer.ResponseCookie.ToString">
5080 <summary>
5081 Gets the cookie HTML representation.
5082 </summary>
5083 <returns>cookie string</returns>
5084 </member>
5085 <member name="P:HttpServer.ResponseCookie.Expires">
5086 <summary>
5087 When the cookie expires.
5088 DateTime.MinValue means that the cookie expires when the session do so.
5089 </summary>
5090 </member>
5091 <member name="P:HttpServer.ResponseCookie.Path">
5092 <summary>
5093 Cookie is only valid under this path.
5094 </summary>
5095 </member>
5096 <member name="T:HttpServer.ResponseCookies">
5097 <summary>
5098 Cookies that should be set.
5099 </summary>
5100 </member>
5101 <member name="M:HttpServer.ResponseCookies.Add(HttpServer.ResponseCookie)">
5102 <summary>
5103 Adds a cookie in the collection.
5104 </summary>
5105 <param name="cookie">cookie to add</param>
5106 <exception cref="T:System.ArgumentNullException">cookie is null</exception>
5107 </member>
5108 <member name="M:HttpServer.ResponseCookies.Add(HttpServer.RequestCookie,System.DateTime)">
5109 <summary>
5110 Copy a request cookie
5111 </summary>
5112 <param name="cookie"></param>
5113 <param name="expires">When the cookie should expire</param>
5114 </member>
5115 <member name="P:HttpServer.ResponseCookies.Count">
5116 <summary>
5117 Gets the count of cookies in the collection.
5118 </summary>
5119 </member>
5120 <member name="P:HttpServer.ResponseCookies.Item(System.String)">
5121 <summary>
5122 Gets the cookie of a given identifier (null if not existing).
5123 </summary>
5124 </member>
5125 <member name="M:HttpServer.ResponseCookies.GetEnumerator">
5126 <summary>
5127 Gets a collection enumerator on the cookie list.
5128 </summary>
5129 <returns>collection enumerator</returns>
5130 </member>
5131 <member name="M:HttpServer.ResponseCookies.Clear">
5132 <summary>
5133 Remove all cookies
5134 </summary>
5135 </member>
5136 <member name="M:HttpServer.ResponseCookies.System#Collections#Generic#IEnumerable{HttpServer#ResponseCookie}#GetEnumerator">
5137 <summary>
5138 Returns an enumerator that iterates through the collection.
5139 </summary>
5140
5141 <returns>
5142 A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection.
5143 </returns>
5144 <filterpriority>1</filterpriority>
5145 </member>
5146 <member name="T:HttpServer.Rules.IRule">
5147 <summary>
5148 Rules are used to perform operations before a request is being handled.
5149 Rules can be used to create routing etc.
5150 </summary>
5151 </member>
5152 <member name="M:HttpServer.Rules.IRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)">
5153 <summary>
5154 Process the incoming request.
5155 </summary>
5156 <param name="request">incoming HTTP request</param>
5157 <param name="response">outgoing HTTP response</param>
5158 <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns>
5159 <remarks>
5160 returning true means that no modules will get the request. Returning true is typically being done
5161 for redirects.
5162 </remarks>
5163 <exception cref="T:System.ArgumentNullException">If request or response is null.</exception>
5164 </member>
5165 <member name="T:HttpServer.Rules.RedirectRule">
5166 <summary>
5167 redirects from one URL to another.
5168 </summary>
5169 </member>
5170 <member name="M:HttpServer.Rules.RedirectRule.#ctor(System.String,System.String)">
5171 <summary>
5172 Initializes a new instance of the <see cref="T:HttpServer.Rules.RedirectRule"/> class.
5173 </summary>
5174 <param name="fromUrl">Absolute path (no server name)</param>
5175 <param name="toUrl">Absolute path (no server name)</param>
5176 <example>
5177 server.Add(new RedirectRule("/", "/user/index"));
5178 </example>
5179 </member>
5180 <member name="M:HttpServer.Rules.RedirectRule.#ctor(System.String,System.String,System.Boolean)">
5181 <summary>
5182 Initializes a new instance of the <see cref="T:HttpServer.Rules.RedirectRule"/> class.
5183 </summary>
5184 <param name="fromUrl">Absolute path (no server name)</param>
5185 <param name="toUrl">Absolute path (no server name)</param>
5186 <param name="shouldRedirect">true if request should be redirected, false if the request URI should be replaced.</param>
5187 <example>
5188 server.Add(new RedirectRule("/", "/user/index"));
5189 </example>
5190 </member>
5191 <member name="P:HttpServer.Rules.RedirectRule.FromUrl">
5192 <summary>
5193 Gets string to match request URI with.
5194 </summary>
5195 <remarks>Is compared to request.Uri.AbsolutePath</remarks>
5196 </member>
5197 <member name="P:HttpServer.Rules.RedirectRule.ToUrl">
5198 <summary>
5199 Gets where to redirect.
5200 </summary>
5201 </member>
5202 <member name="P:HttpServer.Rules.RedirectRule.ShouldRedirect">
5203 <summary>
5204 Gets whether server should redirect client.
5205 </summary>
5206 <remarks>
5207 <c>false</c> means that the rule will replace
5208 the current request URI with the new one from this class.
5209 <c>true</c> means that a redirect response is sent to the client.
5210 </remarks>
5211 </member>
5212 <member name="M:HttpServer.Rules.RedirectRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)">
5213 <summary>
5214 Process the incoming request.
5215 </summary>
5216 <param name="request">incoming HTTP request</param>
5217 <param name="response">outgoing HTTP response</param>
5218 <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns>
5219 <remarks>
5220 returning true means that no modules will get the request. Returning true is typically being done
5221 for redirects.
5222 </remarks>
5223 </member>
5224 <member name="T:HttpServer.Rules.RegexRedirectRule">
5225 <summary>
5226 Class to make dynamic binding of redirects. Instead of having to specify a number of similar redirect rules
5227 a regular expression can be used to identify redirect URLs and their targets.
5228 </summary>
5229 <example>
5230 <![CDATA[
5231 new RegexRedirectRule("/(?<target>[a-z0-9]+)", "/users/${target}?find=true", RegexOptions.IgnoreCase)
5232 ]]>
5233 </example>
5234 </member>
5235 <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String)">
5236 <summary>
5237 Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class.
5238 </summary>
5239 <param name="fromUrlExpression">Expression to match URL</param>
5240 <param name="toUrlExpression">Expression to generate URL</param>
5241 <example>
5242 <![CDATA[
5243 server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/${first}"));
5244 Result of ie. /employee1 will then be /user/employee1
5245 ]]>
5246 </example>
5247 </member>
5248 <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String,System.Text.RegularExpressions.RegexOptions)">
5249 <summary>
5250 Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class.
5251 </summary>
5252 <param name="fromUrlExpression">Expression to match URL</param>
5253 <param name="toUrlExpression">Expression to generate URL</param>
5254 <param name="options">Regular expression options to use, can be null</param>
5255 <example>
5256 <![CDATA[
5257 server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/{first}", RegexOptions.IgnoreCase));
5258 Result of ie. /employee1 will then be /user/employee1
5259 ]]>
5260 </example>
5261 </member>
5262 <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String,System.Text.RegularExpressions.RegexOptions,System.Boolean)">
5263 <summary>
5264 Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class.
5265 </summary>
5266 <param name="fromUrlExpression">Expression to match URL</param>
5267 <param name="toUrlExpression">Expression to generate URL</param>
5268 <param name="options">Regular expression options to apply</param>
5269 <param name="shouldRedirect"><c>true</c> if request should be redirected, <c>false</c> if the request URI should be replaced.</param>
5270 <example>
5271 <![CDATA[
5272 server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/${first}", RegexOptions.None));
5273 Result of ie. /employee1 will then be /user/employee1
5274 ]]>
5275 </example>
5276 <exception cref="T:System.ArgumentNullException">Argument is null.</exception>
5277 <seealso cref="P:HttpServer.Rules.RedirectRule.ShouldRedirect"/>
5278 </member>
5279 <member name="M:HttpServer.Rules.RegexRedirectRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)">
5280 <summary>
5281 Process the incoming request.
5282 </summary>
5283 <param name="request">incoming HTTP request</param>
5284 <param name="response">outgoing HTTP response</param>
5285 <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns>
5286 <remarks>
5287 returning true means that no modules will get the request. Returning true is typically being done
5288 for redirects.
5289 </remarks>
5290 <exception cref="T:System.ArgumentNullException">If request or response is null</exception>
5291 </member>
5292 <member name="T:HttpServer.Sessions.IHttpSession">
5293 <summary>
5294 Interface for sessions
5295 </summary>
5296 </member>
5297 <member name="P:HttpServer.Sessions.IHttpSession.Id">
5298 <summary>
5299 Session id
5300 </summary>
5301 </member>
5302 <member name="P:HttpServer.Sessions.IHttpSession.Item(System.String)">
5303 <summary>
5304 Should
5305 </summary>
5306 <param name="name">Name of the session variable</param>
5307 <returns>null if it's not set</returns>
5308 <exception cref="T:System.Runtime.Serialization.SerializationException">If the object cant be serialized.</exception>
5309 </member>
5310 <member name="P:HttpServer.Sessions.IHttpSession.Accessed">
5311 <summary>
5312 When the session was last accessed.
5313 This property is touched by the http server each time the
5314 session is requested.
5315 </summary>
5316 </member>
5317 <member name="P:HttpServer.Sessions.IHttpSession.Count">
5318 <summary>
5319 Number of session variables.
5320 </summary>
5321 </member>
5322 <member name="M:HttpServer.Sessions.IHttpSession.Clear">
5323 <summary>
5324 Remove everything from the session
5325 </summary>
5326 </member>
5327 <member name="M:HttpServer.Sessions.IHttpSession.Clear(System.Boolean)">
5328 <summary>
5329 Remove everything from the session
5330 </summary>
5331 <param name="expires">True if the session is cleared due to expiration</param>
5332 </member>
5333 <member name="E:HttpServer.Sessions.IHttpSession.BeforeClear">
5334 <summary>
5335 Event triggered upon clearing the session
5336 </summary>
5337 </member>
5338 <member name="T:HttpServer.Sessions.HttpSessionClearedArgs">
5339 <summary>
5340 Arguments sent when a <see cref="T:HttpServer.Sessions.IHttpSession" /> is cleared
5341 </summary>
5342 </member>
5343 <member name="M:HttpServer.Sessions.HttpSessionClearedArgs.#ctor(System.Boolean)">
5344 <summary>
5345 Instantiates the arguments for the event
5346 </summary>
5347 <param name="expired">True if the session is cleared due to expiration</param>
5348 </member>
5349 <member name="P:HttpServer.Sessions.HttpSessionClearedArgs.Expired">
5350 <summary>
5351 Returns true if the session is cleared due to expiration
5352 </summary>
5353 </member>
5354 <member name="T:HttpServer.Sessions.HttpSessionClearedHandler">
5355 <summary>
5356 Delegate for when a IHttpSession is cleared
5357 </summary>
5358 <param name="session"><see cref="T:HttpServer.Sessions.IHttpSession"/> this is being cleared.</param>
5359 <param name="args">Arguments for the clearing</param>
5360 </member>
5361 <member name="T:HttpServer.Sessions.IHttpSessionStore">
5362 <summary>
5363 A session store is used to store and load sessions on a media.
5364 The default implementation (<see cref="T:HttpServer.Sessions.MemorySessionStore"/>) saves/retrieves sessions from memory.
5365 </summary>
5366 </member>
5367 <member name="P:HttpServer.Sessions.IHttpSessionStore.Item(System.String)">
5368 <summary>
5369 Load a session from the store
5370 </summary>
5371 <param name="sessionId"></param>
5372 <returns>null if session is not found.</returns>
5373 </member>
5374 <member name="P:HttpServer.Sessions.IHttpSessionStore.ExpireTime">
5375 <summary>
5376 Number of minutes before a session expires.
5377 </summary>
5378 <value>Default time is 20 minutes.</value>
5379 </member>
5380 <member name="M:HttpServer.Sessions.IHttpSessionStore.Create">
5381 <summary>
5382 Creates a new http session with a generated id.
5383 </summary>
5384 <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object</returns>
5385 </member>
5386 <member name="M:HttpServer.Sessions.IHttpSessionStore.Create(System.String)">
5387 <summary>
5388 Creates a new http session with a specific id
5389 </summary>
5390 <param name="id">Id used to identify the new cookie..</param>
5391 <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns>
5392 <remarks>
5393 Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>.
5394 </remarks>
5395 </member>
5396 <member name="M:HttpServer.Sessions.IHttpSessionStore.Load(System.String)">
5397 <summary>
5398 Load an existing session.
5399 </summary>
5400 <param name="sessionId">Session id (usually retrieved from a client side cookie).</param>
5401 <returns>A session if found; otherwise null.</returns>
5402 </member>
5403 <member name="M:HttpServer.Sessions.IHttpSessionStore.Save(HttpServer.Sessions.IHttpSession)">
5404 <summary>
5405 Save an updated session to the store.
5406 </summary>
5407 <param name="session">Session id (usually retrieved from a client side cookie).</param>
5408 <exception cref="T:System.ArgumentException">If Id property have not been specified.</exception>
5409 </member>
5410 <member name="M:HttpServer.Sessions.IHttpSessionStore.AddUnused(HttpServer.Sessions.IHttpSession)">
5411 <summary>
5412 We use the flyweight pattern which reuses small objects
5413 instead of creating new each time.
5414 </summary>
5415 <param name="session">Unused session that should be reused next time Create is called.</param>
5416 </member>
5417 <member name="M:HttpServer.Sessions.IHttpSessionStore.Cleanup">
5418 <summary>
5419 Remove expired sessions
5420 </summary>
5421 </member>
5422 <member name="M:HttpServer.Sessions.IHttpSessionStore.Remove(System.String)">
5423 <summary>
5424 Remove a session
5425 </summary>
5426 <param name="sessionId">id of the session.</param>
5427 </member>
5428 <member name="T:HttpServer.Sessions.MemorySession">
5429 <summary>
5430 A session stored in memory.
5431 </summary>
5432 </member>
5433 <member name="M:HttpServer.Sessions.MemorySession.#ctor(System.String)">
5434 <summary>
5435
5436 </summary>
5437 <param name="id">A unique id used by the sessions store to identify the session</param>
5438 </member>
5439 <member name="M:HttpServer.Sessions.MemorySession.SetId(System.String)">
5440 <summary>
5441 Id
5442 </summary>
5443 <param name="id"></param>
5444 </member>
5445 <member name="P:HttpServer.Sessions.MemorySession.Id">
5446 <summary>
5447 Session id
5448 </summary>
5449 </member>
5450 <member name="P:HttpServer.Sessions.MemorySession.Item(System.String)">
5451 <summary>
5452 Should
5453 </summary>
5454 <param name="name">Name of the session variable</param>
5455 <returns>null if it's not set</returns>
5456 </member>
5457 <member name="P:HttpServer.Sessions.MemorySession.Accessed">
5458 <summary>
5459 when the session was last accessed.
5460 </summary>
5461 <remarks>
5462 Used to determine when the session should be removed.
5463 </remarks>
5464 </member>
5465 <member name="P:HttpServer.Sessions.MemorySession.Count">
5466 <summary>
5467 Number of values in the session
5468 </summary>
5469 </member>
5470 <member name="P:HttpServer.Sessions.MemorySession.Changed">
5471 <summary>
5472 Flag to indicate that the session have been changed
5473 and should be saved into the session store.
5474 </summary>
5475 </member>
5476 <member name="M:HttpServer.Sessions.MemorySession.Clear">
5477 <summary>
5478 Remove everything from the session
5479 </summary>
5480 </member>
5481 <member name="M:HttpServer.Sessions.MemorySession.Clear(System.Boolean)">
5482 <summary>
5483 Clears the specified expire.
5484 </summary>
5485 <param name="expires">True if the session is cleared due to expiration</param>
5486 </member>
5487 <member name="M:HttpServer.Sessions.MemorySession.Dispose">
5488 <summary>
5489 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
5490 </summary>
5491 <filterpriority>2</filterpriority>
5492 </member>
5493 <member name="E:HttpServer.Sessions.MemorySession.BeforeClear">
5494 <summary>
5495 Event triggered upon clearing the session
5496 </summary>
5497 </member>
5498 <member name="T:HttpServer.Sessions.MemorySessionStore">
5499 <summary>
5500 Session store using memory for each session.
5501 </summary>
5502 </member>
5503 <member name="M:HttpServer.Sessions.MemorySessionStore.#ctor">
5504 <summary>
5505 Initializes the class setting the expirationtimer to clean the session every minute
5506 </summary>
5507 </member>
5508 <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup(System.Object)">
5509 <summary>
5510 Delegate for the cleanup timer
5511 </summary>
5512 </member>
5513 <member name="P:HttpServer.Sessions.MemorySessionStore.Item(System.String)">
5514 <summary>
5515 Load a session from the store
5516 </summary>
5517 <param name="sessionId"></param>
5518 <returns>null if session is not found.</returns>
5519 </member>
5520 <member name="M:HttpServer.Sessions.MemorySessionStore.Create">
5521 <summary>
5522 Creates a new http session
5523 </summary>
5524 <returns></returns>
5525 </member>
5526 <member name="M:HttpServer.Sessions.MemorySessionStore.Create(System.String)">
5527 <summary>
5528 Creates a new http session with a specific id
5529 </summary>
5530 <param name="id">Id used to identify the new cookie..</param>
5531 <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns>
5532 <remarks>
5533 Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>.
5534 </remarks>
5535 </member>
5536 <member name="M:HttpServer.Sessions.MemorySessionStore.Load(System.String)">
5537 <summary>
5538 Load an existing session.
5539 </summary>
5540 <param name="sessionId"></param>
5541 <returns></returns>
5542 </member>
5543 <member name="M:HttpServer.Sessions.MemorySessionStore.Save(HttpServer.Sessions.IHttpSession)">
5544 <summary>
5545 Save an updated session to the store.
5546 </summary>
5547 <param name="session"></param>
5548 </member>
5549 <member name="M:HttpServer.Sessions.MemorySessionStore.AddUnused(HttpServer.Sessions.IHttpSession)">
5550 <summary>
5551 We use the flyweight pattern which reuses small objects
5552 instead of creating new each time.
5553 </summary>
5554 <param name="session">EmptyLanguageNode (unused) session that should be reused next time Create is called.</param>
5555 </member>
5556 <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup">
5557 <summary>
5558 Remove expired sessions
5559 </summary>
5560 </member>
5561 <member name="M:HttpServer.Sessions.MemorySessionStore.Remove(System.String)">
5562 <summary>
5563 Remove a session
5564 </summary>
5565 <param name="sessionId">id of the session.</param>
5566 </member>
5567 <member name="P:HttpServer.Sessions.MemorySessionStore.ExpireTime">
5568 <summary>
5569 Number of minutes before a session expires.
5570 Default is 20 minutes.
5571 </summary>
5572 </member>
5573 </members>
5574</doc>
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 5f1e779..0544f36 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -46,22 +46,28 @@
46 46
47 47
48[Const] 48[Const]
49 ; For a grid these will usually be the externally accessible IP/DNS 49 ; this section defines constants for grid services
50 ; name and use default public port 8002 and default private port 8003 50 ; to simplify other configuration files default settings
51 ; For a standalone this will usually be the externally accessible IP/DNS 51
52 ; name and use default public port 9000. The private port is not used 52 ; BaseURL
53 ; in the configuration for a standalone. 53 ; should be the externally accessible IP/DNS name of grid or standalone
54 54 ; http://externalHostName or https://externalHostName if using ssl
55 ;# {BaseURL} {} {BaseURL} {"http://example.com" "http://127.0.0.1"} "http://127.0.0.1" 55 ; examples: http://mymachine.example.com, https://mymachine.example.com, https://127.0.0.1
56 ; default: http://127.0.0.1
57 ;# {BaseURL} {} {BaseURL} {"http://example.com" "http://127.0.0.1"} ""
56 BaseURL = http://127.0.0.1 58 BaseURL = http://127.0.0.1
57 59
58 ;# {PublicPort} {} {PublicPort} {8002 9000} "8002" 60 ; default public port
61 ; usually 8002 for grids.
62 ; on standalones it needs to match http_listener_port or http_listener_sslport if using ssl
63 ; in [Network] section below (defaults 9000 or 9001 if using ssl)
64 ;# {PublicPort} {} {PublicPort} {8002 9000 9001} "8002"
59 PublicPort = "8002" 65 PublicPort = "8002"
60 66
67 ;grid default private port 8003, not used in standalone
61 ;# {PrivatePort} {} {PrivatePort} {8003} "8003" 68 ;# {PrivatePort} {} {PrivatePort} {8003} "8003"
62 PrivatePort = "8003" 69 PrivatePort = "8003"
63 70
64
65[Startup] 71[Startup]
66 ;# {ConsolePrompt} {} {ConsolePrompt} {} "Region (\R) " 72 ;# {ConsolePrompt} {} {ConsolePrompt} {} "Region (\R) "
67 ;; Console prompt 73 ;; Console prompt
@@ -289,7 +295,18 @@
289 ;; default is false 295 ;; default is false
290 ; TelehubAllowLandmark = false 296 ; TelehubAllowLandmark = false
291 297
292 298
299 ;; SSL certificate validation options
300 ;; you can allow selfsigned certificates or no official CA with next option set to true
301 ;# {NoVerifyCertChain} {} {do not verify SSL Cert Chain} {true false} true
302 ; NoVerifyCertChain = true
303
304 ;; you can also bypass the hostname or domain verification
305 ;# {NoVerifyCertHostname} {} {do not verify SSL Cert name versus peer name} {true false} true
306 ; NoVerifyCertHostname = true
307 ;; having both options true does provide encryption but with low security
308 ;; set both true if you don't care to use SSL, they are needed to contact regions or grids that do use it.
309
293[AccessControl] 310[AccessControl]
294 ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} 311 ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
295 ;; Bar (|) separated list of viewers which may gain access to the regions. 312 ;; Bar (|) separated list of viewers which may gain access to the regions.
@@ -433,7 +450,6 @@
433 ;; Password for the default estate owner 450 ;; Password for the default estate owner
434 ; DefaultEstateOwnerPassword = password 451 ; DefaultEstateOwnerPassword = password
435 452
436
437[SMTP] 453[SMTP]
438 ;; The SMTP server enabled the email module to send email to external 454 ;; The SMTP server enabled the email module to send email to external
439 ;; destinations. 455 ;; destinations.
@@ -466,7 +482,6 @@
466 ;# {SMTP_SERVER_PASSWORD} {[Startup]emailmodule:DefaultEmailModule enabled:true} {SMTP server password} {} 482 ;# {SMTP_SERVER_PASSWORD} {[Startup]emailmodule:DefaultEmailModule enabled:true} {SMTP server password} {}
467 ; SMTP_SERVER_PASSWORD = "" 483 ; SMTP_SERVER_PASSWORD = ""
468 484
469
470[Network] 485[Network]
471 ;# {ConsoleUser} {} {User name for console account} {} 486 ;# {ConsoleUser} {} {User name for console account} {}
472 ;; Configure the remote console user here. This will not actually be used 487 ;; Configure the remote console user here. This will not actually be used
@@ -483,10 +498,39 @@
483 ;; the region ports use UDP. 498 ;; the region ports use UDP.
484 ; http_listener_port = 9000 499 ; http_listener_port = 9000
485 500
501 ; optional main server secure http (ssl)
502 ; to use ssl you need a ssl certificate in PKCS12 format that validates the ExternalHostnames
503 ; or their domains
504 ; some viewers by default only accept certificates signed by a oficial CA
505 ; to use others like self signed certificates with those viewers,
506 ; their debug option NoVerifySSLCert needs to be set true, You need to inform users about this
507 ; the main unsecure port will still open for some services. this may change in future.
508
509 ; set http_listener_ssl to enable main server ssl. it will replace unsecure port on most functions
510 ;# {http_listener_ssl}{} {enable main server ssl port)} {} false
511 ;http_listener_ssl = false
512
513 ; Set port for main SSL connections
514 ;# {http_listener_sslport}{} {main server ssl port)} {} 9001
515 ;http_listener_sslport = 9001 ;
516
517 ; currently if using ssl, regions ExternalHostName must the the same and equal to http_listener_cn
518 ; this may be removed in future
519 ;# {http_listener_cn}{} {main server ssl externalHostName)} {} ""
520 ;http_listener_cn = "myRegionsExternalHostName"
521
522 ; the path for the certificate path
523 ;# {http_listener_cert_path}{} {main server ssl certificate file path)} {} ""
524 ;http_listener_cert_path = "mycert.p12"
525
526 ;# {http_listener_cert_pass}{} {main server ssl certificate password)} {} ""
527 ;http_listener_cert_pass = "mycertpass" ; the cert passwork
528
486 ; By default, OpenSimulator does not allow scripts to make HTTP calls to addresses on the simulator's LAN. 529 ; By default, OpenSimulator does not allow scripts to make HTTP calls to addresses on the simulator's LAN.
487 ; See the OutboundDisallowForUserScripts parameter in OpenSimDefaults.ini for more information on this filter. 530 ; See the OutboundDisallowForUserScripts parameter in OpenSimDefaults.ini for more information on this filter.
488 ; If you need to allow scripts to make some LAN calls use the OutboundDisallowForUserScriptsExcept parameter below. 531 ; If you need to allow scripts to make some LAN calls use the OutboundDisallowForUserScriptsExcept parameter below.
489 ; We recommend that you do not override OutboundDisallowForUserScripts directly unless you are very sure about what you're doing. 532 ; We recommend that you do not override OutboundDisallowForUserScripts directly unless you are very sure about what you're doing.
533 ; this HTTP calls can also use ssl see opensimDefaults.ini
490 ; 534 ;
491 ; You can whitelist individual endpoints by IP or FQDN, e.g. 535 ; You can whitelist individual endpoints by IP or FQDN, e.g.
492 ; 536 ;
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 51b0d3b..616061d 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -401,7 +401,18 @@
401 ; routing and land at the landmark coordinates when set to true 401 ; routing and land at the landmark coordinates when set to true
402 ; default is false 402 ; default is false
403 ; TelehubAllowLandmark = false 403 ; TelehubAllowLandmark = false
404 404
405 ; #
406 ; # SSL certificates validation options
407 ; #
408
409 ; SSL certificate validation options
410 ; you can allow selfsigned certificates or no official CA with next option set to true
411 ; NoVerifyCertChain = true
412 ; you can also bypass the hostname or domain verification
413 ; NoVerifyCertHostname = true
414 ; having both options true does provide encryption but with low security
415 ; set both true if you don't care to use SSL, they are needed to contact regions or grids that do use it.
405 416
406[Map] 417[Map]
407 ; Map tile options. 418 ; Map tile options.
@@ -575,16 +586,18 @@
575 http_listener_port = 9000 586 http_listener_port = 9000
576 console_port = 0 587 console_port = 0
577 588
578 ; ssl config: Experimental! The auto https config only really works definately on windows XP now 589 ; ssl config: Experimental!
579 ; you need a Cert Request/Signed pair installed in the MY store with the CN specified below 590 http_listener_ssl = false ; if set to true main server is replaced by a ssl one
580 ; you can use https on other platforms, but you'll need to configure the httpapi yourself for now
581 http_listener_ssl = false ; Also create a SSL server
582 http_listener_cn = "localhost" ; Use the cert with the common name
583 http_listener_sslport = 9001 ; Use this port for SSL connections 591 http_listener_sslport = 9001 ; Use this port for SSL connections
584 http_listener_ssl_cert = "" ; Currently unused, but will be used for OSHttpServer 592 ; currently if using ssl, regions ExternalHostName must the the same and equal to http_listener_cn
585 593 ; this will change is future
586 ; HTTPS for "Out of band" management applications such as the remote 594 http_listener_cn = "myRegionsExternalHostName"
587 ; admin module 595 ; if the cert doesnt have a oficial CA or is selfsigned viewers option NoVerifySSLCert need to be set true
596 http_listener_cert_path = "mycert.p12" ; path for the cert file that is valid for the ExternalHostName
597 http_listener_cert_pass = "mycertpass" ; the cert passwork
598
599 ; addicional HTTPS for "Out of band" management applications such as the remote
600 ; admin module or scripts
588 ; 601 ;
589 ; Create https_listener = "True" will create a listener on the port 602 ; Create https_listener = "True" will create a listener on the port
590 ; specified. Provide the path to your server certificate along with it's 603 ; specified. Provide the path to your server certificate along with it's
@@ -592,7 +605,7 @@
592 ; https_listener = False 605 ; https_listener = False
593 ; Set our listener to this port 606 ; Set our listener to this port
594 ; https_port = 0 607 ; https_port = 0
595 ; Path to X509 certificate 608 ; Path to X509 certificate, can be the same as main or another
596 ; cert_path = "path/to/cert.p12" 609 ; cert_path = "path/to/cert.p12"
597 ; Password for cert 610 ; Password for cert
598 ; cert_pass = "password" 611 ; cert_pass = "password"
@@ -604,6 +617,7 @@
604 ; HttpBodyMaxLenMAX=16384 617 ; HttpBodyMaxLenMAX=16384
605 618
606 ; Hostname to use in llRequestURL/llRequestSecureURL 619 ; Hostname to use in llRequestURL/llRequestSecureURL
620 ; must be a valid hostname for the ssl cert.
607 ; if not defined - default machine name is being used 621 ; if not defined - default machine name is being used
608 ; (on Windows this mean NETBIOS name - useably only inside local network) 622 ; (on Windows this mean NETBIOS name - useably only inside local network)
609 ; ExternalHostNameForLSL=127.0.0.1 623 ; ExternalHostNameForLSL=127.0.0.1
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 7d13d43..92904a8 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -70,6 +70,14 @@
70 ; How many lines of command history should we keep? (default is 100) 70 ; How many lines of command history should we keep? (default is 100)
71 ConsoleHistoryFileLines = 100 71 ConsoleHistoryFileLines = 100
72 72
73 ; peers SSL certificate validation options
74 ; you can allow selfsigned certificates or no official CA with next option set to true
75 NoVerifyCertChain = true
76 ; you can also bypass the hostname or domain verification
77 NoVerifyCertHostname = true
78 ; having both options true does provide encryption but with low security
79 ; set both true if you don't care to use SSL, they are needed to contact regions or grids that do use it.
80
73 81
74[ServiceList] 82[ServiceList]
75 AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" 83 AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector"
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index d33178c..2263780 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -61,6 +61,14 @@
61 61
62 ; How many lines of command history should we keep? (default is 100) 62 ; How many lines of command history should we keep? (default is 100)
63 ConsoleHistoryFileLines = 100 63 ConsoleHistoryFileLines = 100
64
65 ; peers SSL certificate validation options
66 ; you can allow selfsigned certificates or no official CA with next option set to true
67 NoVerifyCertChain = true
68 ; you can also bypass the hostname or domain verification
69 NoVerifyCertHostname = true
70 ; having both options true does provide encryption but with low security
71 ; set both true if you don't care to use SSL, they are needed to contact regions or grids that do use it.
64 72
65[ServiceList] 73[ServiceList]
66 AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" 74 AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector"