General APL language issues


Postby crishog on Sun Dec 10, 2017 3:48 pm

I've been playing around some more with HttpCommand.Get

I found a case were the link was being redirected with a 301 in the header, but Get wasn't retrieving the new page. It turns out that there was some "junk" as the data content, which didn't match the "content-length" in the header. HttpCmd kept trying again until the server gave up sending.

I fixed this by adding

done∨←302 301∨.=toNum r.HttpStatus

After line 203, that is, it we are being redirected don't bother with the data payload.

However I've now got a couple of cases where I get a return code of 0, an event of Block or BlockLast (the comment implies that this is pre-Conga 3.0, but I'm playing around under version 16, so I should be running Conga 3.0) but the "dat" returned by LDRC.Wait is zero length.

I can take the URL and paste it into a browser & it works fine. I even get cases where the initial URL is redirected & with my additional line above HttpCmd attempts to retrieve from the new URL & gets a BlockLast with an empty dat.If I pass in the redirected URL it just returns a code of 0, event of Block and an empty dat

Not really sure why some URLs are returning empty data, but giving sensible looking return codes & events.
Posts: 55
Joined: Mon Jan 25, 2010 9:52 am

Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest