I've just checked with Package Manager - addons/web/gethttp IS now at version 1.0.22, but WAS at version 1.0.21 when I was messing about with copying  and pasting ca-bundle.crt and writing the "FWIW" message.  As I already had vn 1.0.21 installed,  I didn't see any point
trying to update via pacman at the time.

I confirm I get results similar to Raul's examples,  below, ie with string-lengths 852 with l-arg '-I' and 19353 with l-arg 'sSL' to gethttp.  And yes,  curl.exe is there in the bin folder.

Thanks

M

On 30/03/2022 23:01, 'Mike Day' via General wrote:
Yes,  715 my mistake...  I was trying to encapsulate the results.  The last 
effort resulted in a null value.  715 is an intruder!

The main question, to my mind, is whether you are seeing the expected behaviour 
here.    gethttp works for me in other circumstances,  so I don’t personally 
have a problem to solve.

Cheers,

Mike

Sent from my iPad

On 30 Mar 2022, at 18:23, Raul Miller <[email protected]> wrote:

On Wed, Mar 30, 2022 at 9:05 AM 'Michael Day' via General
<[email protected]> wrote:
     #q=:gethttp 'https://code2.jsoftware.com/' 715
  0
...
So a different result,  but perhaps not what's expected.
Is something still amiss,  or have I misunderstood (again!)?
Well.. there's several things going on here. But, since you asked...
bear with me while I try to answer:

(1) You have a 715 on your line there, which I think was not a part of
your session. I shall ignore it for that reason.

(2) If you visit  https://code2.jsoftware.com/ in your web browser,
you will see that it does not display that page, but instead sends you
to another page. This is a "redirect" -- an artifact of the https
protocol (and the http protocol which it is based on), which is used
by administrators of the web content (basically librarians, though of
course with computers implementing the details of document retrieval).
There's a lot of detail which your browser can make available to you,
relevant to this issue. But if you are interested we should probably
take that tangent to chat.

(3) You did not need to reload web/gethttp every time you changed
ca-bundle.crt, because web/gethttp is a "wrapper" for an operating
system call for the routine which retrieves the document, and that
routine (curl, here, maybe wget for osx or whatever). And, anyways,
each time curl gets used, it would load ca-bundle.crt afresh.

The next part of my response assumes you are using curl (which depends
on which "you" you are):

(4) You can see the http redirect headers using curl's -I option:

   #h=:'-I' gethttp 'https://code2.jsoftware.com/'
773
   pfx=: LF,'Location: '
   (#pfx)}.h {~ ({:(+i.)-/),(I.LF=h) ([ {~ 1 0+/I.) I.pfx E.&tolower h
https://code2.jsoftware.com/mediawiki/index.php/Main_Page

(5) You can get the actual target content either using that Main_Page
url, or by asking curl to follow the redirect. For example:

   #t=:'-sSL' gethttp 'https://code2.jsoftware.com/'
19353

For more detail on how gethttp works, you might want to inspect it and
its comments using  open'web/gethttp'  under jqt.

Also, the web/gethttp addon has been updated with a current
ca-bundle.crt so updating your addons in J's package manager would fix
this issue for you if you had not already done so.

I hope this helps,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to