Update of /cvsroot/monetdb/pathfinder/runtime
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6008/runtime
Modified Files:
xrpc_client.mx
Log Message:
fix for changed stream_readline semantics
U xrpc_client.mx
Index: xrpc_client.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_client.mx,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- xrpc_client.mx 8 Jan 2009 16:54:18 -0000 1.55
+++ xrpc_client.mx 22 Sep 2009 10:37:58 -0000 1.56
@@ -745,24 +745,25 @@
/* We only speak HTTP/1.1 */
if( ret < 13 || /* we should have at least "HTTP/1.1 nnn ", 13 chars */
+ /* FIXME: could use strncmp here */
strstr(respStatus, "HTTP/1.1 ") != respStatus ||
respStatus[12] != ' ' ||
- respStatus[ret -1] != '\r' ) { /* the '\n' is not returned by
stream_readline() */
+ respStatus[ret -2] != '\r' ) {
GDKerror("response2bat: invalid response from \"%s:%d\":\n", host,
port);
do{ /* read and print everything we can receive */
- if(respStatus[ret-1] == '\r')
- respStatus[ret -1] = '\0'; /* overwrite '\r' */
+ if(respStatus[ret-2] == '\r')
+ respStatus[ret -2] = '\0'; /* overwrite '\r' */
GDKerror("%s\n", respStatus);
ret = stream_readline(in, respStatus, 1024);
} while (ret > 0);
buffer_destroy(resp);
return NULL;
}
- respStatus[ret -1] = '\0';
+ respStatus[ret -2] = '\0';
do{ /* read the HTTP header and throw it away */
ret = stream_readline(in, resp->buf, 1024);
- if(ret == 1 && resp->buf[0] == '\r')
+ if(ret == 2 && resp->buf[0] == '\r')
ret = 0; /* end-of-HTTP-header found */
} while (ret > 0);
if (ret < 0) {
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins