You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Oskar Svadkovskey <Os...@flashnetworks.com> on 2009/03/21 18:24:34 UTC

[users@httpd] Precondition failed 412 error on uploading files using davfs

Hi all

I was curious if anybody has experience with the following issue. We are using the latest stable davfs 1.3.3 to upload files to Apache.. There is an option in davfs2.conf called if_match_bug. With this option enabled davfs sends a HEAD request after each PUT. Setting this option to 0 is supposed to eliminate this extra HEAD.

The guys from davfs told me this:
"if_match_bug:
Yes it is Apache with mod_dav and mod_dav_fs. The latest one or two releases of apache should no longer have this bug. But your version seems to be one of the version with this bug."

So I set up the latest version of Apache released by RedHat: 2.2.3. And yet writes continue to fail without if_match_bug and the same 412 error is returned by Apache.

Any idea what can I do about this?

Oskar


PS

These are PUT and 412 error.

Hypertext Transfer Protocol
    PUT /openoskar/no.txt HTTP/1.1\r\n
        Request Method: PUT
        Request URI: /openoskar/no.txt
        Request Version: HTTP/1.1
    Host: webdavserver\r\n
    User-Agent: davfs2/1.3.3 neon/0.28.2\r\n
    Connection: TE\r\n
    TE: trailers\r\n
    If-Match: "3e683-6-463f8ce3d3680"\r\n
    Content-Length: 0\r\n
    \r\n



Hypertext Transfer Protocol
    HTTP/1.1 412 Precondition Failed\r\n
        Request Version: HTTP/1.1
        Response Code: 412
    Date: Thu, 12 Mar 2009 16:10:10 GMT\r\n
    Server: Apache/2.0.52 (Red Hat)\r\n
    Content-Length: 327\r\n
    Connection: close\r\n
    Content-Type: text/html; charset=iso-8859-1\r\n
    \r\n
Line-based text data: text/html
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>412 Precondition Failed</title>
    </head><body>
    <h1>Precondition Failed</h1>
    <p>The precondition on the request for the URL /openoskar/no.txt evaluated to false.</p>
    <hr>
    <address>Apache/2.2.3 (Red Hat) Server at webdavserver Port 80</address>
    </body></html>
This mail was sent via Mail-SeCure System.

RE: [users@httpd] Precondition failed 412 error on uploading files using davfs

Posted by Oskar Svadkovskey <Os...@flashnetworks.com>.
Sorry for needless cluttering of the list. I got the answer just now. For those interested:

The if_match-bug was fixed in Apache 2.2.8. So it will not work with apache 2.2.3.

The latest release of Apache is 2.2.11.

I had tested the Apache fix for this bug before the release of 2.2.8 by patching 2.2.3 with this fix.

________________________________
From: Oskar Svadkovskey
Sent: Saturday, March 21, 2009 19:25
To: users@httpd.apache.org
Subject: [users@httpd] Precondition failed 412 error on uploading files using davfs

Hi all

I was curious if anybody has experience with the following issue. We are using the latest stable davfs 1.3.3 to upload files to Apache.. There is an option in davfs2.conf called if_match_bug. With this option enabled davfs sends a HEAD request after each PUT. Setting this option to 0 is supposed to eliminate this extra HEAD.

The guys from davfs told me this:
"if_match_bug:
Yes it is Apache with mod_dav and mod_dav_fs. The latest one or two releases of apache should no longer have this bug. But your version seems to be one of the version with this bug."

So I set up the latest version of Apache released by RedHat: 2.2.3. And yet writes continue to fail without if_match_bug and the same 412 error is returned by Apache.

Any idea what can I do about this?

Oskar


PS

These are PUT and 412 error.

Hypertext Transfer Protocol
    PUT /openoskar/no.txt HTTP/1.1\r\n
        Request Method: PUT
        Request URI: /openoskar/no.txt
        Request Version: HTTP/1.1
    Host: webdavserver\r\n
    User-Agent: davfs2/1.3.3 neon/0.28.2\r\n
    Connection: TE\r\n
    TE: trailers\r\n
    If-Match: "3e683-6-463f8ce3d3680"\r\n
    Content-Length: 0\r\n
    \r\n



Hypertext Transfer Protocol
    HTTP/1.1 412 Precondition Failed\r\n
        Request Version: HTTP/1.1
        Response Code: 412
    Date: Thu, 12 Mar 2009 16:10:10 GMT\r\n
    Server: Apache/2.0.52 (Red Hat)\r\n
    Content-Length: 327\r\n
    Connection: close\r\n
    Content-Type: text/html; charset=iso-8859-1\r\n
    \r\n
Line-based text data: text/html
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>412 Precondition Failed</title>
    </head><body>
    <h1>Precondition Failed</h1>
    <p>The precondition on the request for the URL /openoskar/no.txt evaluated to false.</p>
    <hr>
    <address>Apache/2.2.3 (Red Hat) Server at webdavserver Port 80</address>
    </body></html>


This mail was sent via Mail-SeCure System.
This mail was sent via Mail-SeCure System.