From b04852fbc4704299bd2563de9e14cdf033c0dd2b Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Thu, 24 Apr 2014 12:42:09 -0700 Subject: [PATCH 1/2] comments, debugging --- f/nash.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/f/nash.c b/f/nash.c index 1586607a5..84b077745 100644 --- a/f/nash.c +++ b/f/nash.c @@ -60,6 +60,7 @@ u2_na_put(struct u2_nash* nash, u2_noun key, u2_noun val) } } } + sot_w = buc_u->con_w; buc_u->con_w++; @@ -75,6 +76,8 @@ u2_na_put(struct u2_nash* nash, u2_noun key, u2_noun val) buc_u->sto_u = nuu_u; } +/* u2_na_get(): get from a nounhash table +**/ u2_weak u2_na_get(struct u2_nash* nash, u2_noun key) { @@ -92,11 +95,18 @@ u2_na_get(struct u2_nash* nash, u2_noun key) return 0; } +/* u2_na_take(): destroy a nounhash table +**/ void u2_na_take(struct u2_nash* nash) { c3_w i; for(i=0; i < nash->cap_w; i++) { +#if 0 + fprintf(stderr, "%s%d%s", nash->sto_u[i].con_w, + 0==i? "[%%nash-pop " :"", + i+1==nash->cap_w? "]\r\n" :" "); +#endif free(nash->sto_u[i].sto_u); } free(nash->sto_u); From de79ff3fead284625908798184a3f1708c578602 Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Thu, 24 Apr 2014 14:08:51 -0700 Subject: [PATCH 2/2] fix cttp: body comes after cr-lf, not before --- v/cttp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v/cttp.c b/v/cttp.c index 4fe95a0b4..bbb77c5dd 100644 --- a/v/cttp.c +++ b/v/cttp.c @@ -1463,9 +1463,9 @@ _cttp_ccon_fire(u2_ccon* coc_u, u2_creq* ceq_u) snprintf(buf_c, 80, "content-length: %u\r\n", ceq_u->bod_u->len_w); _cttp_ccon_fire_str(coc_u, buf_c); - _cttp_ccon_fire_body(coc_u, ceq_u->bod_u); - _cttp_ccon_fire_str(coc_u, "\r\n"); + + _cttp_ccon_fire_body(coc_u, ceq_u->bod_u); } }