cURL / Mailing Lists / curl-users / Single Mail

curl-users

Line termination differences in header vs. HTML

From: Michael T. Davis <DAVISM_at_ecr6.ohio-state.edu>
Date: Tue, 20 Mar 2007 18:26:21 -0400 (EDT)

$ curl -V

curl 7.14.0 (ALPHA-HP-VMS) libcurl/7.14.0 OpenSSL/0.9.7e
Protocols: ftp gopher telnet dict http file https ftps
Features: NTLM SSL

...running on an AlphaServer DS15 running OpenVMS V8.2

        I have pieced together a few DCL command procedures that utilize
cURL, and I have observed that when I specify "-i" and direct output to a
file, the header has different line termination characteristics than the
HTML content. In particular, I have to use something like this to properly
read the file:

$ cr[ 0, 8 ] = 13
$ open/read in data.txt
$loop: read/end_of_file=end in record
$ ! header records have a carriage-return appended, so strip it (if necessary)
$ record = f$element ( 0, cr, record )
$ ! do whatever with record, now
$ goto loop
$end: close in

Is this expected behavior, or a bug which is fixed with a newer version?

Thanks,
Mike

-- 
                                         |    Systems Specialist: CBE,MSE
         Michael T. Davis (Mike)         | Departmental Networking/Computing
 http://www.ecr6.ohio-state.edu/~davism/ |     The Ohio State University
                                         |     197 Watts, (614) 292-6928
Received on 2007-03-20