You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/07/15 02:59:06 UTC

DO NOT REPLY [Bug 42896] New: - dav_method_put deletes entire file when PUT with content-range fails

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42896

           Summary: dav_method_put deletes entire file when PUT with
                    content-range fails
           Product: Apache httpd-2
           Version: 2.2.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_dav
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: kstearns@us.ibm.com


If a client sends a PUT message containing a content range field and an error 
is experienced while receiving the data, dav_method_put function will delete 
the entire file.

For example if a client sends a request such as:

PUT /davtest/1gb.txt HTTP/1.1
content-range: bytes 1048576-2097151/*
User-Agent: FPDAV client/1.0
Host: mars.tivlab.westford.ibm.com
Content-Length: 1048576
Connection: Keep-Alive
Authorization: Basic dXNlcjpwYXNzd29yZA==

is sent by the client and a network error occurs during the receipt of the 
message body then the entire file is deleted before the dav_method_put
returns.

I believe this behavior is wrong and dav_method_put should do one of the 
following:
1. leave the file the way it is even with the modifications.
2. restore the file to the way it was before the modifications.

At the very least dav_method_put should not delete the file if the
error happened before any modifications are made to the file.

I realize this way of using PUT is may not be clear in any specifications but
since Apache is making an attempt I would like to explore the possibility
of making it more useful until a better means up updating byte ranges of a
resource comes along.

I am eager to discuss a short term and to discuss any future
directions Apache may take to accomplish this (such as implementing the PATCH
method)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 42896] - dav_method_put deletes entire file when PUT with content-range fails

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42896





------- Additional Comments From jorton@redhat.com  2007-07-17 07:06 -------
See also bug 38148 - I do think this behaviour is undesirable and I can't see
any reason why it's necessary, but I might be missing something.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 42896] - dav_method_put deletes entire file when PUT with content-range fails

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42896


julian.reschke@gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julian.reschke@gmx.de




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 42896] - dav_method_put deletes entire file when PUT with content-range fails

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42896>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42896





------- Additional Comments From kstearns@us.ibm.com  2007-07-17 07:47 -------
(In reply to comment #1)
> See also bug 38148 - I do think this behaviour is undesirable and I can't see
> any reason why it's necessary, but I might be missing something.

I think people will come down on many different sides of this issue but I 
think in the end everyone will agree that at least one change is necessary.

One reason for this change is:

When a client is doing a PUT request without the content-range field they 
would typically keep the entire contents of the file around until the server 
indicates success. So in this case a client has the entire contents of the 
file and can easily provide it to the server again to restart after an error.
It does not matter in this case if the server deletes the file after an error.

This is not necessarily true for a client using the content-range field. So 
after the server experiences the error and deletes the file the client may not 
be able to reproduce the file.

The client is asking for a portion of the file to be changed so if an error 
happens during the transmission of that request the dav_method_put  function 
should restore the file back the way it was (or do nothing which is really all 
I personally would require). For a PUT that does not contain the content-range 
this would mean deleting the file. But for a PUT that does contain the content-
range deleting the file does much more than undoes what the request was 
attempting to do.

Also, I think the differentiating factor between this and the bug 38148 is the 
presence of the content-range field. They can be addressed independentally.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org