WebDAV Bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

WebDAV Bug?

Jim Schatzman
Can anyone explain the following behavior and how to fix it?

I am running WebDAV with Apache2 version 2.2.15.

I take a tgz file and split it. The files are named

test_xaa  test_xab test_xac etc.

I then attempt to download the files through a browser. I have tried several browsers and the result is always the same.

test_xab, test_xac, etc download without difficulty.

However test_xaa gets renamed "test_xaa.tar" and it is, in fact unzipped, sort of. This a problem because it is invalid, since it was not unzipped with the other files attached. It cannot be just re-zipped and then the collection of files unsplit and unzipped, because zipping does not reproduce the original file. There does not seem to be any way to recover.

Equally oddly, if I rename test_xaa to test_xaa.tgz, then it downloads without difficulty. It is not renamed, and it is not unzipped.

I can find no reference to this behavior in online WebDAV manuals.

Thanks!

Jim



Reply | Threaded
Open this post in threaded view
|

Re: WebDAV Bug?

Julian Reschke
On 2013-12-10 04:03, Jim Schatzman wrote:

> Can anyone explain the following behavior and how to fix it?
>
> I am running WebDAV with Apache2 version 2.2.15.
>
> I take a tgz file and split it. The files are named
>
> test_xaa  test_xab test_xac etc.
>
> I then attempt to download the files through a browser. I have tried several browsers and the result is always the same.
>
> test_xab, test_xac, etc download without difficulty.
>
> However test_xaa gets renamed "test_xaa.tar" and it is, in fact unzipped, sort of. This a problem because it is invalid, since it was not unzipped with the other files attached. It cannot be just re-zipped and then the collection of files unsplit and unzipped, because zipping does not reproduce the original file. There does not seem to be any way to recover.
>
> Equally oddly, if I rename test_xaa to test_xaa.tgz, then it downloads without difficulty. It is not renamed, and it is not unzipped.
>
> I can find no reference to this behavior in online WebDAV manuals.
>
> Thanks!
>
> Jim

a) Does this happen with other browsers as well?

b) Do you have an HTTP trace?

Best regards, Julian


Reply | Threaded
Open this post in threaded view
|

unsubscribing

Julian Reschke
ken
Reply | Threaded
Open this post in threaded view
|

Re: WebDAV Bug?

ken
In reply to this post by Jim Schatzman
On 12/09/2013 10:03 PM Jim Schatzman wrote:

> Can anyone explain the following behavior and how to fix it?
>
> I am running WebDAV with Apache2 version 2.2.15.
>
> I take a tgz file and split it. The files are named
>
> test_xaa  test_xab test_xac etc.
>
> I then attempt to download the files through a browser. I have tried several browsers and the result is always the same.
>
> test_xab, test_xac, etc download without difficulty.
>
> However test_xaa gets renamed "test_xaa.tar" and it is, in fact unzipped, sort of. This a problem because it is invalid, since it was not unzipped with the other files attached. It cannot be just re-zipped and then the collection of files unsplit and unzipped, because zipping does not reproduce the original file. There does not seem to be any way to recover.
>
> Equally oddly, if I rename test_xaa to test_xaa.tgz, then it downloads without difficulty. It is not renamed, and it is not unzipped.
>
> I can find no reference to this behavior in online WebDAV manuals.
>
> Thanks!
>
> Jim

I'm guessing that the problem isn't with apache or webdav, but rather
wtih the browser.  Check its settings -> applications to see if some app
is automatically unzipping the first file, test_xaa.




Reply | Threaded
Open this post in threaded view
|

RE: WebDAV Bug?

Dennis E. Hamilton
There might also be a MIME-type problem, depending on how the original file was split up and the parts renamed.  

I would suggest renaming bits like that to have *.bin names to see if that overcomes it (and assuming the WebDav host has a MIME type rule for *.bin).

-----Original Message-----
From: ken [mailto:[hidden email]]
Sent: Wednesday, December 11, 2013 16:31
To: Jim Schatzman
Cc: [hidden email]
Subject: Re: WebDAV Bug?

On 12/09/2013 10:03 PM Jim Schatzman wrote:

> Can anyone explain the following behavior and how to fix it?
>
> I am running WebDAV with Apache2 version 2.2.15.
>
> I take a tgz file and split it. The files are named
>
> test_xaa  test_xab test_xac etc.
>
> I then attempt to download the files through a browser. I have tried several browsers and the result is always the same.
>
> test_xab, test_xac, etc download without difficulty.
>
> However test_xaa gets renamed "test_xaa.tar" and it is, in fact unzipped, sort of. This a problem because it is invalid, since it was not unzipped with the other files attached. It cannot be just re-zipped and then the collection of files unsplit and unzipped, because zipping does not reproduce the original file. There does not seem to be any way to recover.
>
> Equally oddly, if I rename test_xaa to test_xaa.tgz, then it downloads without difficulty. It is not renamed, and it is not unzipped.
>
> I can find no reference to this behavior in online WebDAV manuals.
>
> Thanks!
>
> Jim

I'm guessing that the problem isn't with apache or webdav, but rather
wtih the browser.  Check its settings -> applications to see if some app
is automatically unzipping the first file, test_xaa.





Reply | Threaded
Open this post in threaded view
|

Re: WebDAV Bug?

Wim Lewis-3
In reply to this post by ken

On 11 Dec 2013, at 4:31 PM, ken wrote:

> On 12/09/2013 10:03 PM Jim Schatzman wrote:
>> Can anyone explain the following behavior and how to fix it?
>>
>> I am running WebDAV with Apache2 version 2.2.15.
>>
>> I take a tgz file and split it. The files are named
>>
>> test_xaa  test_xab test_xac etc.
>>
>> I then attempt to download the files through a browser. I have tried several browsers and the result is always the same.
> [....]
>
> I'm guessing that the problem isn't with apache or webdav, but rather wtih the browser.  Check its settings -> applications to see if some app is automatically unzipping the first file, test_xaa.

Do you have mod_mime_magic enabled? My guess is that the following is happening:

- Apache cannot assign a MIME-type based on file extension or filesystem metadata, since neither of those exist for this file.
- Apache (via mod_mime_magic) looks at the first few bytes of the file to determine its MIME-type, and discovers that it's tar+gzip or maybe just gzip.
- Client is given this information in the response.
- Client (possibly in concert with the OS) has some behavior to automatically un-gzip downloaded files. (Possibly due to the near-universal confusion between content-encoding and transfer-encoding.)



Reply | Threaded
Open this post in threaded view
|

Re: WebDAV Bug? Solved!

Jim Schatzman
And that seems to be the answer. I did indeed have mime-magic enabled in apache. I didn't even know that there was such a thing! Thanks to Wim Lewis for the solution.

Jim



At 12:52 PM 12/16/2013, Wim Lewis wrote:

>On 11 Dec 2013, at 4:31 PM, ken wrote:
>> On 12/09/2013 10:03 PM Jim Schatzman wrote:
>>> Can anyone explain the following behavior and how to fix it?
>>>
>>> I am running WebDAV with Apache2 version 2.2.15.
>>>
>>> I take a tgz file and split it. The files are named
>>>
>>> test_xaa  test_xab test_xac etc.
>>>
>>> I then attempt to download the files through a browser. I have tried several browsers and the result is always the same.
>> [....]
>>
>> I'm guessing that the problem isn't with apache or webdav, but rather wtih the browser.  Check its settings -> applications to see if some app is automatically unzipping the first file, test_xaa.
>
>Do you have mod_mime_magic enabled? My guess is that the following is happening:
>
>- Apache cannot assign a MIME-type based on file extension or filesystem metadata, since neither of those exist for this file.
>- Apache (via mod_mime_magic) looks at the first few bytes of the file to determine its MIME-type, and discovers that it's tar+gzip or maybe just gzip.
>- Client is given this information in the response.
>- Client (possibly in concert with the OS) has some behavior to automatically un-gzip downloaded files. (Possibly due to the near-universal confusion between content-encoding and transfer-encoding.)