Re: CGI based WebDAV client and Transfer-Encoding: Chunked issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for your responses,

I am now having troubles with getting the entire file that is being
sent to the server and knowing when the entire file has arrived.  What
I have noticed is that for larger files (ex greater than 90,000
characters) when I use "cin.seek(0, ios::end);" to find the end of the
file, I only get a size of around 66,000 characters.  If I put the
cin.seek in a loop, I will get the entire file, but I don't know when
to stop waiting for more parts to the file since there can be a delay
between the different chunks arriving at the server.

@Andre I have not looked into mod_dav because I would imagine that
would require pretty much a complete re-write of the program. As for
sending a header asking the client not to use chunked
transfer-encoding, that is an interesting idea that I will look into,
but if I can modify the program to work with chunked data that would
be preferable.

Again, thanks for the help,
- Paul

On Mon, Dec 8, 2008 at 4:11 PM, Paul <pvince@xxxxxxxxx> wrote:
> Hello,
>
> I am working on patching a program that was written by a different
> developer who is no longer with company.  The program is a CGI program
> that acts as a WebDAV server.  Recently we found a problem when a mac
> user running Mac OS 10.5 (Leopard) tries to paste a file into the
> WebDAV folder on their computer.  Instead of putting the file on the
> server, it was creating a 0 kb file.  After searching I managed to
> find out this was caused by Apple's switch to using
> "Transfer-Encoding: Chunked" rather than defining a Content-Length.
>
> The problem I am having is that I do not know how to find out the
> length of the input file that is coming from the client.  According to
> the Transfer-Encoding specification, the data is supposed to be in the
> form of:
> "23
> This is the data in the first chunk
> 1A
> and this is the second one
> 0"
>
> but when I do something like:
> " cin.read((char *) myBuffer, 30);"
> (note, 30 is just an example here), the result in the buffer starts
> with the text being sent, and does not include any chunk sizes.  Am I
> reading in the data wrong? Is the Mac sending the wrong information?
> Is Apache filtering out the chunk data?
>
> Thanks for any help you can give me,
> Paul
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux