Blob
- Date:
- Message:
- 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
- Actions:
- History | Blame | Raw File
1 /*2 * Copyright (c) 2019 Jerome Kasper <neon.king.fr@gmail.com>3 * Copyright (c) 2019, 2020 Tracey Emery <tracey@traceyemery.net>4 *5 * Permission to use, copy, modify, and distribute this software for any6 * purpose with or without fee is hereby granted, provided that the above7 * copyright notice and this permission notice appear in all copies.8 *9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.16 */18 /* general sections */20 a {21 color: #444444;22 text-decoration: none;23 }24 a:hover {25 color: Gold;26 text-decoration: none;27 }28 body {29 background-color: #ffffff;30 color: #000000;31 margin: 0;32 padding: 0;33 font-family: Arial, sans-serif;34 }36 .diff_minus, .diff_submodule {37 color: magenta;38 }39 .diff_plus, .diff_symlink, .diff_author {40 color: darkcyan;41 }42 .diff_chunk_header, .diff_date {43 background-color: LightSlateGray;44 color: yellow;45 }46 .diff_meta, .diff_executable, .diff_commit {47 color: green;48 }49 .diff_directory {50 color: blue;51 }53 .back_white {54 background-color: #ffffff;55 }56 .back_lightgray {57 background-color: #d8f3ef;58 }60 #logo {61 height: 50px;62 }63 #refs_str {64 background-color: #243647;65 color: #ffffff;66 font-style: italic;67 }68 #dotted_line {69 clear: left;70 float: left;71 width: 100%;72 border-top: 1px dotted #444444;73 }74 #header {75 overflow: auto;76 width: 100%;77 background-image: linear-gradient(to right, White, LightSlateGray);78 }79 #header a {80 color: #ffffff;81 font-size: 1.2em;82 text-decoration: none;83 }84 #header a:hover {85 color: Gold;86 font-size: 1.2em;87 text-decoration: none;88 }89 #site_path {90 clear: left;91 float: left;92 overflow: auto;93 width: 100%;94 background-color: #243647;95 }96 #site_link {97 float: left;98 width: 40%;99 padding-left: 10px;100 padding-top: 5px;101 padding-bottom: 5px;102 color: #ffffff;103 overflow: hidden;104 }105 #site_link a {106 color: #ffffff;107 text-decoration: none;108 }109 #search {110 float: right;111 padding-right: 10px;112 padding-top: 5px;113 padding-bottom: 5px;114 }115 #got_link {116 float: left;117 padding-bottom: 10px;118 padding-top: 10px;119 }120 #content {121 width: 100%;122 }123 #np_wrapper {124 clear: left;125 float: left;126 width: 100%;127 border-bottom: 1px dotted #444444;128 background-color: #f5fcfb;129 overflow: hidden;130 }131 #nav_prev {132 float: left;133 padding-left: 10px;134 padding-top: 5px;135 padding-bottom: 5px;136 overflow: visible;137 }138 #nav_next {139 padding-right: 10px;140 padding-top: 5px;141 padding-bottom: 5px;142 text-align: right;143 overflow: hidden;144 }145 #navs_wrapper {146 clear: left;147 float: left;148 width: 100%;149 background-color: #ced7e0;150 }151 #navs {152 padding-left: 10px;153 padding-top: 2px;154 padding-bottom: 2px;155 font-size: .8em;156 }157 #site_owner_wrapper {158 clear: left;159 float: left;160 width: 100%;161 background-color: LightSlateGray;162 color: #ffffff;163 }164 #site_owner {165 padding-left: 10px;166 padding-top: 5px;167 padding-bottom: 5px;168 }169 #description_title {170 clear: left;171 float: left;172 width: 6.5em;173 padding-left: 10px;174 padding-top: 5px;175 padding-bottom: 5px;176 }177 #description {178 float: left;179 width: 72%;180 padding-top: 5px;181 padding-bottom: 5px;182 }183 #repo_owner_title {184 clear: left;185 float: left;186 width: 6.5em;187 padding-left: 10px;188 padding-top: 5px;189 padding-bottom: 5px;190 }191 #repo_owner {192 float: left;193 width: 72%;194 padding-top: 5px;195 padding-bottom: 5px;196 }197 #last_change_title {198 clear: left;199 float: left;200 width: 6.5em;201 padding-left: 10px;202 padding-top: 5px;203 padding-bottom: 5px;204 }205 #last_change {206 float: left;207 width: 72%;208 padding-top: 5px;209 padding-bottom: 5px;210 }211 #cloneurl_title {212 clear: left;213 float: left;214 width: 6.5em;215 padding-left: 10px;216 padding-top: 5px;217 padding-bottom: 5px;218 }219 #cloneurl {220 float: left;221 width: 72%;222 padding-top: 5px;223 padding-bottom: 5px;224 overflow: auto;225 white-space: pre-wrap;226 }228 #header_commit_title {229 clear: left;230 float: left;231 width: 6.5em;232 padding-left: 10px;233 padding-top: 2px;234 padding-bottom: 2px;235 }236 #header_commit {237 float: left;238 width: 72%;239 padding-top: 2px;240 padding-bottom: 2px;241 }242 #header_diff_title {243 clear: left;244 float: left;245 width: 6.5em;246 padding-left: 10px;247 padding-top: 2px;248 padding-bottom: 2px;249 }250 #header_diff {251 float: left;252 width: 72%;253 padding-top: 2px;254 padding-bottom: 2px;255 }256 #header_author_title {257 clear: left;258 float: left;259 width: 6.5em;260 padding-left: 10px;261 padding-top: 2px;262 padding-bottom: 2px;263 }264 #header_author {265 float: left;266 width: 72%;267 padding-top: 2px;268 padding-bottom: 2px;269 }270 #header_committer_title {271 clear: left;272 float: left;273 width: 6.5em;274 padding-left: 10px;275 padding-top: 2px;276 padding-bottom: 2px;277 }278 #header_committer {279 float: left;280 width: 72%;281 padding-top: 2px;282 padding-bottom: 2px;283 }284 #header_age_title {285 clear: left;286 float: left;287 width: 6.5em;288 padding-left: 10px;289 padding-top: 2px;290 padding-bottom: 2px;291 }292 #header_age {293 float: left;294 width: 72%;295 padding-top: 2px;296 padding-bottom: 2px;297 }298 #header_commit_msg_title {299 clear: left;300 float: left;301 width: 6.5em;302 padding-left: 10px;303 padding-top: 2px;304 padding-bottom: 2px;305 }306 #header_commit_msg {307 float: left;308 width: 72%;309 padding-top: 2px;310 padding-bottom: 2px;311 white-space: pre-wrap;312 }313 #header_tree_title {314 clear: left;315 float: left;316 width: 6.5em;317 padding-left: 10px;318 padding-top: 2px;319 padding-bottom: 2px;320 }321 #header_tree {322 float: left;323 width: 72%;324 padding-top: 2px;325 padding-bottom: 2px;326 }328 #err_content {329 clear: left;330 float: left;331 width: 100%;332 padding-left: 20px;333 padding-top: 20px;334 padding-bottom: 20px;335 }337 #briefs_title_wrapper {338 clear: left;339 float: left;340 width: 100%;341 background-color: LightSlateGray;342 color: #ffffff;343 }344 #briefs_title {345 padding-left: 10px;346 padding-top: 5px;347 padding-bottom: 5px;348 }349 #briefs_content {350 clear: left;351 float: left;352 width: 100%;353 }354 #briefs_age {355 padding-left: 10px;356 padding-top: 5px;357 padding-bottom: 5px;358 float: left;359 width: 7.5em;360 overflow: auto;361 }362 #briefs_author {363 float: left;364 padding-top: 5px;365 padding-bottom: 5px;366 width: 8.5em;367 font-style: italic;368 overflow: auto;369 }370 #briefs_log {371 float: left;372 padding-left: 10px;373 padding-right: 10px;374 padding-top: 5px;375 padding-bottom: 5px;376 width: 65%;377 }379 #tags_title_wrapper {380 clear: left;381 float: left;382 width: 100%;383 background-color: LightSlateGray;384 color: #ffffff;385 }386 #tags_title {387 padding-left: 10px;388 padding-top: 5px;389 padding-bottom: 5px;390 }391 #tags_content {392 clear: left;393 float: left;394 width: 100%;395 }396 #tag_age {397 padding-left: 10px;398 padding-top: 5px;399 padding-bottom: 5px;400 float: left;401 width: 7.5em;402 overflow: auto;403 }404 #tags_log {405 float: left;406 padding-left: 10px;407 padding-right: 10px;408 padding-top: 5px;409 padding-bottom: 5px;410 width: 65%;411 }413 #tag_header_wrapper {414 clear: left;415 float: left;416 background-color: #f5fcfb;417 width: 100%;418 }419 #tag_header {420 float: left;421 padding-left: 10px;422 padding-top: 5px;423 padding-bottom: 2px;424 width: 80%;425 }426 #tag {427 float: left;428 width: 8.5em;429 font-style: italic;430 padding-top: 5px;431 padding-bottom: 5px;432 }433 #tag_commit {434 clear: left;435 float: left;436 padding-left: 20px;437 padding-bottom: 20px;438 white-space: pre-wrap;439 }441 #index_header {442 clear: left;443 float: left;444 overflow: auto;445 width: 100%;446 background-color: Khaki;447 }448 #index_header_project {449 clear: left;450 float: left;451 width: 20%;452 padding: 10px;453 }454 #index_header_description {455 float: left;456 width: 30%;457 padding: 10px;458 }459 #index_header_owner {460 float: left;461 width: 12%;462 padding: 10px;463 }464 #index_header_age {465 padding: 10px;466 overflow: hidden;467 }468 #index_wrapper {469 clear: left;470 float: left;471 width: 100%;472 }473 #index_project {474 float: left;475 width: 20%;476 padding: 10px;477 overflow: hidden;478 }479 #index_project_description {480 float: left;481 width: 30%;482 padding: 10px;483 overflow: auto;484 }485 #index_project_owner {486 float: left;487 width: 12%;488 padding: 10px;489 overflow: hidden;490 }491 #index_project_age {492 float: left;493 width: 14%;494 padding: 10px;495 overflow: visible;496 }497 #index_project a {498 color: #444444;499 text-decoration: none;500 }501 #index_project a:hover {502 color: SteelBlue;503 text-decoration: none;504 }505 #index_project_navs a {506 color: #444444;507 text-decoration: none;508 }509 #index_project_navs a:hover {510 color: SteelBlue;511 text-decoration: none;512 }513 #index_next a {514 color: #444444;515 text-decoration: none;516 }517 #index_next a:hover {518 color: SteelBlue;519 text-decoration: none;520 }521 #index_prev a {522 color: #444444;523 text-decoration: none;524 }525 #index_prev a:hover {526 color: SteelBlue;527 text-decoration: none;528 }530 #commits_title_wrapper {531 clear: left;532 float: left;533 width: 100%;534 background-color: LightSlateGray;535 color: #ffffff;536 }537 #commits_title {538 padding-left: 10px;539 padding-top: 5px;540 padding-bottom: 5px;541 }542 #commits_content {543 clear: left;544 float: left;545 width: 100%;546 }547 #commits_header_wrapper {548 float: left;549 background-color: #f5fcfb;550 width: 100%;551 }552 #commits_header {553 float: left;554 padding-top: 5px;555 padding-bottom: 2px;556 width: 80%;557 }558 #commit {559 clear: left;560 float: left;561 padding-left: 20px;562 padding-bottom: 20px;563 white-space: pre-wrap;564 }565 #commits_line {566 clear: left;567 float: left;568 }570 #blame_title_wrapper {571 clear: left;572 float: left;573 width: 100%;574 background-color: LightSlateGray;575 color: #ffffff;576 }577 #blame_title {578 padding-left: 10px;579 padding-top: 5px;580 padding-bottom: 5px;581 }582 #blame_content {583 clear: left;584 float: left;585 width: 100%;586 }587 #blame_header_wrapper {588 float: left;589 background-color: #f5fcfb;590 width: 100%;591 }592 #blame_header {593 float: left;594 padding-left: 10px;595 padding-top: 5px;596 padding-bottom: 2px;597 width: 80%;598 }599 #blame {600 clear: left;601 float: left;602 margin-left: 20px;603 margin-bottom: 20px;604 font-family: monospace;605 white-space: pre;606 overflow: auto;607 }608 #blame_wrapper {609 clear: left;610 float: left;611 width: 100%;612 }613 #blame_number {614 float: left;615 width: 6em;616 overflow: hidden;617 }618 #blame_hash {619 float: left;620 width: 6em;621 overflow: auto;622 }623 #blame_date {624 float: left;625 width: 7em;626 overflow: auto;627 }628 #blame_author {629 float: left;630 width: 6em;631 overflow: hidden;632 }633 #blame_code {634 float:left;635 width: 50%;636 overflow: visible;637 }639 #tree_title_wrapper {640 clear: left;641 float: left;642 width: 100%;643 background-color: LightSlateGray;644 color: #ffffff;645 }646 #tree_title {647 padding-left: 10px;648 padding-top: 5px;649 padding-bottom: 5px;650 }651 #tree_content {652 clear: left;653 float: left;654 width: 100%;655 }656 #tree_header_wrapper {657 clear: left;658 float: left;659 background-color: #f5fcfb;660 width: 100%;661 }662 #tree_header {663 float: left;664 padding-left: 10px;665 padding-top: 5px;666 padding-bottom: 2px;667 width: 80%;668 }669 #tree {670 clear: left;671 float: left;672 margin-left: 20px;673 margin-top: 20px;674 margin-bottom: 20px;675 font-family: monospace;676 }677 #tree_wrapper {678 clear: left;679 float: left;680 width: 100%;681 }682 #tree_line {683 clear: left;684 float: left;685 width: 20em;686 padding: 1px;687 }688 #tree_line_blank {689 float: left;690 padding: 1px;691 width: 9.5em;692 }693 #tree_line_navs {694 float: left;695 text-align: right;696 padding: 1px;697 }699 #diff_title_wrapper {700 clear: left;701 float: left;702 width: 100%;703 background-color: LightSlateGray;704 color: #ffffff;705 }706 #diff_title {707 padding-left: 10px;708 padding-top: 5px;709 padding-bottom: 5px;710 }711 #diff_content {712 clear: left;713 float: left;714 width: 100%;715 }716 #diff_header_wrapper {717 float: left;718 background-color: #f5fcfb;719 width: 100%;720 }721 #diff_header {722 float: left;723 padding-left: 10px;724 padding-top: 5px;725 padding-bottom: 2px;726 width: 80%;727 }728 #diff {729 clear: left;730 float: left;731 margin-left: 20px;732 margin-bottom: 20px;733 font-family: monospace;734 white-space: pre;735 }736 #diff_line {737 clear: left;738 float: left;739 }741 #summary_wrapper {742 clear: left;743 float: left;744 width: 100%;745 background-color: Khaki;746 }748 #branches_title_wrapper {749 clear: left;750 float: left;751 width: 100%;752 background-color: LightSlateGray;753 color: #ffffff;754 }755 #branches_title {756 padding-left: 10px;757 padding-top: 5px;758 padding-bottom: 5px;759 }760 #branches_content {761 clear: left;762 float: left;763 width: 100%;764 }766 #branches_wrapper {767 clear: left;768 float: left;769 width: 100%;770 }771 #branches_age {772 padding-left: 10px;773 padding-top: 5px;774 padding-bottom: 5px;775 float: left;776 width: 7.5em;777 overflow: auto;778 }779 #branches_space {780 padding-left: 10px;781 padding-top: 5px;782 padding-bottom: 5px;783 float: left;784 width: 8.5em;785 overflow: auto;786 }787 #branch {788 float: left;789 padding-right: 10px;790 padding-top: 5px;791 padding-bottom: 5px;792 }