1 //------------------------------------------------------------------------------
2 // <copyright file="HttpPostServerProtocol.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6 
7 namespace System.Web.Services.Protocols {
8 
9     internal class HttpPostServerProtocolFactory : ServerProtocolFactory {
CreateIfRequestCompatible(HttpRequest request)10         protected override ServerProtocol CreateIfRequestCompatible(HttpRequest request) {
11             if (request.PathInfo.Length < 2)
12                 return null;
13             if (request.HttpMethod != "POST")
14                 // MethodNotAllowed = 405,
15                 return new UnsupportedRequestProtocol(405);
16 
17             return new HttpPostServerProtocol();
18         }
19     }
20 
21     internal class HttpPostServerProtocol : HttpServerProtocol {
HttpPostServerProtocol()22         internal HttpPostServerProtocol() : base(true) { }
23     }
24 }
25