├── .gitattributes ├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── fetch.bs ├── out └── server.ts └── w3c.json /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.bs diff=html linguist-language=HTML 3 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy 2 | on: [push] 3 | 4 | jobs: 5 | deploy: 6 | name: Deploy 7 | runs-on: ubuntu-latest 8 | permissions: 9 | id-token: write 10 | contents: read 11 | 12 | steps: 13 | - name: Clone repository 14 | uses: actions/checkout@v2 15 | 16 | - name: Build spec 17 | run: | 18 | mkdir -p out 19 | curl --retry 2 --fail https://api.csswg.org/bikeshed/ --output out/index.html --header "Accept: text/plain, text/html" -F die-on=fatal -F file=@"fetch.bs" 20 | 21 | - name: Upload to Deno Deploy 22 | uses: denoland/deployctl@v1 23 | with: 24 | project: "wintercg-fetch" 25 | entrypoint: ./server.ts 26 | root: out/ 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /fetch.spec.whatwg.org/ 2 | /deploy.sh 3 | /fetch.html 4 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | All documentation, code and communication under this repository are covered by 4 | the 5 | [W3C Code of Ethics and Professional Conduct](https://www.w3.org/Consortium/cepc/). 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Fetch spec 2 | 3 | ## Building the spec 4 | 5 | To build the spec locally first install bikeshed: 6 | 7 | ```sh 8 | pip3 install bikeshed && bikeshed update 9 | ``` 10 | 11 | Then to build the spec (index.bs) into HTML (index.html), run one of the below 12 | commands: 13 | 14 | ```sh 15 | bikeshed spec # build once 16 | 17 | # or 18 | 19 | bikeshed watch # rebuild on changes 20 | ``` 21 | 22 | ## Formatting 23 | 24 | Use a column width of 100 characters. 25 | 26 | Do not use newlines inside "inline" elements, even if that means exceeding the 27 | column width requirement. 28 | 29 | ```html 30 |
Execute 31 | set response's CSP list 32 | on response. CSP 33 | ``` 34 | 35 | is okay and 36 | 37 | ```html 38 |
Execute 39 | set response's CSP 40 | list on response. CSP 41 | ``` 42 | 43 | is not. 44 | 45 | Using newlines between "inline" element tag names and their content is also 46 | forbidden. (This actually alters the content, by adding spaces.) That is 47 | 48 | ```html 49 | token 50 | ``` 51 | 52 | is fine and 53 | 54 | ```html 55 | token 56 | 57 | ``` 58 | 59 | is not. 60 | 61 | An `
` element inside it, unless it's a child of 62 | `
Set response's url list to a copy of 71 | request's url list. 72 | ``` 73 | 74 | is not indented, but 75 | 76 | ```html 77 |
Run these substeps in parallel: 79 | 80 |
Do not place a newline above. 95 | 96 |
Place a newline above. 97 |
Place a newline above. 100 | 101 | 102 |
A request has an associated 115 | redirect mode,... 116 | ``` 117 | 118 | ```html 119 |
Let redirectMode be request's redirect mode. 120 | ``` 121 | 122 | ## IPR policy 123 | 124 | This repository is being used for work in the W3C Web-Interoperable Runtimes 125 | Community Group, governed by the 126 | [W3C Community License Agreement (CLA)](http://www.w3.org/community/about/agreements/cla/). 127 | To make substantive contributions, you must join the CG. 128 | 129 | If you are not the sole contributor to a contribution (pull request), please 130 | identify all contributors in the pull request comment. 131 | 132 | To add a contributor (other than yourself, that's automatic), mark them one per 133 | line as follows: 134 | 135 | ``` 136 | +@github_username 137 | ``` 138 | 139 | If you added a contributor by mistake, you can remove them in a comment with: 140 | 141 | ``` 142 | -@github_username 143 | ``` 144 | 145 | If you are making a pull request on behalf of someone else but you had no part 146 | in designing the feature, you can remove yourself with the above syntax. 147 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | All Reports in this Repository are licensed by Contributors under the 2 | [W3C Software and Document License](http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document). 3 | 4 | Contributions to Specifications are made under the 5 | [W3C CLA](https://www.w3.org/community/about/agreements/cla/). 6 | 7 | Contributions to Test Suites are made under the 8 | [W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html) 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # whatwg/fetch 2 | 3 | This repository contains changes to the WHATWG Fetch standard to make it more suitable to server side runtimes. 4 | These changes will soon be, or are in the process of being upstreamed to the [WHATWG fetch standard](https://fetch.spec.whatwg.org/). 5 | 6 | -------------------------------------------------------------------------------- /out/server.ts: -------------------------------------------------------------------------------- 1 | Deno.serve((req) => { 2 | return Response.redirect("https://fetch.spec.whatwg.org", 301); 3 | }); 4 | -------------------------------------------------------------------------------- /w3c.json: -------------------------------------------------------------------------------- 1 | { 2 | "group": "cg/wintercg", 3 | "contacts": ["ethan-arrowood"], 4 | "repo-type": "cg-report" 5 | } 6 | --------------------------------------------------------------------------------