make check failure, internet.Rout.fail, Error in strsplit
On Feb 12, 2007, at 6:28 PM, Paul Lynch wrote:
I'm trying to build R on RedHat EL4. The compile went fine, but a make check ran into a problem and produced a file "internet.Rout.fail". Judging by the last part of that file, it was trying to run an R routine called "httpget" to retrieve the URL http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat. The precise error it encountered was: Error in strsplit(grep("Content-Length", b, value = TRUE), ":")[[1]] : subscript out of bounds So, it looks like the data it read from that URL was not what was expected. I tried mimicking the script's request of the header information for that URL, and got back the following header lines: HTTP/1.1 200 OK Date: Mon, 12 Feb 2007 23:22:06 GMT Server: Apache/2.0.40 (Red Hat Linux) Last-Modified: Fri, 19 May 1995 10:27:04 GMT ETag: "7bc27-836-39a78e00" Accept-Ranges: bytes Content-Type: text/plain; charset=ISO-8859-1 Content-length: 2102 Connection: Keep-Alive The script appears to be looking for a "Content-Length" field, but as you can see the returned header is "Content-length" with a lower-case l. I don't know R yet, so I'm not sure if the grep in the test code is case-sensitive or not, but if it is, that would seem to be the problem. But then, surely everyone would be hitting this error?
The grep is indeed case sensitive, as a quick test can show. However, the header I got back when I tried the above address had Length in it: HTTP/1.1 200 OK Date: Tue, 13 Feb 2007 01:40:48 GMT Server: Apache/2.0.40 (Red Hat Linux) Last-Modified: Fri, 19 May 1995 10:27:04 GMT ETag: "7bc27-836-39a78e00" Accept-Ranges: bytes Content-Length: 2102 Content-Type: text/plain; charset=ISO-8859-1 X-Pad: avoid browser bug ( I used curl for this, if it makes a difference) Hope this helps in some way.
--Paul
Haris