summaryrefslogtreecommitdiff
path: root/std/http/file_server_test.ts
AgeCommit message (Collapse)Author
2021-02-02chore: remove std directory (#9361)Casper Beyer
This removes the std folder from the tree. Various parts of the tests are pretty tightly dependent on std (47 direct imports and 75 indirect imports, not counting the cli tests that use them as fixtures) so I've added std as a submodule for now.
2021-01-25Revert "tests: enable wpt for url (#9046)" (#9264)Luca Casonato
This reverts commit 66e99d349b31f5cd30b868d80ebdab6ba749fd96.
2021-01-24tests: enable wpt for url (#9046)Luca Casonato
2021-01-17chore: Enforce ban-untagged-todo lint rule (#9135)Bartek Iwańczuk
2021-01-10update copyright to 2021 (#9081)Ryan Dahl
2020-11-26fix(std/http): prevent path traversal (#8474)sarahdenofiletrav
Fix path traversal problem when the request URI does not have a leading slash. The file server now returns HTTP 400 when requests lack the leading slash, and are not absolute URIs. (https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html).
2020-11-20test(std): make test output less noisy (#8445)Bartek Iwańczuk
This commit makes output of std/ tests less noisy by passing "--quiet" flag to Deno subprocesses run as part of test suite.
2020-10-27fix: path traversal in std/http/file_server.ts (#8134)Luca Casonato
2020-10-26fix(std/http/file_server): File server should ignore query params (#8116)uki00a
2020-09-27feat(fmt): Sort named import and export specifiers (#7711)David Sherret
2020-09-19chore: reenable disabled test in std/ (#7578)Bartek Iwańczuk
2020-09-18refactor: deno_fetch op crate (#7524)Bartek Iwańczuk
2020-09-17refactor: make fetch use op_fetch_read instead of op_read (#7529)Ryan Dahl
2020-09-14test(std/http): make tests runnable from any directory (#7441)Casper Beyer
This makes std/http tests runnable from any directory by spawning test processes in the module directory resolved from import.meta.url and resolving test data relative to the same module directory.
2020-08-12feat(std/http): add --no-dir-listing flag to file_server (#6808)木杉
2020-08-12feat(std): added TLS serve abilities to file_server (#6962)Alberto Ricart
2020-07-14Use dprint for internal formatting (#6682)David Sherret
2020-06-12refactor: Don't destructure the Deno namespace (#6268)Nayeem Rahman
2020-06-09fix(cli/js/process): Strengthen socket types based on pipes (#4836)Nayeem Rahman
2020-06-03fix(std/http/file_server): args handling only if invoked directly (#5989)matheus
2020-05-21fix(std/http): file_server's target directory (#5695)moyinzi
2020-05-14Fix flakiness in std file_server tests (#5306)Bert Belder
Fixes: #5275
2020-05-11BREAKING: There is no public Rust API for the CLI (#5226)Ryan Dahl
2020-05-04stabilize Deno.cwd and require --allow-read (#5068)Ryan Dahl
2020-04-30Unstable methods should not appear in runtime or d.ts (#4957)Luca Casonato
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-04-28BREAKING: Remove Deno.EOF, use null instead (#4953)Nayeem Rahman
2020-04-28BREAKING: Use LLVM target triple for Deno.build (#4948)Ryan Dahl
Deno.build.os values have changed to correspond to standard LLVM target triples "win" -> "windows" "mac" -> "darwin"
2020-04-28BREAKING: remove overload of Deno.test() (#4951)Bartek Iwańczuk
This commit removes overload of Deno.test() that accepted named function.
2020-04-10BREAKING: Make fetch API more web compatible (#4687)Ryan Dahl
- Removes the __fetch namespace from `deno types` - Response.redirect should be a static. - Response.body should not be AsyncIterable. - Disables the deno_proxy benchmark - Makes std/examples/curl.ts buffer the body before printing to stdout
2020-04-03Remove /std/media_types (#4594)Ryan Dahl
2020-04-01fix(file_server): use media_types for Content-Type header (#4555)Khải
2020-03-28Update to Prettier 2 and use ES Private Fields (#4498)Kitson Kelly
2020-03-24Revert "avoid using same port number for test (#4147)"Bartek Iwańczuk
Ref #4467 This reverts commit 60cee4f045778777a16b6fffd6d5b9a1400d7246.
2020-03-21BREAKING CHANGE Rename Deno.run's args to cmd (#4444)Akshat Agarwal
This is to avoid confusion with Deno.args which does not include the executable to be run.
2020-03-21avoid using same port number for test (#4147)Yusuke Sakurai
2020-03-18feat: Deno.test() sanitizes ops and resources (#4399)Bartek Iwańczuk
This PR brings assertOps and assertResources sanitizers to Deno.test() API. assertOps checks that test doesn't leak async ops, ie. there are no unresolved promises originating from Deno APIs. Enabled by default, can be disabled using Deno.TestDefinition.disableOpSanitizer. assertResources checks that test doesn't leak resources, ie. all resources used in test are closed. For example; if a file is opened during a test case it must be explicitly closed before test case finishes. It's most useful for asynchronous generators. Enabled by default, can be disabled using Deno.TestDefinition.disableResourceSanitizer. We've used those sanitizers in internal runtime tests and it proved very useful in surfacing incorrect tests which resulted in interference between the tests. All tests have been sanitized. Closes #4208
2020-02-27reduce unnecessary output on tests (#4148)Yusuke Sakurai
2020-02-26refactor(std/http): move io functions to http/io.ts (#4126)Yusuke Sakurai
2020-02-19Enable TS strict mode by default (#3899)Maximilien Mellen
Fixes #3324 Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-02-11fix(file_server): don't crash on "%" pathname (#3953)木杉
2020-02-11refactor: rewrite tests in std/ to use Deno.test (#3930)Bartek Iwańczuk
2020-02-08remove non-null assertion operator from std (part2) (#3927)Yusuke Sakurai
2020-02-07remove non-null assertion operator from std (part1) (#3900)Yusuke Sakurai
2020-01-27dx: descriptive permission errors (#3808)Bartek Iwańczuk
Before: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ``` After: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ```
2020-01-15Revert "feat(flags): script arguments come after '--'" (#3681)Ry Dahl
Due to complaints about ergonomics and because it breaks shebang on linux. This reverts commit 2d5457df15d8c4a81362bb2d185b5c6013faa1d8. BREAKING CHANGE
2020-01-08feat(flags): script arguments come after '--' (#3621)Ry Dahl
2020-01-02Happy new year! (#3578)Ry Dahl
2019-12-14Support utf8 in file_server (#3495)木杉
2019-12-14feat(file_server): add help & switch to flags (#3489)木杉
2019-12-12fix: file_server swallowing permission errors (#3467)木杉