Subject: | problems with get from M$ sharepoint |
I tried to use HTTP::DAV to access a M$ sharepoint server. The get()
method works only after applying the attached patch - a propfind on the
file causes an error (HTTP/1.1 404 NOT FOUND), although the subsequent
_get will work OK.
Here is the debugging output from the script (which just open()s the URL
and get()s a file from a subdirectory), with actual server, account etc.
names removed:
Setting auth details for <sharepointserver>:443, <sharepointserver> to
'<username>', '<password>'
new_resource: For https://<sharepointserver>/<path>/, creating new resource
Resetting user and password for <sharepointserver>:443, <sharepointserver>
Resetting user and password for <sharepointserver>:443, <sharepointserver>
get: https://<sharepointserver>/<path>/file.xls -> ./file.xls
new_resource: For https://<sharepointserver>/<path>/file.xls, creating
new resource
Resetting user and password for <sharepointserver>:443,
Couldn't get https://<sharepointserver>/<path>/: Server response: NOT FOUND
The other attachment contains the communication log.
Is there something wrong with our server, or is the propfind before
_get() wrong, useless or obsolete?
Many thanks for supporting this great module,
Marek
Subject: | perldav_debug.txt |
----------------------------------------------------------------------
Fri Mar 27 09:50:09 2009
PROPFIND REQUEST>>
PROPFIND https://<sharepointserver>/<path>/ HTTP/1.1
Host: <sharepointserver>:443
User-Agent: DAV.pm/v0.37
Content-Length: 90
Content-Type: text/xml
Depth: 0
<?xml version="1.0" encoding="utf-8"?><D:propfind xmlns:D="DAV:"><D:allprop/></D:propfind>
PROPFIND XML RESPONSE>>HTTP/1.1 207 MULTI-STATUS
Cache-Control: no-cache
Date: Fri, 27 Mar 2009 08:49:52 GMT
Server: Microsoft-IIS/6.0
Content-Length: 1191
Content-Type: text/xml
Client-Date: Fri, 27 Mar 2009 08:50:09 GMT
Client-Peer: 172.28.182.203:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
Client-SSL-Cert-Subject: /C=DE/ST=Bavaria/L=Munich/O=Infineon Technologies Aktiengesellschaft/OU=IFKL IT OS PA AP/CN=<sharepointserver>
Client-SSL-Cipher: RC4-MD5
Client-SSL-Warning: Peer certificate not verified
MicrosoftSharePointTeamServices: 12.0.0.6219
Public-Extension: http://schemas.microsoft.com/repl-2
Set-Cookie: WSS_KeepSessionAuthenticated=443; path=/
X-Powered-By: ASP.NET
<?xml version="1.0" encoding="utf-8" ?><D:multistatus xmlns:D="DAV:" xmlns:Office="urn:schemas-microsoft-com:office:office" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:Z="urn:schemas-microsoft-com:">
<D:response><D:href>https://<sharepointserver>/<path></D:href><D:propstat><D:prop><D:displayname>Interfaces-Responsibilities</D:displayname><D:lockdiscovery/><D:supportedlock/><D:isFolder>t</D:isFolder><D:iscollection>1</D:iscollection><D:ishidden>0</D:ishidden><D:getcontenttype>application/octet-stream</D:getcontenttype><D:getcontentlength>0</D:getcontentlength><D:resourcetype><D:collection/></D:resourcetype><Repl:authoritative-directory>t</Repl:authoritative-directory><D:getlastmodified>2008-12-10T09:21:09Z</D:getlastmodified><D:creationdate>2008-11-08T07:51:46Z</D:creationdate><Repl:repl-uid>rid:{8C5C5218-5CB0-4112-8082-F4E52D75CE11}</Repl:repl-uid><Repl:resourcetag>rt:8C5C5218-5CB0-4112-8082-F4E52D75CE11@00000000000</Repl:resourcetag><D:getetag>"{8C5C5218-5CB0-4112-8082-F4E52D75CE11},0"</D:getetag></D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
----------------------------------------------------------------------
Fri Mar 27 09:50:09 2009
PROPFIND REQUEST>>
PROPFIND https://<sharepointserver>/<path>/file.xls HTTP/1.1
Authorization: Basic ZXVccm91Y2hhbDpNaUAwMHRyYQ==
Host: <sharepointserver>:443
User-Agent: DAV.pm/v0.37
Content-Length: 90
Content-Type: text/xml
Depth: 1
<?xml version="1.0" encoding="utf-8"?><D:propfind xmlns:D="DAV:"><D:allprop/></D:propfind>
PROPFIND RESPONSE>>
HTTP/1.1 404 NOT FOUND
Cache-Control: private,max-age=0
Date: Fri, 27 Mar 2009 08:49:53 GMT
Server: Microsoft-IIS/6.0
Content-Length: 0
Client-Date: Fri, 27 Mar 2009 08:50:09 GMT
Client-Peer: 172.28.182.203:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
Client-SSL-Cert-Subject: /C=DE/ST=Bavaria/L=Munich/O=Infineon Technologies Aktiengesellschaft/OU=IFKL IT OS PA AP/CN=<sharepointserver>
Client-SSL-Cipher: RC4-MD5
Client-SSL-Warning: Peer certificate not verified
Exires: Thu, 12 Mar 2009 08:49:53 GMT
MicrosoftSharePointTeamServices: 12.0.0.6219
Public-Extension: http://schemas.microsoft.com/repl-2
Set-Cookie: WSS_KeepSessionAuthenticated=443; path=/
X-MSDAVEXT_Error: 589831; The%20folder%20that%20would%20hold%20URL%20%27Shared%20Documents%2fInterfaces%2dResponsibilities%2ffile%2exls%27%20does%20not%20exist%20on%20the%20server%2e
X-Powered-By: ASP.NET
Subject: | HTTP-DAV.diff |
diff -ruN HTTP-DAV-0.37/DAV.pm HTTP-DAV-0.37p1/DAV.pm
--- HTTP-DAV-0.37/DAV.pm 2009-03-24 10:00:41.000000000 +0100
+++ HTTP-DAV-0.37p1/DAV.pm 2009-03-27 09:28:18.620857000 +0100
@@ -330,11 +330,12 @@
# Setup the resource based on the passed url and do a propfind.
my $resource = $self->new_resource( -uri => $u );
- my $resp = $resource->propfind( -depth => 1 );
- if ( $resp->is_error ) {
- return $self->err( 'ERR_RESP_FAIL', $resp->message(), $u );
- }
+ # no propfind - does not work with M$ Sharepoint
+ #my $resp = $resource->propfind( -depth => 1 );
+ #if ( $resp->is_error ) {
+ # return $self->err( 'ERR_RESP_FAIL', $resp->message(), $u );
+ #}
$self->_get( $resource, $dest_file, $callback, $chunk );
}