On Oct 2, 2009, at 7:04 PM, Jamie Dumbill wrote:
> Is anyone aware of a comprehensive list of error messages. I've seen
> this list https://code.kx.com/trac/wiki/errors but I'm getting a
> `close error when making a http request to GET a csv from yahoo. The
> code I'm using is:
>
> quote:`:http://download.finance.yahoo.com "GET /d/quotes.csv?
> s�PL&f=sl1d1t1c1ohgv&e=.csv, http/1.1
>
host:download.finance.yahoo.com
"
on my machine, your code sort of works:
% q
KDB+ 2.6 2009.09.15 Copyright (C) 1993-2009 Kx Systems
m32/ 2()core 2048MB
q)quote:`:http://download.finance.yahoo.com "GET /d/quotes.csv?
s�PL&f=sl1d1t1c1ohgv&e=.csv, http/1.1
host:download.finance.yahoo.com
"
q)quote
"HTTP/1.1 200 OK
Date: Fri, 02 Oct 2009 17:55:55 GMT
P3P:
policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi..
q)"
"vs quote
"HTTP/1.1 200 OK"
"Date: Fri, 02 Oct 2009 17:55:55 GMT"
"P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR
CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi
UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA P..
"Cache-Control: private"
"Content-Type: application/octet-stream"
""
""
q)
so i seem to be getting headers, but no data
fwiw, under a different network setup, i saw the code fail completely,
but with a 'chunk error (also undocumented) instead
regarding the error you see, some errors are bubbled up from the
underlying C calls, so 'close might correspond to the "Connection
closed by foreign host" in the following telnet transcript
have you verified that issuing the commands directly through telnet
works on this machine?
% telnet download.finance.yahoo.com 80
Trying 69.147.86.169...
Connected to download.finance.fy6.b.yahoo.com.
Escape character is '^]'.
GET /d/quotes.csv?s�PL&f=sl1d1t1c1ohgv&e=.csv, http/1.1
host:download.finance.yahoo.com
HTTP/1.1 200 OK
Date: Fri, 02 Oct 2009 17:38:33 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Cache-Control: private
Content-Type: application/octet-stream
"AAPL",185.1781,"10/2/2009","1:23pm",
+4.3182,181.38,185.88,181.35,13468209
Connection closed by foreign host.
%