title: PROPFIND fails with curl on Apache
body: <p>I'm trying to setup a GIT server, authenticated through LDAP. I am using Apache. The GIT client fails when trying to push. </p>
  
  <pre><code>git push
  </code></pre>
  
  <p>According to the server logs, the problem is with WebDAV PROPFIND command, which is not authenticated by GIT and end up with a 401 http code: </p>
  
  <p>Apache access.log:</p>
  
  <pre><code>192.168.23.199 - - [13/Jul/2017:13:39:27 +0000] "GET /test.git/info/refs?service=git-receive-pack HTTP/1.1" 401 381
  192.168.23.199 - johndoe [13/Jul/2017:13:39:27 +0000] "GET /test.git/info/refs?service=git-receive-pack HTTP/1.1" 200 59
  192.168.23.199 - johndoe [13/Jul/2017:13:39:27 +0000] "GET /test.git/HEAD HTTP/1.1" 200 23
  192.168.23.199 - - [13/Jul/2017:13:39:27 +0000] "PROPFIND /test.git/ HTTP/1.1" 401 381
  </code></pre>
  
  <p>My config file contains a LimitExcept:</p>
  
  <pre><code>   &lt;Location /&gt;
          Dav on
  
          AuthBasicProvider ldap
          AuthLDAPURL "ldap://server:3268 server:3268 server:3268 server:3268/dc=mydc,dc=local?sAMAccountName,distinguishedName,memberOf,displayName"
  
          AuthLDAPBindDN "CN=documentation,OU=Script-Users,OU=Orange,DC=qconsulting,DC=local"
          AuthLDAPBindPassword "xxxxx"
          AuthType Basic
          AuthName "AD Authorization required"
  
  
          &lt;LimitExcept PROPFIND&gt;
              Require valid-user
          &lt;/LimitExcept&gt;
  
          AllowOverride None
  
          Options FollowSymLinks Indexes
          RewriteEngine on
          RewriteRule ^pub/git$  /pub/git/cgi-bin/gitweb.cgi
          RewriteRule ^pub/git/$  /pub/git/cgi-bin/gitweb.cgi
          RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]
       &lt;/Location&gt;
  </code></pre>
  
  <p>The strange thing is that I tried to do PROPFIND request through curl and cadaver. And it fails with curl (401) and it succeeds with cadaver (207)</p>
  
  <p>curl  --request PROPFIND <a href="http://server/test.git/" rel="nofollow noreferrer">http://server/test.git/</a></p>
  
  <p>Apache Log:</p>
  
  <pre><code>192.168.23.199 - - [13/Jul/2017:11:11:46 +0000] "PROPFIND /test.git/ HTTP/1.1" 207 436
  </code></pre>
  
  <p>cadaver <a href="http://server/test.git/" rel="nofollow noreferrer">http://server/test.git/</a></p>
  
  <p>propnames /</p>
  
  <pre><code>192.168.23.199 - - [13/Jul/2017:11:11:59 +0000] "PROPFIND /test.git/ HTTP/1.1" 401 381
  </code></pre>