aboutsummaryrefslogtreecommitdiff
path: root/src/http.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-22Update http.zigGravatar Jarred Sumner 1-1/+1
2022-01-19`fs.*Sync()`, `bun wiptest`, and More ™ (#106)Gravatar Jarred Sumner 1-76/+126
* very very wip * almost ready to fix the errors * Update identity_context.zig * Update base.zig * [bun test] It runs successfully * Remove unnecessary call * [Bun.js] Improve JS <> Zig unicode string interop This fixes longstanding unicode bugs with `console.log` & `fetch`. I believe @evanwashere reported this first awhile ago * [Bun.js] Implement `Object.is()` binding and a way to set a timeout for script execution * Update PLCrashReport.zig * [Bun.js] Make `console.log` more closely match Node.js and Deno * [Bun.js] Implement formatting specifier for console.* * Implement `console.clear()` * bug fix * Support console.clear() * Buffer stderr * [bun test] Begin implementing Node.js `fs` * Update darwin_c.zig * Implement more of `fs` * `mkdir`, `mkdir` recursive, `mkdtemp` * `open`, `read` (and pread) * Move some things into more files * Implement readdir * `readFile`, `readLink`, and `realpath` * `writeFile`, `symlink`, `chown`, `rename`, `stat`, `unlink`, `truncate` * `lutimes` * Implement `SystemError` and begin wiring up the `fs` module * `"fs"` - Most of the arguments / validation * `fs` - Rest of the arguments / validations * Begin wiring up the `fs` module * Fix all the build errors * support printing typed arrays in console.log * It...works? * Support `require("fs")`, `import fs from 'fs';`, `import * as fs from 'fs'` * Fix a couple bugs * get rid of the crash reporter for now * Update fs.exports.js * [bun.js] slight improvement to startup time * [bun.js] Improve error message printing * [Bun.js] Add `Bun.gc()` to run the garbage collector manually and report heap size * [Bun.js] Add Bun.generateHeapSnapshot to return what JS types are using memory * [Bun.js] Add `Bun.shrink()` to tell JSC to shrink the VM size * Improve encoding reader * [bun.js] Improve callback & microtask performance * Update node_fs.zig * Implement `console.assert` * simple test * [Bun.js] Prepare for multiple globals/realms to support testing * Create callbacks-overhead.mjs * Update http.zig * [Bun.js] Implement `queueMicrotask` * Add test for queueMicrotask * :sleepy: * [Bun.js] Implement `process.versions`, `process.pid`, `process.ppid`, `process.nextTick`, `process.versions`, * Implement `process.env.toJSON()` * [Bun.js] Improve performance of `fs.existsSync` * :nail_care: * [Bun.js] Implement `process.chdir(str)` and `process.cwd()`, support up to 4 args in `process.nextTick` * Make creating Zig::Process lazy * Split processi nto separte file * [Bun.js] Node.js Streams - Part 1/? * [Bun.js] Node.js streams 2/? * WIP streams * fix crash * Reduce allocations in many places * swap * Make `bun` start 2ms faster * Always use an apiLock() * libBacktrace doesn't really work yet * Fix crash in the upgrade checker * Clean up code for importing the runtime when not bundling * :camera: * Update linker.zig * 68! * backtrace * no, really backtrace * Fix * Linux fixes * Fixes on Linux * Update mimalloc * [bun test] Automatically scan for {.test,_test,.spec,_spec}.{jsx,tsx,js,cts,mts,ts,cjs}
2022-01-05Update http.zigGravatar Jarred Sumner 1-1/+1
2022-01-04[bun dev] Print error in status line textGravatar Jarred Sumner 1-3/+13
2022-01-02[bun dev] Upgrade-Insecure-Requests does not work for detecting HTTPSGravatar Jarred Sumner 1-5/+9
2022-01-02copy: replace Bun with bun (#99)Gravatar luke miles 1-8/+8
Most CLI tools have the style convention of referring to themselves in lowercase. It is, after all, the name that users type in when using the tool. This PR maintains that convention in bun. "Drop the uppercase B, it's cleaner"
2022-01-02Update http.zigGravatar Jarred Sumner 1-5/+7
2022-01-02[bun dev] Detect HTTPS via `Upgrade-Insecure-Requests`Gravatar Jarred Sumner 1-0/+5
2022-01-01[bun dev] Automatically set `origin` - improve support for proxying BunGravatar Jarred Sumner 1-21/+130
Previously, when running Bun behind a reverse proxy, you had to pass an explicit `--origin` arg and it could only run behind one proxy at a time. Now, Bun automatically determines the origin from the request if possible. It reads `Forwarded`, `X-Forwarded-Proto`, `X-Forwarded-Host`, `Origin`, and lastly `Host`. If none are available, it falls back to the `--origin` CLI arg. This change is important for usecases like Replit which shows multiple iframes in different origins.
2022-01-01Clear the fdGravatar Jarred SUmner 1-2/+12
2022-01-01Handle more edgecasesGravatar Jarred SUmner 1-47/+51
2022-01-01Detect fast refresh from .bun if possibleGravatar Jarred SUmner 1-3/+10
2022-01-01[bun dev] Improve filesystem watcher & HMR reliability (Linux + a little macOS)Gravatar Jarred SUmner 1-66/+195
Text editors like Replit save through atomic file updates. In an inotify filesystem watcher (Linux), that appears to be a delete followed by moving the file to the directory. Now when known files are moved into a directory, the watcher sends the file change notification to the browser(s). From there, the browser looks at it's files to determine whether or not Additionally, if an existing HMR connection does not know about a file ID passed to it, it asks the browser to reply with the file path and then starts watching that file. This improves HMR reliabiality if Bun had been restarted but the page hadn't been restarted.
2021-12-31Attempt to fix watcher issue with repl.itGravatar Jarred Sumner 1-2/+9
2021-12-31little testbun-v0.0.64Gravatar Jarred Sumner 1-1/+1
2021-12-31[devserver] Log more errors when a websocket connection failsGravatar Jarred Sumner 1-2/+9
2021-12-31Update http.zigGravatar Jarred Sumner 1-2/+2
2021-12-31[devserver] Case-insensitive request header comparison, which fixes issues ↵Gravatar Jarred Sumner 1-11/+3
with proxying Bun
2021-12-30- => .Gravatar Jarred Sumner 1-1/+1
2021-12-30Upgrade to latest Zig, remove dependency on patched version of Zig (#96)Gravatar Jarred Sumner 1-103/+87
* Prepare to upgrade zig * zig fmt * AllocGate * Update data_url.zig * wip * few files * just headers now? * I think everything works? * Update mimalloc * Update hash_map.zig * Perf improvements to compensate for Allocgate * Bump * :camera: * Update bun.lockb * Less branching * [js parser] Slightly reduce memory usage * Update js_parser.zig * WIP remove unused * [JS parser] WIP support for `with` keyword * Remove more dead code * Fix all the build errors! * cleanup * Move `network_thread` up * Bump peechy * Update README.md
2021-12-27Prepare to run unit tests & remove some dead code (#92)Gravatar Jarred Sumner 1-3/+3
* Remove some dead code * :skull: code * Fix the zig tests * [JS Printer] Print integers faster & less scientific notation on decimals * :skull: dead code * skip * Run all the unit tests
2021-12-24Fix rare crash when new thread is created, possibly only on muslGravatar Jarred Sumner 1-6/+2
2021-12-23Prevent crash due to SIGPIPEGravatar Jarred Sumner 1-2/+15
2021-12-21--dump-limits flag to inspect what the max file descriptor & stack size isGravatar Jarred Sumner 1-1/+7
2021-12-17packagingGravatar Jarred Sumner 1-1/+4
2021-12-16document failed `Link` tag experiment in script srcGravatar Jarred Sumner 1-0/+6
2021-12-16[bun install] Load lockfile. Generate diffsGravatar Jarred Sumner 1-0/+1
2021-12-16[bun install] async http request works I think?Gravatar Jarred Sumner 1-16/+16
2021-12-16[http] Fix bug with `Link` headerGravatar Jarred Sumner 1-1/+5
2021-12-16[http] Ensure errors from macros can see source codeGravatar Jarred Sumner 1-1/+19
2021-12-11Add a resource hint for preloading node_modules.bun and route asset in the ↵Gravatar Jarred Sumner 1-1/+43
fallback rendering
2021-11-21add env var for disabling bun.js SSRGravatar Jarred Sumner 1-1/+1
2021-11-16[router] Tweak sorting order & update routing testsGravatar Jarred Sumner 1-1/+1
2021-11-15[bun dev] When `--disable-bun.js` flag is passed, don't send 500s for ↵Gravatar Jarred Sumner 1-1/+12
rendering the fallback
2021-11-01[internal] Tiny changes that will eventually make it easier to update zigGravatar Jarred Sumner 1-3/+2
2021-10-28Upgrade checker + polish for `bun upgrade`Gravatar Jarred Sumner 1-0/+4
2021-10-26Add test that checks JIT is enabled for JavaScriptCore and crashes if it isn'tGravatar Jarred Sumner 1-0/+3
2021-10-25[HTTP Server] Add flag for disabling Bun.jsGravatar Jarred Sumner 1-1/+10
2021-10-25Fix all known string encoding bugsGravatar Jarred Sumner 1-0/+13
2021-10-20rewrote most of the routerGravatar Jarred Sumner 1-43/+15
2021-10-13Add TLS 1.3 support, improve fetch() HTTPS performanceGravatar Jarred Sumner 1-48/+1
2021-10-10[fetch] Add support for gzip & deflate to the http clientGravatar Jarred Sumner 1-3/+3
Powered by Cloudflare's zlib fork
2021-10-07Add `--port` CLI flag for setting a port instead of `--origin`. `--port` has ↵Gravatar Jarred Sumner 1-1/+3
higher precedence than `--origin` so that proxies can work
2021-10-06Add support for reading JSX config from tsconfig.jsonGravatar Jarred Sumner 1-0/+3
2021-10-05analytics is good enough for nowGravatar Jarred Sumner 1-0/+21
2021-10-05Simple analyticsGravatar Jarred Sumner 1-0/+13
2021-10-03Fix various macOS-specific compile errors and run `zig fmt`Gravatar Jarred Sumner 1-12/+3
2021-10-03Add Three.js benchmarkGravatar Jarred SUmner 1-1/+2
2021-10-02Linux works now.Gravatar Jarred SUmner 1-28/+26
2021-09-30Support remapping macro pathsGravatar Jarred Sumner 1-16/+36