commit - 08d2220082cf5c8cc474a6621fe3bfa63c9aa277
commit + 58022b948f64ce405f6aa71993ee1af6cf5187e6
blob - d38f3dcbcaf3d10e3d4da1ad55b2a53a5d46a785
blob + 4d885b65be0ee5d2d4417410f60346802c9ee227
--- fcgi.c
+++ fcgi.c
free(clt->clt_server_name);
if ((clt->clt_server_name = strdup(server)) == NULL)
return (-1);
- log_debug("clt %d: server_name: %s", clt->clt_id,
+ DPRINTF("clt %d: server_name: %s", clt->clt_id,
clt->clt_server_name);
continue;
}
if (clt->clt_script_name == NULL)
return (-1);
- log_debug("clt %d: script_name: %s", clt->clt_id,
+ DPRINTF("clt %d: script_name: %s", clt->clt_id,
clt->clt_script_name);
continue;
}
if (clt->clt_path_info == NULL)
return (-1);
- log_debug("clt %d: path_info: %s", clt->clt_id,
+ DPRINTF("clt %d: path_info: %s", clt->clt_id,
clt->clt_path_info);
continue;
}
if ((clt->clt_query = strdup(query)) == NULL)
return (-1);
- log_debug("clt %d: query: %s", clt->clt_id,
+ DPRINTF("clt %d: query: %s", clt->clt_id,
clt->clt_query);
continue;
}
fcgi->fcg_want = FCGI_RECORD_BODY;
bufferevent_read(bev, &hdr, sizeof(hdr));
-#ifdef DEBUG
- log_warnx("header: v=%d t=%d id=%d len=%d p=%d",
+ DPRINTF("header: v=%d t=%d id=%d len=%d p=%d",
hdr.version, hdr.type,
CAT(hdr.req_id0, hdr.req_id1),
CAT(hdr.content_len0, hdr.content_len1),
hdr.padding);
-#endif
if (hdr.version != FCGI_VERSION_1) {
log_warnx("unknown fastcgi version: %d",
blob - 780ecc4358beca7c292d1792d131340fec64f4aa
blob + f1018797e482f4e51f445825c3a78d6136a57f46
--- galileo.h
+++ galileo.h
#define GEMINI_MAXLEN (1024 + 1) /* NULL */
#define FORM_URLENCODED "application/x-www-form-urlencoded"
+#ifdef DEBUG
+#define DPRINTF log_debug
+#else
+#define DPRINTF(x...) do {} while (0)
+#endif
+
enum {
METHOD_UNKNOWN,
METHOD_GET,