# Dav module temp files

**URL:** <https://www.ruby-forum.com/t/dav-module-temp-files/217384>\
**Category:** NGINX\
**Created:** [February 29, 2012, 12:56pm UTC](https://www.ruby-forum.com/t/dav-module-temp-files/217384 "2012-02-29T12:56:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 29, 2012, 12:56pm UTC](https://www.ruby-forum.com/t/dav-module-temp-files/217384/1 "2012-02-29T12:56:19Z")

</div>

Hello,  
is there a technical reason why the WebDAV module (for PUTs) always  
makes a temp file rather than use/honour memory buffer  
(client\_body\_buffer\_size)?

wbr  
rr

---

<div class="post-metadata">

**Author:** ![Reinis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@Reinis\_R](https://www.ruby-forum.com/u/Reinis_R)\
**Post date:** [February 29, 2012, 3:27pm UTC](https://www.ruby-forum.com/t/dav-module-temp-files/217384/2 "2012-02-29T15:27:27Z")

</div>

Hello!

On Wed, Feb 29, 2012 at 01:55:42PM +0200, Reinis R. wrote:

> Hello,  
> is there a technical reason why the WebDAV module (for PUTs) always  
> makes a temp file rather than use/honour memory buffer  
> (client\_body\_buffer\_size)?

It will use memory buffer for intermediate data, but as it needs  
file on disk anyway - data are always written to a file.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Reinis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@Reinis\_R](https://www.ruby-forum.com/u/Reinis_R)\
**Post date:** [March 1, 2012, 2:48am UTC](https://www.ruby-forum.com/t/dav-module-temp-files/217384/3 "2012-03-01T02:48:24Z")

</div>

On 02/29/2012 03:27 PM, Maxim D. wrote:

> file on disk anyway - data are always written to a file.
> 
> Maxim D.  
> Just a tiny idea. (but perhaps this is already the case)  
> Ideally the temp file should be on the same file system than the target  
> file)  
> Otherwise the file has top be created twice.

---

<div class="post-metadata">

**Author:** ![Reinis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@Reinis\_R](https://www.ruby-forum.com/u/Reinis_R)\
**Post date:** [March 1, 2012, 10:06am UTC](https://www.ruby-forum.com/t/dav-module-temp-files/217384/4 "2012-03-01T10:06:42Z")

</div>

Hello!

On Thu, Mar 01, 2012 at 02:47:40AM +0100, Gelonida N wrote:

> > It will use memory buffer for intermediate data, but as it needs  
> > file on disk anyway - data are always written to a file.
> > 
> > Maxim D.  
> > Just a tiny idea. (but perhaps this is already the case)  
> > Ideally the temp file should be on the same file system than the target  
> > file)  
> > Otherwise the file has top be created twice.

Yes, and that’s why docs explicitly recommend using  
client\_proxy\_temp on the same file system:

> **[Module ngx\_http\_dav\_module](http://nginx.org/en/docs/http/ngx_http_dav_module.html#dav_methods)**
>
> The ngx\_http\_dav\_module module is intended for file management automation via the WebDAV protocol. The module processes HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY, and MOVE.

Maxim D.
