Below is a fragment of code that visits a URL at JickenWings (contained in DCCASE).
It would routinely generate the fail message suggesting a time out or other problem. When I previously mentioned this there was some mention that buffers were more reliable than strings when parsing large pages. I did not follow up on that suggestion at the time because I thought my problem was before parsing and wrote the test code to confirm that. However, it appears that by changing to
it now fetches reliably, first time, every time.
In light of this should the wiki entry be changed to mention that buffer is preferred under some circumstances and possibly the code samples tweaked to reflect that as well?
I suppose I could edit the wiki myself but I am also looking for some confirmation that my experience does indeed generalize.
Thanks.
Code:
caseRes = visit_url(DCCASE);
if (length(caseRes) <= 0) {
print ("Bad return from Jicken Wings.");
caseRes = visit_url(DCCASE);
if (length(caseRes) <= 0) {
abort("Jicken Wings fail twice.");}
Code:
buffer caseRes;
In light of this should the wiki entry be changed to mention that buffer is preferred under some circumstances and possibly the code samples tweaked to reflect that as well?
I suppose I could edit the wiki myself but I am also looking for some confirmation that my experience does indeed generalize.
Thanks.