[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV problems in form-based file upload
From: |
Henri Torgemane |
Subject: |
Re: LYNX-DEV problems in form-based file upload |
Date: |
Mon, 20 Jan 1997 13:06:53 -0500 |
Hi,
I'm following this thread with great interest as I need the file upload tag
too.
> I have been fixing the lynx sources to support the form-based
> file upload function which is a new(?) spec. in HTML 3.0.
> Fote helped me by telling where I should start and which files
> are related to my work.
> I followed his advise. So, I fixed some source files of lynx2-6fm.
> First, I made it possible to understand "<INPUT TYPE="file" ... >"
> and accept a file name that it will be uploaded.
> Then, I added some codes into "HText_SubmitForm" procedure in GridText.c
> to construct a form data including the contents of a file.
> [...]
> The next problem seems to be related to the size of an upload file.
> >From the results of simple transmission test, it is successful that
> trasmission of a relatively short file. However, I encountered follow
> transmission error message for a larger file.
>
> Alert!: Unexpected network write error; connection aborted.
> Alert!: Unable to access document.
>
> I checked the exact boundary.
> When the total size of "query" structure is larger than 9640 bytes,
> the above messages are displayed and the transmission fails.
I'm very new to this mailing list and to lynx itself, but I looked at
the GridText.c file, and it seems to me that the following lines may
be related to your problem:
/*
* Get query ready.
*/
query = (char *)calloc(1, len);
if (query == NULL)
outofmem(__FILE__, "HText_SubmitForm");
Where len is computed in the immediatly above lines.
I guess it may be necessary to add some code in the loop computing len to
have the correct amount of memory allocated.
But the use of a big string to store all the datas to post may not be a
good idea:
As long as you transmit only text files or small binary files, it is
probably ok, but
a big binary file will have to be fully stored in memory before being sent,
and
this could lead to memory leaks.
For now, I don't know Lynx enough to be able to propose something better.
--
address@hidden http://hpweb.utc.fr/~htorgema/
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;
- Re: LYNX-DEV problems in form-based file upload,
Henri Torgemane <=