Merge pull request #4100 from urbit/m/webslog-cords

vere: webslog atom tanks, and webflogs
This commit is contained in:
fang 2020-12-08 14:06:56 +01:00 committed by GitHub
commit 69264f341f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -1936,7 +1936,13 @@ _http_stream_slog(void* vop_p, c3_w pri_w, u3_noun tan)
u3_weak data = u3_none;
if ( c3y == u3a_is_atom(tan) ) {
data = u3nt(u3_nul, u3r_met(3, tan), u3k(tan));
u3_noun lin = u3i_list(u3i_string("data:"),
u3k(tan),
c3_s2('\n', '\n'),
u3_none);
u3_atom txt = u3qc_rap(3, lin);
data = u3nt(u3_nul, u3r_met(3, txt), txt);
u3z(lin);
}
else {
u3_weak wol = u3_none;

View File

@ -366,13 +366,19 @@ _lord_plea_slog(u3_lord* god_u, u3_noun dat)
static void
_lord_plea_flog(u3_lord* god_u, u3_noun dat)
{
u3_pier* pir_u = god_u->cb_u.ptr_v;
if ( c3n == u3a_is_atom(dat) ) {
return _lord_plea_foul(god_u, c3__slog, dat);
return _lord_plea_foul(god_u, c3__flog, dat);
}
c3_c* tan_c = u3r_string(dat);
u3C.stderr_log_f(tan_c);
c3_free(tan_c);
if ( 0 != pir_u->sog_f ) {
pir_u->sog_f(pir_u->sop_p, 0, u3k(dat));
}
u3z(dat);
}