Commits
- 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:
00475f9a1ab9244b6e22272ead0a2591ded61b68
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop redundant NULL check
qs is guaranteed to be not NULL reached that point.
- Commit:
ee7c14200a271dc3c8ce07e7d2f5102820f67422
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: remove useless comment
should be placed further down, after BLOB and RSS are handled, but the
call to `gotweb_render_header' is successfully clear on its own.
- 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:
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:
8ea2e76efa46b2e518a3e42ed90787d73dff3f96
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: fix broken navigation in commits page since 8d02314
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:
43a44bcef13e7014c764133b35560035d246baaf
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: simplify bit of gotweb_process_request
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:
53f9cbbf15eda94db076b865ad565e51da757669
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: sha1.h
- Commit:
4606e6d4d9f8bbd3f9e4ac08a08f06f8793467d7
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: rework gotweb_get_repo_{description,cloneurl}
- use openat(2) since we've already opened the containing dir
- use fstat(2) instead of multiple seeks
- don't special case len == 0
ok and improvements by 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:
24240f6a1c027ee762d62f20165a6b8d5ed88980
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: simplify gotweb_render_index
- drops the double loop; paginate in one go
- avoid lstat + got_path_dir_is_empty for each entry: use dt_type if
provided by the underlying filesystem
- fixes a memleak: before `continue' we need to call
gotweb_free_repo_dir
ok stsp
- Commit:
57e88d7cd338f2bca9e5bcb9184ddda2ab435197
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: use prev_disp to decide when to we've reached max_repos
instead of hardcoding d_i - 2 and so expecting only "." and ".." as
skipped entries, use t->prev_disp that is the number of repositories
traversed until now (both skipped due to the pagination and the ones
actually rendered.)
ok jamsek
- Commit:
2dd71cdd72c0c6c4ce607fdc73ae38fa898bfeb2
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: fix memleak in error path
ok stsp@
- 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:
a5f25a125bdd034cacf049f827a57f9cfc837134
- From:
- Landry Breuil <landry@openbsd.org>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
send a newline first if erroring out in plaintext mode
otherwise, the webserver might complain:
'upstream sent invalid header: "gotwebd\x20..." while reading response header from upstream'
ok stsp@
- Commit:
790ca73c1011a3aedd266ed382a84bd9a5094816
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop needless NULL check
We can assume that the querystring was initialized when we reach
gotweb_render_header. ok tracey@
- 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:
80ca8b0f888ae433e7e8e39317ab5647687e2c23
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: add missing closing for div tags_content
reported by the W3C validator.