Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Help...weird error reading from an url.

From: gavin:mckenzie:sympatico:ca at: 6-Nov-2001 17:20

This is odd...I'm running Core 2.5.0.3.1 and I'm reading from an url corresponding to a document on my local web server...and I get a bad error: [Note: I've set net-watch to true to get a better trace of what's going on]
>> read http://localhost/projects/foo/data-text-handling/
URL Parse: none none localhost none projects/foo/data-text-handling/ none Net-log: ["Opening tcp for" HTTP] connecting to: localhost Net-log: {GET /projects/foo/data-text-handling/ HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL 2.5.0.3.1 Host: localhost } Net-log: "HTTP/1.1 " ** Script Error: Out of range or past end ** Where: func [][ response-line: system/words/pick port/sub-port 1 net-utils/net-log response-line either none? response-line [do error] [ either none? result: select response-actions response-code: to-integer second parse response-line none [ do error] [ do get result] ] ] ** Near: either none? result: select response-actions Argh....there's an index.html at the end of that directory. But just to be sure...
>> read http://localhost/projects/foo/data-text-handling/index.html
URL Parse: none none localhost none projects/foo/data-text-handling/ index.html Net-log: ["Opening tcp for" HTTP] connecting to: localhost Net-log: {GET /projects/foo/data-text-handling/index.html HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL 2.5.0.3.1 Host: localhost } Net-log: "HTTP/1.1 " ** Script Error: Out of range or past end ** Where: func [][ response-line: system/words/pick port/sub-port 1 net-utils/net-log response-line either none? response-line [do error] [ either none? result: select response-actions response-code: to-integer second parse response-line none [ do error] [ do get result] ] ] ** Near: either none? result: select response-actions If I try reading the index.html from the directory above it, /projects/foo/, everything is ok:
>> read http://localhost/projects/foo/
URL Parse: none none localhost none projects/foo/ none Net-log: ["Opening tcp for" HTTP] connecting to: localhost Net-log: {GET /projects/foo/ HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL 2.5.0.3.1 Host: localhost } Net-log: "HTTP/1.1 200 OK" Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] == {<BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <!-- #BeginLibraryItem "/Library/Core Tech Small Header.lbi" --> <script language="Java... The only difference I can see from the net-watch info is that when there is an error the last message prior to the error is: Net-log: "HTTP/1.1 " vs. when it works ok: Net-log: "HTTP/1.1 200 OK" Is the lack of the "200 OK" the culprit or a red-herring? In a website that contains lots of docs, why would I not be able to read the index.html pages out of the directories under /project/foo/ ? FYI: Web server is IIS 5.0, and all pages are being pre-processed by erebol.r as "Rebol Server Page"s. Any help is much appreciated. Gavin.