    



<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Git repository over HTTP WebDAV with nginx</title>
	<atom:link href="http://notes.xiaoka.com/2008/04/13/git-repository-over-http-webdav-with-nginx/feed/" rel="self" type="application/rss+xml" />
	<link>http://notes.xiaoka.com/2008/04/13/git-repository-over-http-webdav-with-nginx/</link>
	<description>Random Ramblings</description>
	<pubDate>Wed, 15 Oct 2008 19:00:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Joey Korkames</title>
		<link>http://notes.xiaoka.com/2008/04/13/git-repository-over-http-webdav-with-nginx/#comment-657</link>
		<dc:creator>Joey Korkames</dc:creator>
		<pubDate>Mon, 29 Sep 2008 09:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://notes.xiaoka.com/?p=30#comment-657</guid>
		<description>I gave up on fcgiPass (no good DAV fcgi scripts out there) and instead use proxy_pass to a pandav daemon:
http://github.com/gicmo/pandav/tree/master

For WinXP mounting, this patch needs to be applied:
In davserver.py replace line 254 with the following:
w.write('%s\n' % urllib.quote(m.virname))

With the fixed pandav, _most_ everything seems to work right with Windows' DAV client, and Nginx still handles GET/PUT if
 using (OPTIONS&#124;PROPFIND&#124;LOCK&#124;UNLOCK&#124;PROPPATCH&#124;HEAD&#124;MKCOL&#124;COPY&#124;MOVE)
 However, windows doesn't send requests about folders with the HTTP spec'd trailing slash ("/mydir" vs. "/mydir/") . Most items in the nginx dav code say to send 409 to DAV operations on
 folders if they are missing the slash. Normally, for a human using a web browser, the web server sends a redirect to fix the path to proper spec but if you try to do that to a broken dav client, you get a whole other type of error. If nginx can get a
little more flexible about folders (like apache's "redirect-carefully"), WinXP should be all set.

I have not tested pandav with svn/git/cadaver/nd ....</description>
		<content:encoded><![CDATA[<p>I gave up on fcgiPass (no good <span class="caps">DAV </span>fcgi scripts out there) and instead use proxy_pass to a pandav daemon:<br />
<a href="http://github.com/gicmo/pandav/tree/master"  rel="nofollow">http://github.com/gicmo/pandav/tree/master</a></p>
<p>For WinXP mounting, this patch needs to be applied:<br />
In davserver.py replace line 254 with the following:<br />
w.write(&#8217;%s\n&#8217; % urllib.quote(m.virname))</p>
<p>With the fixed pandav, <em>most</em> everything seems to work right with Windows&#8217; <span class="caps">DAV </span>client, and Nginx still handles <span class="caps">GET</span>/PUT if<br />
 using (OPTIONS|PROPFIND|LOCK|UNLOCK|PROPPATCH|HEAD|MKCOL|COPY|MOVE)<br />
 However, windows doesn&#8217;t send requests about folders with the <span class="caps">HTTP </span>spec&#8217;d trailing slash (&#8221;/mydir&#8221; vs. &#8220;/mydir/&#8221;) . Most items in the nginx dav code say to send 409 to <span class="caps">DAV </span>operations on<br />
 folders if they are missing the slash. Normally, for a human using a web browser, the web server sends a redirect to fix the path to proper spec but if you try to do that to a broken dav client, you get a whole other type of error. If nginx can get a<br />
little more flexible about folders (like apache&#8217;s &#8220;redirect-carefully&#8221;), WinXP should be all set.</p>
<p>I have not tested pandav with svn/git/cadaver/nd &#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Ghigonis</title>
		<link>http://notes.xiaoka.com/2008/04/13/git-repository-over-http-webdav-with-nginx/#comment-498</link>
		<dc:creator>Laurent Ghigonis</dc:creator>
		<pubDate>Sat, 30 Aug 2008 23:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://notes.xiaoka.com/?p=30#comment-498</guid>
		<description>Thanks for the infos. Do you have updates about handling webdav in nginx via a cgi script ? The nph-webdav cgi script doesnt seem to handle (yet) the options needed by subversion &lt;a href="http://search.cpan.org/~jlawrenc/HTTP-DAVServer-0.2/lib/HTTP/DAVServer.pm#MODULE_STATUS" title="site officiel" rel="nofollow"&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for the infos. Do you have updates about handling webdav in nginx via a cgi script ? The nph-webdav cgi script doesnt seem to handle (yet) the options needed by subversion <a href="http://search.cpan.org/~jlawrenc/HTTP-DAVServer-0.2/lib/HTTP/DAVServer.pm#MODULE_STATUS"  title="site officiel" rel="nofollow"></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joey Korkames</title>
		<link>http://notes.xiaoka.com/2008/04/13/git-repository-over-http-webdav-with-nginx/#comment-333</link>
		<dc:creator>Joey Korkames</dc:creator>
		<pubDate>Thu, 05 Jun 2008 20:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://notes.xiaoka.com/?p=30#comment-333</guid>
		<description>So I fat fingered that pretty good ....

that if condition should be:
&lt;code&gt;
if ($request_method ~ ^(PROPFIND&#124;OPTIONS&#124;PROPPATCH&#124;LOCK&#124;UNLOCK)$ ){
... }
&lt;/code&gt;

Also, that webdev.cgi is actually pretty weak, it only does PROPFIND. I'm gonna try libhttp-davserver-perl's nph-webdav and see if that does a bit more.</description>
		<content:encoded><![CDATA[<p>So I fat fingered that pretty good &#8230;.</p>
<p>that if condition should be:<br />
<code><br />
if ($request_method ~ ^(PROPFIND|OPTIONS|PROPPATCH|LOCK|UNLOCK)$ ){<br />
... }<br />
</code></p>
<p>Also, that webdev.cgi is actually pretty weak, it only does <span class="caps">PROPFIND.</span> I&#8217;m gonna try libhttp-davserver-perl&#8217;s nph-webdav and see if that does a bit more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joey Korkames</title>
		<link>http://notes.xiaoka.com/2008/04/13/git-repository-over-http-webdav-with-nginx/#comment-332</link>
		<dc:creator>Joey Korkames</dc:creator>
		<pubDate>Thu, 05 Jun 2008 19:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://notes.xiaoka.com/?p=30#comment-332</guid>
		<description>I looked at adding PROPFIND awhile ago. OPTIONS was easy enough but PROPFIND is a little bit more logic and XML than I care to bungle in C. Instead, I rigged nginx to redirect all unsupported WebDAV methods to a CGI script that does understand them. Luckily, none of these op's are really I/O intensive.

&lt;code&gt;
        location ^~ /git/ {
                root /var/www/localhost/htdocs/git;
                dav_access             user:rw group:r  all:r;
                dav_methods  PUT DELETE MKCOL COPY MOVE;
                fastcgi_param  SCRIPT_FILENAME  /var/www/localhost/htdocs/git/webdav.cgi;
               #http://plan9.aichi-u.ac.jp/netlib/webappls/webdav.cgi
                include http/fastcgi/defaults.conf;

                if ($request_method = ^(PROPFIND&#124;OPTIONS&#124;PROPPATCH&#124;LOCK&#124;UNLOCK)$ {
                        fastcgi_pass   fastcgi-cgiwrap-local;
                        #http://wiki.codemongers.com/NginxSimpleCGI
                }
        }
&lt;/code&gt;

I've just tested this with the nd client (http://www.gohome.org/nd/) and it seems to work so far.</description>
		<content:encoded><![CDATA[<p>I looked at adding <span class="caps">PROPFIND </span>awhile ago. <span class="caps">OPTIONS </span>was easy enough but <span class="caps">PROPFIND </span>is a little bit more logic and <span class="caps">XML </span>than I care to bungle in C. Instead, I rigged nginx to redirect all unsupported WebDAV methods to a <span class="caps">CGI </span>script that does understand them. Luckily, none of these op&#8217;s are really I/O intensive.</p>
<p><code><br />
        location ^~ /git/ {<br />
                root /var/www/localhost/htdocs/git;<br />
                dav_access             user:rw group:r  all:r;<br />
                dav_methods  PUT DELETE MKCOL COPY MOVE;<br />
                fastcgi_param  SCRIPT_FILENAME  /var/www/localhost/htdocs/git/webdav.cgi;<br />
               #http://plan9.aichi-u.ac.jp/netlib/webappls/webdav.cgi<br />
                include http/fastcgi/defaults.conf;</p>
<p>                if ($request_method = ^(PROPFIND|OPTIONS|PROPPATCH|LOCK|UNLOCK)$ {<br />
                        fastcgi_pass   fastcgi-cgiwrap-local;<br />
                        #http://wiki.codemongers.com/NginxSimpleCGI<br />
                }<br />
        }<br />
</code></p>
<p>I&#8217;ve just tested this with the nd client (http://www.gohome.org/nd/) and it seems to work so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomasz Sterna</title>
		<link>http://notes.xiaoka.com/2008/04/13/git-repository-over-http-webdav-with-nginx/#comment-328</link>
		<dc:creator>Tomasz Sterna</dc:creator>
		<pubDate>Mon, 02 Jun 2008 09:14:09 +0000</pubDate>
		<guid isPermaLink="false">http://notes.xiaoka.com/?p=30#comment-328</guid>
		<description>Unfortunately not much. Lack of time :-(</description>
		<content:encoded><![CDATA[<p>Unfortunately not much. Lack of time <img src='http://notes.xiaoka.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.346 seconds -->
