Paul Lynch
2007-Feb-12 23:28 UTC
[R] make check failure, internet.Rout.fail, Error in strsplit
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? Can anyone offer some suggestions as how to proceed from here? Thanks, --Paul
Charilaos Skiadas
2007-Feb-13 01:43 UTC
[R] 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.> --PaulHaris
Paul Lynch
2007-Feb-13 20:44 UTC
[R] make check failure, internet.Rout.fail, Error in strsplit
I just happen to also have a MacOS 10.4 machine, but when I tried from there, I still got "Content-length". Anyway, I am fairly certain that headers received from web servers would not be modified by the receiving machine or anything in-between. I suspect that the machine at www.stats.ox.ac.uk, even though we see it as the same IP, must be doing some sort of load balancing, probably on the basis of our IP addresses, and sending our requests to different servers. If this is correct, then it would seem that the test code for this part of the "make test" should be modified to do the grep in a case-insensitive way, or at the very least to support "Content-length." I guess the next thing to do would be to submit a bug report. Thanks a lot for helping me look into this problem, --Paul On 2/13/07, Charilaos Skiadas <skiadas at hanover.edu> wrote:> On Feb 13, 2007, at 11:16 AM, Paul Lynch wrote: > > > Thanks for giving it a try. It is very odd that you got > > "Content-Length" when I am getting "Content-length". I just tried > > curl (I had been using telnet to port 80) and I got the same (error > > causing) "length" result: > > > > Perhaps we are hitting different web servers? I ran nslookup on > > www.stats.ox.ac.uk, and it appears to be an alias for > > web2.stats.ox.ac.uk. Is that the machine you are getting? > > I get: > Server: 192.200.129.190 > Address: 192.200.129.190#53 > > Non-authoritative answer: > www.stats.ox.ac.uk canonical name = web2.stats.ox.ac.uk. > Name: web2.stats.ox.ac.uk > Address: 163.1.210.2 > > > What > > happens if you run curl against web2, i.e.: > > > curl --head http://web2.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat > > > > ? > > (I get "Content-length"). > > I get Content-Length. > > I'm on MacOSX 10.4.8, don't know if that makes any difference. > > > Thanks, > > --Paul > > Haris > > >