Performed a bunch of markup fixes suggested by validator.w3.org
[citadel.git] / webcit / paramhandling.c
index d5fff13e467326c79190c7024a43d280d0f1dd80..3d12c376c18f6921efbee630bd56d0f8a5a8a766 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * parse urlparts and post data
  */
 
@@ -56,7 +54,7 @@ void ParseURLParams(StrBuf *url)
                        continue;
                }
                
-               if (strncmp(u->url_key, HKEY("__")) != 0)
+               if (strncmp(u->url_key, "__", 2) != 0)
                {
                        Put(WCC->Hdr->urlstrings, u->url_key, keylen, u, free_url);
                        len = bptr - aptr;
@@ -310,7 +308,7 @@ void upload_handler(char *name, char *filename, char *partnum, char *disp,
        long keylen;
 
 #ifdef DEBUG_URLSTRINGS
-       lprintf(9, "upload_handler() name=%s, type=%s, len=%d\n", name, cbtype, length);
+       lprintf(9, "\033[31mupload_handler() name=%s, type=%s, len=%d\033[0m\n", name, cbtype, length);
 #endif
        if (WCC->Hdr->urlstrings == NULL)
                WCC->Hdr->urlstrings = NewHash(1, NULL);
@@ -322,7 +320,7 @@ void upload_handler(char *name, char *filename, char *partnum, char *disp,
                keylen = safestrncpy(u->url_key, name, sizeof(u->url_key));
                u->url_data = NewStrBufPlain(content, length);
                
-               if (strncmp(u->url_key, HKEY("__")) != 0)
+               if (strncmp(u->url_key, "__", 2) != 0)
                {
                        Put(WCC->Hdr->urlstrings, u->url_key, keylen, u, free_url);
                }
@@ -342,13 +340,15 @@ void upload_handler(char *name, char *filename, char *partnum, char *disp,
 #endif
        }
 
-       /** Uploaded files */
+       /* Uploaded files */
        if ( (length > 0) && (!IsEmptyStr(cbtype)) ) {
                WCC->upload = NewStrBufPlain(content, length);
                WCC->upload_length = length;
                WCC->upload_filename = NewStrBufPlain(filename, -1);
-               safestrncpy(WCC->upload_content_type, cbtype,
-                           sizeof(WC->upload_content_type));
+               safestrncpy(WCC->upload_content_type, cbtype, sizeof(WC->upload_content_type));
+#ifdef DEBUG_URLSTRINGS
+               lprintf(9, "File: <%s> len: [%ld]\n", filename, length);
+#endif
                
        }
 
@@ -419,16 +419,16 @@ void diagnostics(void)
 {
        output_headers(1, 1, 1, 0, 0, 0);
        wc_printf("Session: %d<hr />\n", WC->wc_session);
-       wc_printf("Command: <br /><PRE>\n");
+       wc_printf("Command: <br><PRE>\n");
 /*     
 StrEscPuts(WC->UrlFragment1);
-       wc_printf("<br />\n");
+       wc_printf("<br>\n");
        StrEscPuts(WC->UrlFragment2);
-       wc_printf("<br />\n");
+       wc_printf("<br>\n");
        StrEscPuts(WC->UrlFragment3);
 */
        wc_printf("</PRE><hr />\n");
-       wc_printf("Variables: <br /><PRE>\n");
+       wc_printf("Variables: <br><PRE>\n");
        dump_vars();
        wc_printf("</PRE><hr />\n");
        wDumpContent(1);