HTTP interface for version
authorJiří Filipovič <fila@ics.muni.cz>
Fri, 4 Feb 2011 14:32:14 +0000 (14:32 +0000)
committerJiří Filipovič <fila@ics.muni.cz>
Fri, 4 Feb 2011 14:32:14 +0000 (14:32 +0000)
org.glite.lb.server/src/lb_proto.c

index 9d470d8..cad1229 100644 (file)
@@ -674,10 +674,7 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                } 
 
        /* GET /[jobId]: Job Status */
-               else if (*requestPTR=='/'
-                       && strncmp(requestPTR, "/?wsdl", strlen("/?wsdl"))
-                       && strncmp(requestPTR, "/?types", strlen("/?types"))
-                       && strncmp(requestPTR, "/?agu", strlen("/?agu"))
+               else if (*requestPTR=='/' && requestPTR[1] != '?'
                        && strncmp(requestPTR, "/RSS:", strlen("/RSS:")) 
                        && ( strncmp(requestPTR, "/NOTIF", strlen("/NOTIF"))
                             || *(requestPTR+strlen("/NOTIF")) != ':'
@@ -822,6 +819,8 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                         if (edg_wll_WSDLOutput(ctx, &message, filename))
                                 ret = HTTP_INTERNAL;
                        free(filename);
+               } else if (strncmp(requestPTR, "/?version", strlen("/?version")) == 0) {
+                       asprintf(&message, "%s", VERSION);
        /* GET [something else]: not understood */
                } else ret = HTTP_BADREQ;
                free(requestPTR); requestPTR = NULL;