Commits
- Commit:
ad422caf47dffe852110c06c4c625af63570cfe6
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
backout 169b163113a6db9878c9166aa05fbd30d05eb832
pushed by mistake, wasn't reviewed.
- Commit:
5d860bcebedf3a8db88af8374918aca891bbb222
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_diff
To avoid calling functions from got_operations.c directly from a
template (which would hide the error), change got_output_repo_diff into
got_open_diff_for_output that returns a file with the diff in it, to be
then rendered by the template. got_gotweb_flushfile needs to be exposed
then.
It also bundles a smaller change: the `label' argument of
got_repo_match_object_id is optional and not used, so just pass NULL
there.
- Commit:
3c14c1f2875343bc03f7ef656f03bfa85ba1b4bf
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_tree
ok tracey@
- Commit:
b82440e1f439a679e7f7cb962a7f042e2d2019f1
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: render BLOB inline, add BLOBRAW for serving raw blobs
binary blobs are automatically redirected to the BLOBRAW page (which is
the old BLOB.)
ok jamske
- Commit:
0cef9478411f528bc7f37b8c7a21d21a7f650592
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
change gotweb_render_content_type argument type to const char *
it's a string, `const char *' is fine (and what all the callers use
anyway.)
- Commit:
d7034a4ea257e654c3ac01eae64452461d31d233
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: use Content-Disposition for RSS; sets the filename
Since gotwebd serves the RSS from a path without a file name component,
browsers just make up a random string to give the file a name which can
be confusing. Furthermore, since it's served as application/rss+xml
they try to render the XML (failing.)
Use gotweb_render_content_type_file (which sets the Content-Disposition
HTTP header) to fix both: the feed is now called <repo-name>.rss and set
as attachment (thus saved and not rendered.) Change the function to
take an optional filename suffix for the occasion.
ok jamsek
- Commit:
c7c382950394eeda4875e2da6812e05c61a291d3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: tweak gotweb_render_content_type_file parameters type
`type' and `file' are strings so use `const char *' for both.
- Commit:
cb11302ca643bbb042a84f1e4784202c0f9a1252
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: gotwebd: use template
This updates -portable's gotwebd instance to make use of the new
templating engine.
- Commit:
d6795e9fa6cc029fe5e47ccc827abe3a498a7e71
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: add an RSS feed for the tags
ok tracey@
- Commit:
3191e25687ad12e5d81efb8827a7bddee0ba0465
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: use DOCUMENT_URI rather than SCRIPT_NAME
the latter is empty when serving from a directory-like path prefix with
an httpd.conf(5) as per gotwebd(8).
ok tracey@
- Commit:
7ade8b27a9039824713dfc36189c6bc9470bbe0c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_commits
ok tracey@
- Commit:
2f4f0731243b48a022f336d0ce7765a27e0cc56e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_navs
ok tracey@
- Commit:
3d6d1fb0b8a423e777c05cd69b1fb57fd69dd94c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop index_page_str and page_str
gotwebd uses sprintf to update index_page_str and page_str if they were
negative. While this specific usage is safe, let's drop it. Since the
index_page_str and page_str fields are never read from, remove them.
This saves two allocations per request too.
ok tracey@
- Commit:
e7e5fa49fc2e589a02ba9a9412a7b8e2377ead68
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: start using the template system
ok tracey@
- Commit:
3e9a56b5bba8e25189ba076c2c3d6fd0b56a6446
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: provide maximum value for the description and cloneurl
ok stsp@
- Commit:
6c7f10f7250c7b1cb44cc9490bec065ad0107d24
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop unused path parameter from got_get_repo_{owner,age}
ok jamsek
- Commit:
3991b2a5fc4bf9e028e24e4ea4f7f66f1ed4ff6c
- From:
- Landry Breuil <landry@openbsd.org>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add respect_exportok flag, defaulting to off
allows to hide repositories if they have the magic git-daemon-export-ok file
ok op@ tracey@ stsp@
- Commit:
5514426792c3f9a07f4ab50620e8244650937c2d
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: percent-encode generated URLs
This adds a new helper function `gotweb_link' that outputs an HTML link
with the parameter correctly escaped.
ok stsp@
- Commit:
a004b24a97cfaa2be171871f42cdc15e24fa8682
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: shrink struct server
keeping GOTWEBD_REPO_CACHESIZE * sizeof(struct cache_repo) inside the
struct server makes it too large for imsg on some platforms (linux at
least.) Instead, store a pointer and allocate the array when it's
received on the child processes.
ok stsp@
- Commit:
4630b4b581adda0b6e703db535a33f297f6f3701
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: plug leak in fcgi_parse_params
fcgi_parse_params parses fastcgi parameters into a list. (This is a
leftover from slowcgi where that list is later used to populate the
environment of the CGI process.) However, this list is never looked at
and its memory never released, so just drop it.
Make the matching on fastcgi parameters name strictier by checking also
that the length is the one we expect; otherwise we might pick up
parameters with the same prefix string (i.e. FOO vs FOO_WITH_SUFFIX)
While here turn some bcopy into memcpy and simplify some if-nesting too.
Fix the reading from an un-initialized pointer that I introduced in a
previous commit.
ok stsp@
- Commit:
cee9c573f85a1d71c5836345f0c6eebd7ec2927c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: garbage collect the now unused GOTWEB_GOT_DIR
- 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:
3f0158b49db4d4cb897b892d200ffe07edb29e8e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: use SCRIPT_NAME to derive URLs
This makes gotwebd use SCRIPT_NAME instead of the DOCUMENT_ROOT fastcgi
param to generate the links to the assets and changes some links so
every page is consistently linked with a relative URL.
It allows to drop the `root "/"' in the location for fastcgi and, as a
bonus, also makes possible to run gotwebd on non "/" paths.
ok stsp@
- Commit:
e43172795b41a94ae5c2a0d67ef988801776d7f3
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove fcgi_socket keyword from gotwebd.conf; "listen on" now implies it
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