Commits
- Commit:
92c8ec640028151d1e92eaef79c4fcd1365998bc
- From:
- Omar Polo <op@omarpolo.com>
- 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:
1abb18e1777172a9f4149a0f50c4cecfd024f02c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: add an RSS feed for the tags
ok tracey@
- Commit:
c127fc49cfbf532409724a0e4644f4b2539e430f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: drop unused path parameter from got_get_repo_{owner,age}
ok jamsek
- Commit:
d9787ed86ecec0bda7a570181d86c44ba80bd583
- From:
- Omar Polo <op@omarpolo.com>
- Date:
make got_commit_graph_iter_next use caller-provided storage for the id
and adjust the callers. discussed with and ok stsp@
- Commit:
4f0a80ed18c14d32968b403c50ce3e88e917da8f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: fix briefs navigation broken in 4a9629420
got_get_repo_commits iterates over the commits and build a queue for
later display. My previous memleak fix moved the TAILQ_INSERT_TAIL
*before* the logic to exit the loop and so it broke the pagination.
This fixes it by delaying the insertion into the queue, but also by
moving the check for the "previous" button after we've opened the
commit.
ok tracey
- Commit:
8d02314fcaebb323c9ca3b102f8a085d66ea4633
- From:
- Omar Polo <op@omarpolo.com>
- 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:
58354f546a10c9449ba427873d047ef113c1693e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: plug leak in got_output_repo_tree
- Commit:
6227cf0ee49b322cc297ef95bdad09ea8eae2ec4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: fix usage of the commit graph iter
got_get_repo_commits mixes ids allocated on the heap and the one
returned by the iter_next in the same variable, and then even attemp to
free it.
This is both a leak (we loose the pointer to the previously allocated
id) and a possible invalid free since the object id pointer returned by
the graph iterator is not to be passed to free(3).
part of a bigger diff that's ok stsp@
- Commit:
b94206d0acc1c55bad1233c35f959fa7c4af297b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: free obj_id and reflist in got_output_file_blame
ok stsp@
- Commit:
a33a44db81f52e0217b4e38e2e180442521f37ad
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: got_output_file_blame: free lines on error path
ok stsp@
- Commit:
8a4f92ca904ede1f7a5e7e1bafdf8be7974943ed
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: free eline in got_gotweb_blame_cb loop
ok stsp@
- Commit:
e4213243b6508845e530a1aadef9fe28d49a1ff2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: drop superfluous check
commit_id is not NULL if got_repo_match_object_id returned
successfully. ok stsp@
- Commit:
e5e662e42c45f0d30f5f97fb0e2ad5f3c4f8b488
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: kill unused id_str in got_output_repo_tree
ok stsp@
- Commit:
2c6b597256598f3a2f21b529eef551b51db5adb5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: avoid extra strdups in got_output_repo_tree
ok stsp@
- Commit:
6977f45a0d6e4dceb507913771e10106042dbaca
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: avoid extra variable in got_output_repo_tree
in_repo_path was used only to build a path, it's then assigned to path
(which is NULL at that point.) Just asprintf into path.
ok stsp@
- Commit:
4a962942057bae9fbd47916e75d554fb52e0ec37
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: plugs leaks in got_get_repo_commits
call got_get_repo_commit only once and avoid leaking the field of
repo_commit at each loop iteration.
ok stsp@
- Commit:
dfa5768dfba3067f15757fc77677e1ba43b33b57
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: free in_repo_path in got_get_repo_commits; ok stsp@
- Commit:
bce44e0b80af65d03bd0422e6468d7055e76b848
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: always free ref in got_get_repo_commits
some code-paths may leak it. ok stsp@
- Commit:
bc95141ca7ce90e4b19a251b36c87601c150bb3f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: don't close tag in got_get_repo_tags too early
it's still used a bit later, so defer the free'ing at the next loop
iteration or at function end.
- Commit:
5a57034b6f08eec784b8fe3c0b0b734eb2d4605a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: free commit_msg0 only at the end of got_get_repo_tags
in case of a failure between when it's allocated and when it's released
it might get leaked otherwise.
ok and semplification stsp@
- Commit:
b163541dd9b5a61e6be0e3956ab1ed2c591aace5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: plug some leaks in got_get_repo_tags
ok stsp@
- Commit:
625e5896fc9ecf87ccfc92ad2a65cd3be58f73c0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: free all allocated fields of repo_tag
got_get_repo_tags needs some tweaking to how tag_commit is allocated
too.
ok stsp@
- Commit:
89ae185cb4dd6d82b92a79daa8ef484b7da78ec3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: fix possible leaks when handling errors
all very unlikely.
part of a bigger diff that's ok stsp@
- Commit:
341fa7cacc77a0a56e7e6eebec0b591ea6d8003b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: minor tweaks
drop:
- a tautological s[strlen(s)] == '\0'
- a few duplicates checks
- a lone if (error) when it's always NULL
- an extra NULL check
part of a bigger diff that's ok stsp@
- Commit:
e9d3ad59c92a3ce340f8ac1bd0b0dff75dc3d951
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix dup(2) error checking in got_gotweb_openfile()