cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2057858 ] VMS-Alpha, http-upload not working

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 05 Sep 2008 07:55:55 +0000

Bugs item #2057858, was opened at 2008-08-18 16:09
Message generated for change (Comment added) made by haschwar
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2057858&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: portability problem
Status: Closed
Resolution: Later
Priority: 5
Private: No
Submitted By: Harald Schwarz (haschwar)
Assigned to: Daniel Stenberg (bagder)
Summary: VMS-Alpha, http-upload not working

Initial Comment:
On VMS-Alpha:
When using an http-file-upload the file is not sent to the Server with the correct content-length.
Sending a file with 511 or less bytes, content-length 512 is used.
Sending a file with 513 - 1023 bytes, content-length 1024 is used.
Files with a length of a multiple of 512 Bytes show the correct content-length. Only these files work for upload.

Test-Commands on VMS-Alpha, Linux (Suse) and Windows:
curl --form myfile=@test.ras --trace-ascii testras.log http://my_web_test_server/cgi-bin/upload.pl
curl --form myfile=@test.doc --trace-ascii testdoc.log http://my_web_test_server/cgi-bin/upload.pl

File test.doc has the size 21.504 (multiple of 512)
File test.ras has the size 5.686 (not a multiple of 512).

Using test.doc everything works.
Using test.ras the Content-Length in the LOG-File differs from the content length on Linux/Windows.
The receiving program (in my testcase "upload.pl") says that I have a post-data mismatch.

VMS shows:
002c: Content-Disposition: form-data; name="myfile"; filename="test.ra
006c: s"
0070: Content-Type: application/octet-stream
0098:
=> Send data, 6144 bytes (0x1800)

Linux + Windows show:
002c: Content-Disposition: form-data; name="myfile"; filename="test.ra
006c: s"
0070: Content-Type: application/octet-stream
0098:
=> Send data, 5686 bytes (0x1636)

My workaround: I wrote a perl-program to add some bytes to the file to have a multiple of 512 Bytes. The CGI-Program (upload.pl) then reduces the filesize back to the origin.

This workaround works for all files with all sizes - but the error in curl still remains.

Now I have to say, that I'm not a C-Programmer, so I kindly ask for help.

If you need a VMS-Alpha for testing (incl. Compiler, ...), please have a look at www.polarhome.com.
On VMS-Alpha: before you can use "curl" as a program you have to define a symbol that points to CURL.EXE.
curl = "$...[...]CURL.EXE"
Then "curl" can be startet as described above.

Used CURL-Version on all systems: 7.18.2.

----------------------------------------------------------------------

>Comment By: Harald Schwarz (haschwar)
Date: 2008-09-05 07:55

Message:
Logged In: YES
user_id=2185003
Originator: YES

There's additional information for this problem at
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1265138.

short summary of the topic:

VMS has several ways to store a file - with different "record formats".
Using the record format "Fixed length 512 byte records", the file-size for
the calculation of the "Content-Length" is detected correctly. During
read-file -> send process it seems that CURL does ignore the FFP (EOF
marker).
A workaround for binary files is to change the record format before
uploading the file with the command:
SET FILE/ATTRIB=RFM=STMLF filename

But: not all applications on VMS support Stream_LF record formats.
I hope that anyone with VMS-skills can fix the bug.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-08-21 18:29

Message:
Logged In: YES
user_id=1110
Originator: NO

Added to KNOWN_BUGS as item #57. If anyone has further details or
considers working on a fix, I'm ready to reopen this issue again. Closed
for now.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-08-19 21:27

Message:
Logged In: YES
user_id=1110
Originator: NO

As mentioned on the mailing list, we depend on people who have VMS and a
compiler to debug this problem and work on a fix. Since nobody has stepped
up yet, I'll most likely add this bug to the KNOWN_BUG list within soon and
close this report.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2057858&group_id=976
Received on 2008-09-05

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET