Commits
- Commit:
102d840de78061d9f313aaa557ef64f586932143
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
dropping unnecessary strlen()s
ok jamsek, stsp
- Commit:
e19f80400423f0275c9dd785179aa06a3efabab0
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop unused `prefixlen' from struct address
ok stsp@
- Commit:
161663e7ebf5aa10caf7b4048f013d5e45db5fe3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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@
- Commit:
2e9bd5cb1a3122326a3b347a6febc7da047b58ad
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: handle short reads and timeouts
If a short read happens, or if all the fastcgi record to read don't fit
in the buffer, gotwebd fails to continue reading and hits the timeout.
If this happens before gotweb_process_request is called, it will crash
in gotweb_free_transport since c->t will be NULL.
This register the event with EV_PERSIST so fcgi_request is called again
when there's more to read and guards gotweb_free_transport. It also
makes spaces for the records as soon as they're successfully parsed.
With lots of help from stsp
ok stsp@
- Commit:
4fccd2fe0ffbbc668b66abe63614470635f92f1b
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: configure: split out dependencies
Rather than assume all dependencies are required for all programs, split
them out.
This will make packaging easier, as well as splitting the code to use
subprojects.
Note that due to the use of config.h semantics, in most cases the
got_compat.h header file is now at the top of the .c file it is included
in, so that it can handle the system header inclusion properly.
- Commit:
e7e5fa49fc2e589a02ba9a9412a7b8e2377ead68
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: start using the template system
ok tracey@
- Commit:
55e6cffd2185ebe82b0abfbdcd92c49778cc928d
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make gotwebd cache open repository handles in struct server
ok op@
- Commit:
e4c7e0b01e18572d45e9de2ee0fe0be23f11f0f9
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
allow multiple "listen on" statements per server in gotwebd.conf
ok tracey
- Commit:
75716fd6ed1a99a0e601b2820363b17d7c0333a7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: sockets: handle sa_len/ss_len portably
In the sockaddr_storage struct, there can be a ss_len field. This is
seen on some BSDs, but not Linux. Since this isn't POSIX-specific,
there's no guarantee it will be available on all systems.
- Commit:
1f6ec0684239b7d7a1b63040f34db7d348fe5cb7
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
mark functions internally used by sockets.c as static
ok tracey
- Commit:
c19738c9ed1553d21d6acaecb58a6fa9d966b63b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix previous: store port number in host byte order, convert for struct sockaddr
With the previous patch the listen port was correct, but the debug log output
was still displaying the swapped port number. Now both listen behaviour and
debug log output agree.
- Commit:
9d7714e36f114695b3a1737360a6ef12b361860d
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: struct socket_conf can only use a single address, so don't use a list
ok tracey
- Commit:
720c2b0511f6dbff9e2bf529e474143ca8617731
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: initialize IPv4 and IPv6 sockets in the same way
ok tracey
- Commit:
90d63d4711e9554b6e7e6e26d2fbeb50964452cf
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: do not allocate server/socket list heads separately
ok millert@
- Commit:
62f852145bf61e3ed9b42f7a00cd7cd0b5ff8835
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: do not allocate address list heads separately, this is unnecessary
ok millert@
- Commit:
717a78d4f87c3704afe34c77e211349932575d5b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix snprintf error handling
follow the "proper secure idiom" described in the CAVEATS section of
printf(3). reminded by tb@ and millert@
- Commit:
275b5ade3a9d9c9850dd0e6f3129bdd58e4a3756
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove the last remaining use of sin_len from gotwebd
I don't think this assignment to sin_len is needed at all, because
sin_len is already being set via got_sockaddr_inet[6]_init() during
the configuration stage.
Tested successfully on both fcgi socket types (unix / tcp).
- Commit:
ceac46c9c7afba029eba9f678ba535d6b16ea3fb
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix potential type mismatch between format specifier and argument
Cast argument of type rlim_t to unsigned long long to match the %llu
format specifier on platforms where this might not be the case.
- Commit:
8b925c6ccd3968917253ea191906a1710c40ed2d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add back sys/queue.h
Now that the handling of including sys/queue.h is better, there's no
need to remove those lines from the source. Copy the location of those
original sys/queue.h lines from upstream at the same line number, so as
to avoid any conflicts in the future.
- Commit:
5ae43732156d2ae6f9bd67de3dece785bff57524
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: gotwebd: macos accept4 -> accept
accept4() doesn't exist on MacOS, so will likely need to set fcntl() on
the FD.
- Commit:
dd7a7d5b22adf0bd60fa6bc7b146aaf2d4dbb59c
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: macos: handle SOCK_CLOEXEC
MacOS doesn't have SOCK_CLOEXEC, so don't include it in the set of flags
for socket(). We probably shouldn't do this, as another approach is to
set fcntl(fd, O_CLOEXEC) instead.
- Commit:
ff36aeea6fe48eb9071eccc41d2a31a47d109be3
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: gotwebd: first stab at compilation
This is not yet "clean", but does compile. A few things to consider:
* See comments beginning with "TA:"
- Commit:
8a35f56cb42a2c9617008c6e68cccf9b62939243
- From:
- Tracey Emery <tracey@traceyemery.net>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
import gotwebd
thread fcgi response to client for rendering in browser as data is returned
fix potential problem with a stuck loop if the client is hammering the server with random clicks and stop/restarts
render our index! WOOHOO! small var refactoring.
fcgi.c to handle all clean-up, various error clean-up
remove output used to trace down got bug
temporarily stop overloading a socket, but a better solution needs to be found
return on fcgi_gen_response, so we can track if a client is writable or not
this stops page creation when the client is unavailable
remove old comments
enable profile building, although, i don't think this works thoroughly in a priv/proc daemon
catch more errors
correctly count repos
remove temp logger
we don't need to start our responder thread so early. move it to fcgi.c and start when we start processing html
kill the unneeded thread, stop queueing responses, and just write to clients immediately
clean up some memory leaks and dead stores
rework querystring so an error can be displayed instead of showing the index on
querystring error
get framework in place for the rest of the content
add server struct to response struct
bo last commit
get back a usable gotweb. not sure what i was thinking yesterday
properly move our structs around this time
remember index page for sitelink, fix leak
unused var is annoying, so stop it for now. don't forget to change this!
style
briefs nearly completed.
finish briefs output
add briefs to summary
cleanup some html
properly retrieve next and previous commit ids for list navigation
follow naddy's stailq macro change
we will never have a previous link on the summary page
goto correct label, so we get a previous link on the last page of briefs
don't wrap short line
simplify got_get_repo_commits code
start rendering a diff
start rendering a diff
this was by accident
finish diff output
functions cleanup
prepare for fd request
that was a stupid idea, just flush the priv_fd
bo that too. that won't work eith with append in mkstemp
that isn't going to work
actually zero out the priv_fd
missed seek to beginning of file was overwriting first line of diff
fsync our fd as well
add link to repo path by sitelink and add back verbose fcgi debugging that was removed
add modest write heuristics to fcgi_send_response
fix dead assignments and XXX comment where a leak is happening that I can't find right now
there was no leak. stsp is brilliant and knew it was the cache growing
prevent double-free, render prettier err output if we can
remove unused variables
correctly fix double-free
fix gotwebd to build with main's changes after rebase
fix double-free
don't error on index if pack files missing and fixup some error handling
render commits
finish up tag briefs and start the tag page
finish up tag page
unbreak TAGS and SUMMARY actions
grab the correct tag from the queue
unbreak TAGS and SUMMARY actions again
update some error handling
clean up unneeded code and start tree output
render tree
render branches
remove tags from summary if there aren't any
fix tree div structure and start blob render
render blob
render blame
fix tree href in briefs
clean up some css
add headref to querystrings
load correct commit for tree and diff
fixup some error output
update some copyright dates
add full SNI support
rm debug line found by Lucas6023, notified via IRC. thanks!!
fix tree
fix crash when querystring is manipulated to not have a commit id in certain
instances. also break a stuck while loop on client error.
fix for new got_object_id_by_path arguments
rebase and fix
prep for multiple fds per socket, instead of just one
fix overlooked shift/reduce conflicts
backout priv_fds as a list. after discussion with stsp, an array and length are the better direction
prepare array of fds to pass into got functions
make a new set of pack fds, which will be passed to got_repo_open
work with new pack_fds in got_repo_open
give output when no tags exist
escape html in blame output
change files listed in tree view to show blob, file commits, and blame, instead of blob, blob, blame. idea from mp4 on irc. this is way more handy.
stop populating the queue from the headref and figure out previous commit id
while iterating. this should reduce some overhead.
actually purge our sockets instead of not using the function
start work with new blob
rm volatile
use new diff
change func names
no more temp files
increase blame number line width
set content-type to text/plain so firefox won't download files
rm test infra for now
account for -Wwrite-strings
fix for sigs and algorithm choice
clean up some leaks and other mistakes