Fix due to the modified HttpServer.cs

This commit is contained in:
sta
2012-09-11 13:21:47 +09:00
parent d0e5ae3979
commit 8e2a1ee1b3
62 changed files with 92 additions and 30 deletions

Binary file not shown.

View File

@@ -16,9 +16,9 @@ namespace Example3
{
_httpsv = new HttpServer<Echo>(4649);
_httpsv.OnResponse += (sender, e) =>
_httpsv.OnGet += (sender, e) =>
{
onResponse(e.Context);
onGet(e.Request, e.Response);
};
_httpsv.OnError += (sender, e) =>
@@ -54,19 +54,5 @@ namespace Example3
response.StatusCode = (int)HttpStatusCode.NotFound;
}
private static void onResponse(HttpListenerContext context)
{
var req = context.Request;
var res = context.Response;
if (req.HttpMethod == "GET")
{
onGet(req, res);
return;
}
res.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.