Update of /cvsroot/monetdb/pathfinder/compiler
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19588/compiler
Modified Files:
Tag: XQuery_0-16
compile.c
Log Message:
added the admin SOAP module, with which MXQ can be administered over SOAP
compiler/compile.c
- fixed support for xrpc:// to distinguish between remapped
GET requests (ie those that do fn:doc()) and normal
GET requests (ie file serving). Based on file extension..
compiler/mil/milprint_summer.c
- fix in time_shred bokkeeping (do not use :+= for the dead-code elim)
- fix in fn:put (iter's are oids)
- added support for document management functions (dm PROC name prefix)
runtime/pathfinder.mx:
- separated out index flush PROC (_runtime_flush())
- added support for document managemnt functions (catch dm PROC name prefix)
- fix printing mode of remapped GET requests
runtime/xrpc_server.mx
- fix pseudo XRPC message generated for remapped GET requests
- fix HTTP document root initialization
- export xrpc_port such that PFurlcache can see it
Index: compile.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/compile.c,v
retrieving revision 1.96.2.3
retrieving revision 1.96.2.4
diff -u -d -r1.96.2.3 -r1.96.2.4
--- compile.c 15 Feb 2007 01:46:11 -0000 1.96.2.3
+++ compile.c 17 Feb 2007 01:10:37 -0000 1.96.2.4
@@ -184,6 +184,7 @@
} urlcache_t;
urlcache_t *urlcache = NULL;
+int xrpc_port = 80;
/**
* read input file into the url cache
@@ -195,12 +196,28 @@
xmlParserInputBufferPtr buf;
char *ret, url[1024];
- /* support for the xrpc://x.y.z/doc.xml URI naming scheme (maps to
http://x.y.z/xrpc/doc.xml) */
+ /* support for the xrpc://x.y.z/URI naming scheme (maps to
http://x.y.z:<xrpc_port>[/xrpc]/URI) */
if (strncmp(uri, "xrpc://", 7) == 0) {
+ char *xrpc = "";
char *p = strchr(uri+7, '/');
- if (p) *p = '0';
- snprintf(url, 1024, "http://%s/xrpc/%s", uri+7, p?(p+1):"");
+ 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 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):"");
if (p) *p = '/';
+ if (q) *q = ':';
} else {
strncpy(url, uri, 1024);
}
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins