Commits
- Commit:
54764e41a11e16a56da805313f209a9937c5173d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
send the reply code and meta in a single imsg
- Commit:
0388b56b659378d06da4d3ae5b44ec1b11d53374
- From:
- Omar Polo <op@omarpolo.com>
- Date:
net: switch to new imsg apis
- Commit:
186a1eec82f03f9e24c4095c0a31f4a10de19c88
- From:
- Omar Polo <op@omarpolo.com>
- Date:
inline a goto err
- Commit:
b07d2757b848245032749fb16d7a4ab6f360d7f4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rework net_read() a bit
- don't stop after parsing the header
maybe there's some page data in the buffer, let's try to forward it
immediately too.
- use a local buffer plus bufferevent_read()
- Commit:
c24b14ad282967165c7a76de548f622365fa447f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use the new imsg_get_data() in a few places
- Commit:
5657662f9f60baa58e29c8c34dbd0c68cc784790
- From:
- Omar Polo <op@omarpolo.com>
- Date:
net: don't need a uri, just host and port fields
While here, make 'em dinamically allocated.
- Commit:
c6e37ffde911f0a5e1a09ff309d347497c7a1d2e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
s/IMSG_GET_RAW/IMSG_GET and gc unused IMSG_GET_FILE
- Commit:
0640b55566b66eb28c4c16f22c10e47b58207394
- From:
- Omar Polo <op@omarpolo.com>
- Date:
re-group the handling of imsgs
while here also do more validation in IMSG_GET_RAW and add a missing
NULL check in the return type of req_by_id in the IMSG_CERT_STATUS.
- Commit:
612d2546ec8bfffdcab59f3a7069c6bf664a0ee4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
sync request size with telescope.h
- Commit:
4e28261d344ccc1d8732379ed36b87f6041d538c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
get rid of some ifdefs
just declare the same function in the two branches of #if HAVE_ASR_RUN
to avoid further #ifs
- Commit:
12b8028458880ff002c13e2fc82398e6358ffdb6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
avoid unnecessary else
- Commit:
2755163381207edb50e1db495c9994f88471433c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
handle mark_nonblock_cloexec failure
- Commit:
ee0aac2f009a841246854bc189070f07803d0d2e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
work around macos lack of SOCK_CLOEXEC / SOCK_NONBLOCK
rework mark_nonblock so it sets the cloexec flag too and use it in
control.c to avoid these flags. (which are expected to become available
on a future revision of POSIX and are already widely available.)
It's not an issue for telescope to do the socket/accept + fcntl dance
because there aren't threads that can fork(2) (there are no threads at
all!)
reported by @sikmir at github
https://github.com/omar-polo/telescope/commit/59ef79dd19611c7846b00427e6f2267c748ae290#r74498414
- Commit:
0e49c9bbcbfef05d5bdf9ad6d851f51fe25c2eaa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gemini_parse_reply: return code and don't close connection
clang static analyzer found a possible use after free: if the code is
not 2X in gemini_parse_reply we call close_conn. Then, in net_read we
set req->done_header, but req may have been free'd!
Actually, this is almost impossible to trigger. close_conn never ends
up calling free(req) on its first try, because tls_close takes a while
and is rescheduled by libevent. (The check req->ctx != NULL in
close_conn is always true if it's a gemini request.)
Nevertheless, it's clear to move close_conn out of gemini_parse_reply
and simply return the response code: it feels wrong that a "parsing
function" takes logic decisions.
- Commit:
3591e6dbd5cf94dae2b0a438542bf542ae094c01
- From:
- Omar Polo <op@omarpolo.com>
- Date:
declare data as uint8_t *; pointer arith on void * is a GNU extension