Forum OpenACS Development: Re: OpenACS 5.9.0 and Oracle 12c

Collapse
Posted by Brian Fenton on
Hi Maurizio

it is you who has done a good job! I didn't have to modify anything, it worked out of the box. I used the nsoracle.dll that you include in your release.

There is one issue of concern I noticed yesterday evening, that I need to spend more time looking at. Calls to ::util::http::get are failing.
See this bug https://openacs.org/bugtracker/openacs/bug?format=table&bug_number=3307

thanks
Brian

Collapse
Posted by Maurizio Martignano on
Ah... Ok. Thank you.
While waiting for the bug fix, where i need to do some investigation, you can try something like this:
[exec wget https://openacs.org]

Kind of awkward... but it should work...

Maurizio

Collapse
Posted by Antonio Pisano on
Another way to circumvent the issue for the time being could be to try the curl implementation of HTTP client, e.g. util::http::get -preference curl -url https://openacs.org

For reference see https://openacs.org/api-doc/proc-view?proc=util%3a%3ahttp%3a%3aget&source_p=1

Collapse
Posted by Brian Fenton on
Thank you Maurizio. Actually what is the canonical way to make a HTTP call with Naviserver? In our old AOLserver codebase, we have a mix of calls to ns_httpget, ad_httpget, and more recently calls to ns_http (this is the one that works best for us on Windows 2008).
Collapse
Posted by Maurizio Martignano on
I have fixed the issue.

This is the change in the code:

if (connect(sock, saPtr, Ns_SockaddrGetSockLen(saPtr)) != 0) {
int err = ns_sockerrno;

#ifndef _WIN32
if (!async || (err != EINPROGRESS && err != EWOULDBLOCK)) {
#else
if (!async || (err != WSAEWOULDBLOCK)) {
#endif
ns_sockclose(sock);
Ns_LogSockaddr(Warning, "SockConnect fails", saPtr);
sock = NS_INVALID_SOCKET;

The mod will be available in next version of my distribution.
Over the weekend.

Collapse
Posted by Antonio Pisano on
Regarding this, ns_http is now the preferred low-level interface for HTTP client functionalities. A higher level interface, that deprecates all the "old school" procs like ad_httpget and such, you can find in [1] and [2].

These are basically wrappers around the API that make easier to issue the requests, also providing backward compatibility with Aolserver by using curl.

Hope this helps

Antonio

[1] https://openacs.org/api-doc/proc-view?proc=util%3a%3ahttp%3a%3aget&source_p=1
[2] https://openacs.org/api-doc/proc-view?proc=util%3a%3ahttp%3a%3apost&source_p=1

Collapse
Posted by Brian Fenton on
Thanks Antonio!