我正在实现 WebDAV 服务器,但在使用建议的客户端(Windows 7 资源管理器)时遇到了问题。在 Windows 中,我浏览到\server\public\container,我的服务器希望将其显示为包含两个文件的文件夹,因此我收到以下请求:
PROPFIND /public/container HTTP/1.1
Connection: Keep-Alive
User-Agent: Microsoft-WebDAV-MiniRedir/6.1.7601
Depth: 1
translate: f
Content-Length: 0
Host: devsys:4511
我的回复是:
HTTP/1.1 207 Multi-Status
Server: MyServer 2.12
Date: Mon, 08 Sep 14 17:57:50 -0000
Host: server.somewhere.com
Content-Type: text/xml; charset="utf-8"
Content-Length: 2901
<d:multistatus xmlns:d="DAV:">
<d:response>
<d:href>/public/container</d:href>
<d:propstat>
<d:prop>
<d:creationdate>2014-09-05T19:00:00Z</d:creationdate>
<d:displayname>container</d:displayname>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:supportedlock>
<d:lockentry>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:locktype>
<d:write/>
</d:locktype>
</d:lockentry>
<d:lockentry>
<d:lockscope>
<d:shared/>
</d:lockscope>
<d:locktype>
<d:write/>
</d:locktype>
</d:lockentry>
</d:supportedlock>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/public/container/myFile1</d:href>
<d:propstat>
<d:prop>
<d:getcontenttype>text/plain</d:getcontenttype>
<d:getcontentlength>375</d:getcontentlength>
<d:getetag>"1410198520"</d:getetag>
<d:creationdate>2014-09-05T19:00:00Z</d:creationdate>
<d:displayname>myFile1</d:displayname>
<d:getlastmodified>05 Sep 2014 19:00:00 GMT</d:getlastmodified>
<d:resourcetype/>
<d:supportedlock>
<d:lockentry>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:locktype>
<d:write/>
</d:locktype>
</d:lockentry>
<d:lockentry>
<d:lockscope>
<d:shared/>
</d:lockscope>
<d:locktype>
<d:write/>
</d:locktype>
</d:lockentry>
</d:supportedlock>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/public/container/myFile2</d:href>
<d:propstat>
<d:prop>
<d:getcontenttype>text/plain</d:getcontenttype>
<d:getcontentlength>375</d:getcontentlength>
<d:getetag>"1410198523"</d:getetag>
<d:creationdate>2014-09-05T19:00:00Z</d:creationdate>
<d:displayname>myFile2</d:displayname>
<d:getlastmodified>05 Sep 2014 19:00:00 GMT</d:getlastmodified>
<d:resourcetype/>
<d:supportedlock>
<d:lockentry>
<d:lockscope>
<d:exclusive/>
</d:lockscope>
<d:locktype>
<d:write/>
</d:locktype>
</d:lockentry>
<d:lockentry>
<d:lockscope>
<d:shared/>
</d:lockscope>
<d:locktype>
<d:write/>
</d:locktype>
</d:lockentry>
</d:supportedlock>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
Windows kindly gives the error \myserver\public\container is not accessible. You might not have permission to use this network resource. Contact the administrator of the server to find out if you have access permissions. The parameter is incorrect.
它似乎没有给出它可能是什么参数以及为什么它不正确的线索。任何人都可以发现明显的错误吗?我是否错过了 Windows 需要的属性,或者我只是做错了什么?
服务器是用 C 语言编写的,所以我可以对响应进行字节级控制。
谢谢 - 罗格
最佳答案
建议:多客户端测试(比如Cyberduck)。
上面的 PROPFIND 响应不正确;它没有 namespace 中的“multistatus”,但它应该在“DAV:” namespace 中。
关于windows - Windows 资源管理器不接受我的 WEBDAV PROPFIND 响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25730734/
我正在使用i18n从头开始构建一个多语言网络应用程序,虽然我自己可以处理一大堆yml文件,但我说的语言(非常)有限,最终我想寻求外部帮助帮助。我想知道这里是否有人在使用UI插件/gem(与django上的django-rosetta不同)来处理多个翻译器,其中一些翻译器不愿意或无法处理存储库中的100多个文件,处理语言数据。谢谢&问候,安德拉斯(如果您已经在rubyonrails-talk上遇到了这个问题,我们深表歉意) 最佳答案 有一个rails3branchofthetolkgem在github上。您可以通过在Gemfi
我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0
我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub
我安装了ruby版本管理器,并将RVM安装的ruby实现设置为默认值,这样'哪个ruby'显示'~/.rvm/ruby-1.8.6-p383/bin/ruby'但是当我在emacs中打开inf-ruby缓冲区时,它使用安装在/usr/bin中的ruby。有没有办法让emacs像shell一样尊重ruby的路径?谢谢! 最佳答案 我创建了一个emacs扩展来将rvm集成到emacs中。如果您有兴趣,可以在这里获取:http://github.com/senny/rvm.el
这似乎非常适得其反,因为太多的gem会在window上破裂。我一直在处理很多mysql和ruby-mysqlgem问题(gem本身发生段错误,一个名为UnixSocket的类显然在Windows机器上不能正常工作,等等)。我只是在浪费时间吗?我应该转向不同的脚本语言吗? 最佳答案 我在Windows上使用Ruby的经验很少,但是当我开始使用Ruby时,我是在Windows上,我的总体印象是它不是Windows原生系统。因此,在主要使用Windows多年之后,开始使用Ruby促使我切换回原来的系统Unix,这次是Linux。Rub
我真的为这个而疯狂。我一直在搜索答案并尝试我找到的所有内容,包括相关问题和stackoverflow上的答案,但仍然无法正常工作。我正在使用嵌套资源,但无法使表单正常工作。我总是遇到错误,例如没有路线匹配[PUT]"/galleries/1/photos"表格在这里:/galleries/1/photos/1/edit路线.rbresources:galleriesdoresources:photosendresources:galleriesresources:photos照片Controller.rbdefnew@gallery=Gallery.find(params[:galle
是否有简单的方法来更改默认ISO格式(yyyy-mm-dd)的ActiveAdmin日期过滤器显示格式? 最佳答案 您可以像这样为日期选择器提供额外的选项,而不是覆盖js:=f.input:my_date,as::datepicker,datepicker_options:{dateFormat:"mm/dd/yy"} 关于ruby-on-rails-事件管理员日期过滤器日期格式自定义,我们在StackOverflow上找到一个类似的问题: https://s
之前在培训新生的时候,windows环境下配置opencv环境一直教的都是网上主流的vsstudio配置属性表,但是这个似乎对新生来说难度略高(虽然个人觉得完全是他们自己的问题),加之暑假之后对cmake实在是爱不释手,且这样配置确实十分简单(其实都不需要配置),故斗胆妄言vscode下配置CV之法。其实极为简单,图比较多所以很长。如果你看此文还配不好,你应该思考一下是不是自己的问题。闲话少说,直接开始。0.CMkae简介有的人到大二了都不知道cmake是什么,我不说是谁。CMake是一个开源免费并且跨平台的构建工具,可以用简单的语句来描述所有平台的编译过程。它能够根据当前所在平台输出对应的m
深度学习部署:Windows安装pycocotools报错解决方法1.pycocotools库的简介2.pycocotools安装的坑3.解决办法更多Ai资讯:公主号AiCharm本系列是作者在跑一些深度学习实例时,遇到的各种各样的问题及解决办法,希望能够帮助到大家。ERROR:Commanderroredoutwithexitstatus1:'D:\Anaconda3\python.exe'-u-c'importsys,setuptools,tokenize;sys.argv[0]='"'"'C:\\Users\\46653\\AppData\\Local\\Temp\\pip-instal