Commits


unfrozen by default it seems that we can "melt" :P the evbuffer from the start to avoid the unfreeze/freeze dance


buffer is frozen; drain becomes a NOP


fix bufferevent tls I/O on libevent2 on libevent2 we need to wrap evbuffer_add with evbuffer_freeze/evbuffer_unfreeze. Not sure exactly why, probably because we're doing some evbuffer_enable/disable/enable-again. Retain compatibility with the custom libevent1 in base on OpenBSD.


drain read buffer before EOF


initial gopher support


support finger:// urls!


fix possible overflow sizeof(buf) should be equal to howmuch, otherwise we may end up reading with tls_read out of bounds and corrupting the stack.


move struct req declaration up avoid a dummy `struct req;'


re-align declarations


reorder


drop req_by_id_req, allow req_by_id to return NULL


drop setup_tls


wrap some long lines


deallocate memory before exiting it's not really required, we're gonna quit anyway, but it's cleaner and helps reducing the clutter when using leak detection tools.


refactor net code Generalize a bit the flow. Expect a request to be written and a body to be sended with net_send_ui. This will make easier to add other protocols like finger or gopher in the future. Also, switch to evbuffer instead of manually calling tls_read/write: with evbuffers we can abstract over the actual I/O routine and just read/write buffers in memory. This too will help with adding more protocols.