gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitdd0267eddd0267edgitoria#46: fix a label in the keyed gatemredd0267ed/plugins/http1/response.hl

1.0 KB

  1. // hl:http1 — HTTP response wrapper (file-as-class: Response)
  2. // Split from the former multi-class server.hl (mission 027).
  3. // The file root IS the constructor (mission 052 — `__construct` is gone).
  4. // Construction is positional: `new Response(body)` or
  5. // `new Response(body, { status = 404 })`. Positional args bind to properties in
  6. // DECLARATION order, so `body` and `options` must stay the first two
  7. // declarations; the run body below folds `options` into status/headers.
  8. // A Bytes body is sent raw, byte for byte (ticket #88) — what an app stored from
  9. // `req.bytes` can be served back — and says application/octet-stream unless the
  10. // headers name a type.
  11. String | Bytes body = ''
  12. Hybrid options = null
  13. Number status = 200
  14. Hybrid headers = {}
  15. if (options != null) {
  16. if (options.status != null) {
  17. status = options.status
  18. }
  19. if (options.headers != null) {
  20. headers = options.headers
  21. }
  22. }
  23. if (hlTypeName(body) == 'Bytes') {
  24. let typed = false
  25. for (k of headers.keys()) {
  26. if (k.toLowerCase() == 'content-type') { typed = true }
  27. }
  28. if (!typed) { headers['Content-Type'] = 'application/octet-stream' }
  29. }

Branches

Latest commits

  • dd0267edgitoria#46: fix a label in the keyed gatemre
  • b1dcb580gitoria#46: statuses keyed by app + context, required = app + context, old rows still readmre
  • 9678a8f3gitoria#46: contract v1.4, statuses keyed by app + contextmre
  • bdcbbaa9gitoria#47: rate limits, status read route, statuses + required on the pull (merge w47-limits)mre
  • 772c401fgitoria#45: W45 report, logmre
  • b6b793afgitoria#45: PR page with reviews, threads, conversation, Review again (merge w45-pr-page)mre
  • fb9e7554gitoria#45: browser gate: a /pulls title links to the PR pagemre
  • f7198131gitoria#45: tests/pr-page.mjs gatemre
  • 483141d0gitoria#45: Settings shows the Apps heading only to the ownermre
  • e2eff8f6gitoria#45: the PR page /pulls/N with reviews, threads, verdicts, conversation, comment, reply, resolve and Review againmre
  • 7a602839gitoria#45: raiseEvent can send to one app only; people's comments, replies and resolving in reviews.hlmre
  • 5de7f578gitoria#47: rate limits per app (429, Retry-After), status read route, statuses and required on the pull, one JSON check for every write routemre
  • 19edc1f5gitoria#44: contract v1.3.1, what outdated meansmre
  • 7c2277ccgitoria#38: worker reports W40–W46, logmre
  • 1c3fa842gitoria#45 #47: worker briefsmre
  • 0a46bf7dgitoria#47: apps API contract v1.3 (status read route, statuses + required on the pull)mre
  • 3373f7c3gitoria#38: push API contract v1.2.1, reviews, worker briefs and logmre
  • 34143d2cgitoria#46: closing brace of appComments lost in the mergemre
  • 54927c9cgitoria#46: PR statuses and required checks before merge (merge w46-status)mre
  • 187e1871gitoria#46: badges without decorative bordersmre