开发者

Configure Apache HTTP 2.2 for PUT method

I've written code for file upload and download using the HttpWebRequest and HttpWebResponse classes in C# with the Apache HTTP server v2.2. In code, I am using 'request.method = "PUT"', so I want to configure my httpconfig file to support the PUT method. I write 开发者_Go百科the PUT method script as

<Location "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/output">
    <Dav On
    <LimitExcept GET HEAD OPTIONS PUT>
    <Allow from all
    </LimitExcept>
</Location>

That's not working. How do make it work?


Try configuring it like below. You will need a proper path to the program/handler that will process PUT requests.

<Location "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/output">
Dav On
<LimitExcept GET HEAD OPTIONS PUT>
<Allow from all>
</LimitExcept>
Script PUT {path to PUT handler}
</Location>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜