cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: porting to mvs

From: Mark & Sharon Koehn <mskoehn_at_sbcglobal.net>
Date: Mon, 13 Mar 2006 15:21:10 -0800

I'm currently just trying to get http communications to work properly, I'll
get to ftp later on - one step at a time.

I'm running the first test, test1, and it fails without having made any
ascii->ebcdic translations - just talking native ebcdic to each other. It
looks like there is some hardocded ascii values in two files - url.c and
http.c where the octal values are being referenced rather than the symbolic
names. These changes are listed below.

I'm intending to see test1 one work in ebcdic and then try finding the
places where the translation needs to occur on tests/server/sws and src/curl
to see a request/response go over the network correctly before continuing.

I believe you are correct that the headers need to be in ascii for http.
The body should be as well for http when sending data from the mainframe to
the network. But the body prior to sending will most likely be in ebcdic -
just a guess for now.

When a program or application calls libcurl - Yes - I believe it is safe to
assume that the data will be in ebcdic when calling the curl API. It will
be up to the Curl API to translate into ASCII at the appropriate places for
network communications.

Here are the changes I've made so far to the source:

lib/url.c - around line 3862
< conn->allocptr.uagent =
< aprintf( "User-Agent: %s\015\012", data->set.useragent);
change to
> conn->allocptr.uagent =
> aprintf( "User-Agent: %s\r\n", data->set.useragent);

lib/http.c - around line 156
< *userp = aprintf( "%sAuthorization: Basic %s\015\012",
change to
> *userp = aprintf( "%sAuthorization: Basic %s\r\n",

lib/http.c - around line 1607
< conn->allocptr.ref = aprintf( "Referer: %s\015\012",
data->change.referer);
change to
> conn->allocptr.ref = aprintf( "Referer: %s\r\n", data->change.referer);

lib/http.c - around line 1618
< aprintf("Accept-Encoding: %s\015\012", data->set.encoding);
change to
> aprintf("Accept-Encoding: %s\r\n", data->set.encoding);

Any more hints will be appreciated.

Thanks,
-Mark
Received on 2006-03-14