As I was telling Grubba the other day, HTTPS client support seems to be broken in Pike 7.6.
This simple program:
int main() { Standards.URI uri = Standards.URI("https://www.verisign.com/"); Protocols.HTTP.Query q = Protocols.HTTP.get_url(uri); write("Status => %d\n", q->status); write("Data => %d bytes\n", sizeof(q->data())); return 0; }
works just fine in Pike 7.4, but in 7.6 it gets stuck in the call to q->data(), with an endless repition of the following syscalls:
gettimeofday({1114376339, 401883}, NULL) = 0 poll([{fd=11, events=POLLIN|POLLRDNORM}, {fd=9, events=POLLIN|POLLOUT|POLLRDNORM|POLLWRNORM, revents=POLLIN|POLLOUT|POLLRDNORM|POLLWRNORM}], 2, -1) = 1 gettimeofday({1114376339, 402005}, NULL) = 0 read(9, "", 8192) = 0
Mast?
Pike trace (level 1):
- sslfile.pike:672: 1059aafc->_sizeof() - sslfile.pike:672: 1059aa98->set_write_callback(SSL.sslfile(Fd(9))->ssl_write_callback) - module.pmod:1097: 1059aa98->set_write_callback(Stdio.File("socket", "65.205.249.60:443", 777 /* fd=9 */)->__stdio_write_callb... - -: 1059aac0->set_write_callback(Stdio.File("socket", "65.205.249.60:443", 777 /* fd=9 */)->__stdio_write_callb... - sslfile.pike:672: 1059aa98->set_read_callback(SSL.sslfile(Fd(9))->ssl_read_callback) - module.pmod:1087: 1059aa98->set_read_callback(Stdio.File("socket", "65.205.249.60:443", 777 /* fd=9 */)->__stdio_read_callback) - -: 1059aac0->set_read_callback(Stdio.File("socket", "65.205.249.60:443", 777 /* fd=9 */)->__stdio_read_callback) - sslfile.pike:672: 1059aa98->set_close_callback(SSL.sslfile(Fd(9))->ssl_close_callback) - sslfile.pike:672: 1059aae8->local_backend(0) - sslfile.pike:672: 1059abd8->`()(0) - -: 1059aa98->__stdio_read_callback() - module.pmod:815: 1059aa98->errno() - module.pmod:147: 1059aa98->errno() - -: 1059aac0->errno() - module.pmod:844: 1059aa98->read(8192,1) - -: 1059aac0->read(8192,1) - module.pmod:866: 1059aa98->set_read_callback(0) - -: 1059aac0->set_read_callback(0) - module.pmod:870: 1059aa98->___close_callback(0) - module.pmod:870: 1059aae8->ssl_close_callback(0) - sslfile.pike:1765: 1059aa98->errno() - module.pmod:147: 1059aa98->errno() - -: 1059aac0->errno() [Da capo]
Another interresting fact: If I try trace level 2 or higher, the script no longer compiles... (Message: "Index 'get_url' not present in module 'HTTP'.")
Thanks, fixed. sslfile bothers so much about hair-splitting callback sequencing border cases that it misses the plain obvious things in the simplest blocking situations. :P
(The most usable tracing for ssl related bugs is probably produced by -DSSL3_DEBUG, btw.)
pike-devel@lists.lysator.liu.se