]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/http.c
Click on a user or their avatar to go to their profile from the forum view
[citadel.git] / webcit-ng / http.c
index a16e7c5af7ac99122aaef7ae34631a87463e0f13..bf535876f9b61dada8df654b65c2a1cfeaad06c4 100644 (file)
@@ -172,7 +172,9 @@ void perform_one_http_transaction(struct client_handle *ch) {
                                kv.key = strdup(tok);
                                kv.val = strdup(eq);
                                array_append(h.request_parms, &kv);
+#ifdef DEBUG_HTTP
                                syslog(LOG_DEBUG, "\033[1m\033[33m| %s = %s\033[0m", kv.key, kv.val);
+#endif
                        }
                }
        }
@@ -197,7 +199,9 @@ void perform_one_http_transaction(struct client_handle *ch) {
                syslog(LOG_DEBUG, "Client disconnected");
        }
        else {
+#ifdef DEBUG_HTTP
                syslog(LOG_DEBUG, "\033[33m\033[1m< %s %s\033[0m", h.method, h.url);
+#endif
 
                // If there is a request body, read it now.
                char *ccl = header_val(&h, "Content-Length");
@@ -229,7 +233,9 @@ void perform_one_http_transaction(struct client_handle *ch) {
                #endif
 
                // Output the results back to the client.
+#ifdef DEBUG_HTTP
                syslog(LOG_DEBUG, "\033[33m\033[1m> %03d %s\033[0m", h.response_code, h.response_string);
+#endif
                client_printf(ch, "HTTP/1.1 %03d %s\r\n", h.response_code, h.response_string);
                client_printf(ch, "Connection: close\r\n");
                client_printf(ch, "Content-Length: %ld\r\n", h.response_body_length);