2013-02-20 68 views
0

请求(谷歌Chrome浏览器控制台):ithit ajaxbrowser没有打开WebDAV文件夹,但响应的数据是正确的

Request URL:https://<name>:5553/myproxy.cgi?5443/ 

Request Method:PROPFIND 
Status Code:207 Multi-Status 
Request Headersview source 
Accept:*/* 
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 
Accept-Encoding:gzip,deflate,sdch 
Accept-Language:en-US,en;q=0.8 
Authorization:Basic dmJveDp2Ym94 
Connection:keep-alive 
Content-Length:241 
Content-Type:text/xml; charset="UTF-8" 
Cookie:settingsCookie=5-9-5-0; Auth=Basic%20dmJveDp2Ym94; testCookie=test 
Depth:0 
Host:<name>:5553 
Origin:https://<name>:5553 
Referer:https://<name>:5553/Browser/index.html 
User-Agent:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17 
Query String Parametersview sourceview URL encoded 
5443/: 
Request Payload 
<?xml version="1.0"?><propfind xmlns="DAV:"><prop><resourcetype/><displayname/><creationdate/><getlastmodified/><getcontentlength/><getcontenttype/><supportedlock/><lockdiscovery/><quota-available-bytes/><quota-used-bytes/></prop></propfind> 
Response Headersview source 
Cache-Control:max-age=0 
Connection:Keep-Alive, Keep-Alive 
Content-disposition:attachment; filename= 
Content-Encoding:gzip 
Content-Length:449 
Content-Type:text/xml; charset="utf-8" 
Date:Wed, 20 Feb 2013 05:37:37 GMT 
Expires:Wed, 20 Feb 2013 05:37:37 GMT 
Keep-Alive:timeout=15, max=59 
Server:Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.1c DAV/2 
Vary:Accept-Encoding 

性反应的数据:

<?xml version="1.0" encoding="utf-8"?> 
<D:multistatus xmlns:D="DAV:" xmlns:ns0="DAV:"> 
<D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/" xmlns:g0="DAV:"> 
<D:href>/</D:href> 
<D:propstat> 
<D:prop> 
<lp1:resourcetype><D:collection/></lp1:resourcetype> 
<lp1:creationdate>2013-02-18T12:59:45Z</lp1:creationdate> 
<lp1:getlastmodified>Mon, 18 Feb 2013 12:59:45 GMT</lp1:getlastmodified> 
<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:lockdiscovery/> 
</D:prop> 
<D:status>HTTP/1.1 200 OK</D:status> 
</D:propstat> 
<D:propstat> 
<D:prop> 
<g0:displayname/> 
<g0:quota-available-bytes/> 
<g0:quota-used-bytes/> 
</D:prop> 
<D:status>HTTP/1.1 404 Not Found</D:status> 
</D:propstat> 
</D:response> 
</D:multistatus> 

状态和数据是正确的,但它抛出错误NotFoundLocation 。 我想这个问题可能比较发送/接收“文件夹”不相同。 请发表您的意见。

回答

0

也许问题在于href元素。你是

<D:href>/</D:href> 

这里是我得到与其他服务器:

PROPFIND http://ajaxbrowser.com/User3b0f54c/ HTTP/1.1 
Host: ajaxbrowser.com 
Depth: 0 

响应:

HTTP/1.1 207 Multi-Status 
Content-Length: 957 
Content-Type: application/xml; charset=utf-8 
Server: Microsoft-HTTPAPI/1.0 

<d:multistatus xmlns:d="DAV:"> 
    <d:response> 
    <d:href>http://ajaxbrowser.com/User3b0f54c/</d:href> 
    <d:propstat><d:status>HTTP/1.1 200 OK</d:status><d:prop><d:resourcetype><d:collection /></d:resourcetype><d:displayname>User3b0f54c</d:displayname><d:creationdate>2013-03-12T23:16:11Z</d:creationdate><d:getlastmodified>Tue, 12 Mar 2013 23:17:59 GMT</d:getlastmodified><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:lockdiscovery /></d:prop></d:propstat><d:propstat><d:status>HTTP/1.1 404 Not Found</d:status><d:prop><d:getcontentlength /><d:getcontenttype /><d:quota-available-bytes /><d:quota-used-bytes /></d:prop><d:responsedescription>Property was not found</d:responsedescription></d:propstat> 
    </d:response> 
</d:multistatus> 

你使用的mod_dav? 你能发布完整的回复头文件吗?

相关问题