Commits
- Commit:
723721e290eec4393f8cad56a6bb38ca9fd379c7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: use 'more' for the tag listing too
prodded by stsp and jamsek; ok stsp@
- Commit:
4921c182c938f7e109ed3f516cc6249ff7d676bc
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: render less tags in the summary page
suggested / ok stsp
- Commit:
ac15152e219bed9c7f41007a39c3cbce83ea9386
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: render READMEs in the tree view
ok tracey@
- Commit:
7f65bb55b8cfe0f964fd7cb845acfbc28621730e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: add patch action to serve diffs in plain text
ok tracey@
- Commit:
6e0942f6979a3751280659736d0c8252253c6136
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: inline and remove IMSG_SIZE_CHECK()
I always find confusing if IMSG_SIZE_CHECK() takes pointers or not,
and we had at least a few instances of wrong usages, so inline (with
exact size checks) and remove the macro.
ok stsp@
- Commit:
1632f50aca5cd94ed681c20fc18c2b8ab4857b9c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove the gotwebd repository cache
It only had 4 slots so was never quite useful, and sharing of sock->pack_fds
across cached repositories seems problematic.
with help from + ok op@
- Commit:
9ec8edf7c3ed58660d5ce984a55bbafbd9a23fb9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: define constant instead of using the magic number 3
suggested by stsp@
- Commit:
26678adde25a1fb7fa3e4b78c82a888cc3b767e4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: get rid of proc.[ch]
proc.c really shines when there's a network of different types of
processes, potentially with a various number of instances each,
that needs to exchange messages. Gotwebd instead has a much simpler
design, and using proc.c causes more overhead (/headaches) than it
solves.
So, this attempts to provide the same functionalities but with a
much simpler implementation that fits gotwebd better.
ok stsp@
- Commit:
03e70dd4d41906645718ee5b780d7e948404f292
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: improve gotwebd_assign_querystring()
This prevents the issues that we just hit with forgetting to remove
PREVID: instead of relying on the enum value to yield the size of
a table, use nitems(). Also, quit as soon as the matching key was
found, no need to iterate further.
ok stsp@
- Commit:
296611672d3a242111a160c45afb7ac81a01b326
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: garbage-collect PREVID, removed long time ago
This leftover kept QSELEM__MAX bigger than the querystring_keys[]
table and causes gotweb_assign_querystring to go out of bounds.
Spotted on alpine (thanks to -portable.)
- Commit:
0c64c2f8032e7c3de8b5b3ca5c5bd9047b89b17c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: clean up sockets_create_socket a bit
Instead of hardcoding the flags, keep ai_{family,socktype,protocol}
from the getaddrinfo() call and apply them here.
ok stsp@
- Commit:
cdfd248aa718819d40d0bf972b7efbb2eabd31c9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotadmin: get rid of got_sockaddr.[ch] usage
It was added due to gotwebd weird structure sockaddr_storage handling.
Instead, save the size reported by getaddrinfo() and not reach into
the struct sockaddr_storage at all (except for extracting the port
number for diagnostics purposes.)
sockets_conf_new_socket_fcgi() gets an hardcoded ipproto to zero
(which is the only value it can get in practice, and keeps for the
moment the hardcoded SOCK_STREAM. It'll be cleaned in a follow-up.
ok stsp@
- Commit:
c5e111b920bf4b059fe47aa7dcee5630ad5c3363
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: merge host() and get_addrs(); use * instead of "" for any addr
ok plus tweaks stsp@
- Commit:
7781b9910fcbba579c2e112bbfdea73a64ccad70
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: render all the datetimes in a time tag
fixes an unused variable that should have been dropped in previous
commit too.
ok stsp@
- Commit:
bf26a633636ba2058b6bb747b0dd4ab17cb185a8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: inline the only use of TM_RFC822
- Commit:
62eab86e6a1d5aea8a1bf90999c3c058b9aedd07
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: move the buffering from the fastcgi layer to the template
Reduces the indirection in fcgi.c, starts to make the struct template
opaque, simplifies the template usage. All with a net negative :-)
reads fine to stsp@ (thanks!)
- Commit:
c8af7691c98d6cd5864e6c2b62642c6c3e3ca086
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify gotwebd' server matching
Currently, if there is not a match on the server name, it attempts
to match the "subdomain" against the server names, and fall back
to the first server defined.
The server name is taken from the SERVER_NAME fastcgi' parameter,
the subdomain extracted from HTTP_HOST.
Keep only the SERVER_NAME matching, but still use the first server
defined if there's no match.
Fix the manpage documenting how matching works and drop the lie
about SNI as gotwebd doesn't do TLS but just looks at what the
upstream http server decided.
ok stsp@
- Commit:
23c35dae297d2eecd13e17118a547761314a578d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
change got_get_repo_tags' limit argument to size_t
The function already carefully avoids wrapping around zero. While
here add a sanity check for limit == 0, like what was previously done
for got_get_repo_commits().
- Commit:
0a2fc48663670b6fb1a778aafc653227c9103442
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: make got_get_repo_commits take a size_t
and while here make sure 0 is rejected.
requested by, improvements and ok stsp@
- Commit:
1adf41e8089257344579fba9c7e03d7ebc0c15b8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: drop unused `prefixlen' from struct address
ok stsp@
- Commit:
c034b06627303c06e0d334eeaf3d36bc3da74325
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix the size of gotwebd's array of tempfiles used for deltas
Prevents ftruncate() errors due to bogus file descriptors passed from
gotwebd once the repository layer runs out of temporary files to use
for deltas. Have gotwebd open the maximum amount of required temporary
files for now. A proper fix which scales to lower ulimit -n settings can
be implemented later.
Problem reported by patrick@
- Commit:
24a4d8019b7b2937f03fc86f47048f599ec6617c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename got_gotweb_flushfile -> got_gotweb_closefile
suggested and ok millert@
- Commit:
18069c98fe9366115c4daff243a6c0afe5069d3c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify got_gotweb_openfile/flushfile
Return only the FILE *, and require only that to close subsequently.
Having to manage the file descriptor too makes using these functions
unnecessary complex.
millert@ agrees
- Commit:
8f37175d25c1d0451e8296399000433f716d8218
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: reply with non-200 HTTP status code on error
ok tracey@
- Commit:
df2d3cd2545e0a1579ce83ae137e52135755ed1f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: provide gotweb_render_page() entrypoint for all pages
simplify gotweb_process_request more, handling all the pages
inside the big switch. There's only one entrypoint for rendering
the templates gotweb_render_page() that takes the page' content
as argument.
The only real difference is that gotweb_render_index() now skips
directory entries which fails to handle.
ok tracey@