lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Upload


From: Ilya Zakharevich
Subject: lynx-dev Upload
Date: Tue, 13 Mar 2001 02:59:03 -0500
User-agent: Mutt/1.2.5i

I tried uploading from Lynx to the only place I know which accepts
uploads (attachments in mail.yahoo.com), and "it does not work".
Yahoo gives no error message, but the "number of attachments" does not
increase.  Netscape 2.02 uploads successfully.

I wrote a small HTTP server

==================================================================
use HTTP::Daemon;
use HTTP::Status;
use Data::Dumper;

my $d = new HTTP::Daemon;
print "Please contact me at: <URL:", $d->url, ">\n";
my $i = 'serverlog0';
while (my $c = $d->accept) {
    while (my $r = $c->get_request) {
        open F, "> " . $i++ or die "open: $!";
        binmode F;
        print F Dumper($r);
        close F or die "close: $!";
        $c->send_file_response("freenet.sourceforge.html");     # for feedback
    }
    $c->close;
    undef($c);
}
==================================================================

and tried Lynx and Netscape 2.02 on the following HTML:

==================================================================
<HTML>
<HEAD><TITLE>Yahoo! Mail</TITLE></HEAD>
<BODY ALINK=#0000ff VLINK=#0000ff BGCOLOR=#ffffff 
BACKGROUND=[1]http://us.i1.yimg.com/us.yimg.com/i/us/pim/nfymbg2.gif>

<FORM ENCTYPE="multipart/form-data" METHOD=POST 
ACTION="http://localhost:1488/";> 
<B>Step 1:</B> Click <B>Browse</B> and select a file.<BR>
<SMALL>If you do not see a "Browse" button, your browser does not support 
attachments.</SMALL><BR>
<FONT FACE="Arial,Helvetica"><INPUT TYPE=File NAME=userFile SIZE=20></FONT><BR>
<SMALL>(PC users, select "All Files" for Files of Type.)</SMALL>
<P>

<B>Step 2:</B> Click <B>Attach File</B>. <INPUT TYPE=submit NAME=UPL 
VALUE="Attach File"><BR>
<HR WIDTH="100%" SIZE=1 NOSHADE>
<SMALL>
You may attach a maximum of three files.
The total combined attachments may not exceed 1.5 megabytes.
</SMALL>
<P>

</FORM>
</BODY>
</HTML>
==================================================================

The only significant diffs I see are:

a) Both Lynx and Netscape specify content-length which has little
   relationship to anything...;

b) Netscape specifies 'connection' => 'Keep-Alive';

c) Netscape does not specify Content-Type: text/plain; charset=iso-8859-1
   in MIME parts;

d) Netscape gives different Content-Type for the uploaded file, and
   does not use/specify Content-Transfer-Encoding: base64

Which one of these may be crucial for the upload failure?

Ilya

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]