gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitac6268e3ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mreac6268e3/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

  • ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
  • 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
  • e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre
  • 31dcf2admission 045: report, LOGmre
  • 9c3971d0tests/persons-skip-count.hlmre
  • 4d72e365mission 045mre
  • b9cae4c9slices: skip and count non-row values from range(); merge persons pass falls back to iterate; guard testmre
  • 3db7dc31merge w44-jobs-slices into w43-trkmemmre
  • 593dab6fmission 043: report, LOGmre
  • 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
  • 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre
  • 23375c58mission 044: report, LOG, STATUSmre
  • c6fd928emission 044: 4096 slices for tables over 200 K rows, 15 ms budget, TRACKER_SLICE_DEPTH for testsmre
  • fb057680mission 044: jobs.hl imports mergeLeft (gate found it), mission file, slices benchmre
  • 0d6293ebmission 043: mission filemre
  • d25bd14amission 044: sliced merge prepare + sliced collections prepare; jobs-dump old/new check + bulk fixturemre
  • 633ee210mission 044: sliced table scans (slices.hl, pk-range slices) for the adult/kind/status/art/credits/details-repair queuesmre
  • 55bbd619boot: one streamed pass per table (lib/bootscan.hl) instead of find(null,null) per module; follows/watches/franchises scans streammre
  • 1d465d3ere-vendor plugins to Hybriel master f9614007 (mpackdb #202 copy fix, libmpackdb sha 6fb3b9d6)mre
  • 6648ba44mission 042: real-browser E2E on ce6f2e0a re-vendor 69/0 at 390 + 1280mre