Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/compiler compile.c, 1.96.2.4, 1.96.2.5
On Fri, Mar 09, 2007 at 01:27:44PM +0000, Peter Boncz wrote:
Update of /cvsroot/monetdb/pathfinder/compiler In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5468/compiler
Modified Files: Tag: XQuery_0-16 compile.c Log Message: FIX #1677094: compiler warning an weird 'sigmod' code in mps
(plus, some minor xprc stuff)
Index: compile.c =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/compile.c,v retrieving revision 1.96.2.4 retrieving revision 1.96.2.5 diff -u -d -r1.96.2.4 -r1.96.2.5 --- compile.c 17 Feb 2007 01:10:37 -0000 1.96.2.4 +++ compile.c 9 Mar 2007 13:27:42 -0000 1.96.2.5 @@ -196,26 +196,17 @@ xmlParserInputBufferPtr buf; char *ret, url[1024];
- /* support for the xrpc://x.y.z/URI naming scheme (maps to http://x.y.z:
[/xrpc]/URI) */ + /* support for the xrpc://x.y.z/URI naming scheme (maps to http://x.y.z: /URI) */
Hi Peter, I don't understand this change. With "/xrpc" the request will be directed to our own file request handler which retrieves 'URI' from MXQ, instead of from disk. What is your intention here? Jennie
if (strncmp(uri, "xrpc://", 7) == 0) { - char *xrpc = ""; char *p = strchr(uri+7, '/'); char *q = strchr(uri+7, ':'); int port = xrpc_port; - if (p) { - char *suffix = p + strlen(p) - 4; - if (suffix > p && !(strcmp(suffix,".xml") && strcmp(suffix,".XML"))) { - /* GET requests on XML get magically mapped on fn:doc(). Add xrpc/ to URI. */ - xrpc = "/xrpc"; - } /* else: request is simply redirected to xrpc HTTP server (file serving) */ - *p = 0; - } - if (q) { + if (q && (p == NULL || p > q)) { /* if a specific port is omitted, we use the current xrpcd port number */ port = atoi(q+1); *q = 0; } - snprintf(url, 1024, "http://%s:%d%s/%s", uri+7, port, xrpc, p?(p+1):""); + snprintf(url, 1024, "http://%s:%d/%s", uri+7, port, p?(p+1):""); if (p) *p = '/'; if (q) *q = ':'; } else {
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
On Sun, Mar 11, 2007 at 02:39:37PM +0100, Ying Zhang wrote:
On Fri, Mar 09, 2007 at 01:27:44PM +0000, Peter Boncz wrote:
Update of /cvsroot/monetdb/pathfinder/compiler In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5468/compiler
Modified Files: Tag: XQuery_0-16 compile.c Log Message: FIX #1677094: compiler warning an weird 'sigmod' code in mps
(plus, some minor xprc stuff)
Index: compile.c =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/compile.c,v retrieving revision 1.96.2.4 retrieving revision 1.96.2.5 diff -u -d -r1.96.2.4 -r1.96.2.5 --- compile.c 17 Feb 2007 01:10:37 -0000 1.96.2.4 +++ compile.c 9 Mar 2007 13:27:42 -0000 1.96.2.5 @@ -196,26 +196,17 @@ xmlParserInputBufferPtr buf; char *ret, url[1024];
- /* support for the xrpc://x.y.z/URI naming scheme (maps to http://x.y.z:
[/xrpc]/URI) */ + /* support for the xrpc://x.y.z/URI naming scheme (maps to http://x.y.z: /URI) */ Hi Peter,
I don't understand this change. With "/xrpc" the request will be directed to our own file request handler which retrieves 'URI' from MXQ, instead of from disk. What is your intention here?
Jennie
Sorry, I send this e-mail too quickly. I found the answer in later check-in-s. Jennie
if (strncmp(uri, "xrpc://", 7) == 0) { - char *xrpc = ""; char *p = strchr(uri+7, '/'); char *q = strchr(uri+7, ':'); int port = xrpc_port; - if (p) { - char *suffix = p + strlen(p) - 4; - if (suffix > p && !(strcmp(suffix,".xml") && strcmp(suffix,".XML"))) { - /* GET requests on XML get magically mapped on fn:doc(). Add xrpc/ to URI. */ - xrpc = "/xrpc"; - } /* else: request is simply redirected to xrpc HTTP server (file serving) */ - *p = 0; - } - if (q) { + if (q && (p == NULL || p > q)) { /* if a specific port is omitted, we use the current xrpcd port number */ port = atoi(q+1); *q = 0; } - snprintf(url, 1024, "http://%s:%d%s/%s", uri+7, port, xrpc, p?(p+1):""); + snprintf(url, 1024, "http://%s:%d/%s", uri+7, port, p?(p+1):""); if (p) *p = '/'; if (q) *q = ':'; } else {
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
participants (1)
-
Ying Zhang