Skip to content

Commit d4cbc2d

Browse files
authored
Merge pull request #425 from jbampton/lowercase-http-header-field-names
Use lowercase HTTP header field names to be compatible with HTTP/2
2 parents 81e2803 + 26b5993 commit d4cbc2d

File tree

13 files changed

+73
-73
lines changed

13 files changed

+73
-73
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ home {
192192
_ "Hi, Welcome"
193193
}
194194
error {
195-
headers.add('HTTP-Type: 404')
196-
headers.add('Content-Type: text/html;charset=utf-8')
195+
headers.add('HTTP/1.0 404 Not Found')
196+
headers.add('content-type: text/html;charset=utf-8')
197197
_ "<h1>404></h1>"
198198
}
199199
main {
@@ -215,16 +215,16 @@ main {
215215

216216
```c
217217
error {
218-
headers.add('HTTP-Type: 404')
219-
headers.add('Content-Type: text/html;charset=utf-8')
218+
headers.add('HTTP/1.0 404 Not Found')
219+
headers.add('content-type: text/html;charset=utf-8')
220220
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
221221
}
222222

223223
vs
224224

225225
error {
226-
headers.add('HTTP-Type: 404')
227-
headers.add('Content-Type: text/html;charset=utf-8')
226+
headers.add('HTTP/1.0 404 Not Found')
227+
headers.add('content-type: text/html;charset=utf-8')
228228
page {
229229
title: 'Error 404'
230230
label {

docs/README_AR.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ home {
210210
_ "Hi, Welcome"
211211
}
212212
error {
213-
headers.add('HTTP-Type: 404')
214-
headers.add('Content-Type: text/html;charset=utf-8')
213+
headers.add('HTTP/1.0 404 Not Found')
214+
headers.add('content-type: text/html;charset=utf-8')
215215
_ "<h1>404></h1>"
216216
}
217217
main {
@@ -237,16 +237,16 @@ main {
237237

238238
```c
239239
error {
240-
headers.add('HTTP-Type: 404')
241-
headers.add('Content-Type: text/html;charset=utf-8')
240+
headers.add('HTTP/1.0 404 Not Found')
241+
headers.add('content-type: text/html;charset=utf-8')
242242
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
243243
}
244244

245245
vs
246246

247247
error {
248-
headers.add('HTTP-Type: 404')
249-
headers.add('Content-Type: text/html;charset=utf-8')
248+
headers.add('HTTP/1.0 404 Not Found')
249+
headers.add('content-type: text/html;charset=utf-8')
250250
page {
251251
title: 'Error 404'
252252
label {

docs/README_ES.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ home {
190190
_ "Hi, Welcome"
191191
}
192192
error {
193-
headers.add('HTTP-Type: 404')
194-
headers.add('Content-Type: text/html;charset=utf-8')
193+
headers.add('HTTP/1.0 404 Not Found')
194+
headers.add('content-type: text/html;charset=utf-8')
195195
_ "<h1>404></h1>"
196196
}
197197
main {
@@ -213,16 +213,16 @@ main {
213213

214214
```c
215215
error {
216-
headers.add('HTTP-Type: 404')
217-
headers.add('Content-Type: text/html;charset=utf-8')
216+
headers.add('HTTP/1.0 404 Not Found')
217+
headers.add('content-type: text/html;charset=utf-8')
218218
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
219219
}
220220

221221
vs
222222

223223
error {
224-
headers.add('HTTP-Type: 404')
225-
headers.add('Content-Type: text/html;charset=utf-8')
224+
headers.add('HTTP/1.0 404 Not Found')
225+
headers.add('content-type: text/html;charset=utf-8')
226226
page {
227227
title: 'Error 404'
228228
label {

docs/README_FA.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ home {
215215
_ "Hi, Welcome"
216216
}
217217
error {
218-
headers.add('HTTP-Type: 404')
219-
headers.add('Content-Type: text/html;charset=utf-8')
218+
headers.add('HTTP/1.0 404 Not Found')
219+
headers.add('content-type: text/html;charset=utf-8')
220220
_ "<h1>404></h1>"
221221
}
222222
main {
@@ -242,16 +242,16 @@ main {
242242

243243
```c
244244
error {
245-
headers.add('HTTP-Type: 404')
246-
headers.add('Content-Type: text/html;charset=utf-8')
245+
headers.add('HTTP/1.0 404 Not Found')
246+
headers.add('content-type: text/html;charset=utf-8')
247247
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
248248
}
249249

250250
vs
251251

252252
error {
253-
headers.add('HTTP-Type: 404')
254-
headers.add('Content-Type: text/html;charset=utf-8')
253+
headers.add('HTTP/1.0 404 Not Found')
254+
headers.add('content-type: text/html;charset=utf-8')
255255
page {
256256
title: 'Error 404'
257257
label {

docs/README_FIL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ home {
190190
_ "Hi, Welcome"
191191
}
192192
error {
193-
headers.add('HTTP-Type: 404')
194-
headers.add('Content-Type: text/html;charset=utf-8')
193+
headers.add('HTTP/1.0 404 Not Found')
194+
headers.add('content-type: text/html;charset=utf-8')
195195
_ "<h1>404></h1>"
196196
}
197197
main {
@@ -213,16 +213,16 @@ main {
213213

214214
```c
215215
error {
216-
headers.add('HTTP-Type: 404')
217-
headers.add('Content-Type: text/html;charset=utf-8')
216+
headers.add('HTTP/1.0 404 Not Found')
217+
headers.add('content-type: text/html;charset=utf-8')
218218
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
219219
}
220220

221221
vs
222222

223223
error {
224-
headers.add('HTTP-Type: 404')
225-
headers.add('Content-Type: text/html;charset=utf-8')
224+
headers.add('HTTP/1.0 404 Not Found')
225+
headers.add('content-type: text/html;charset=utf-8')
226226
page {
227227
title: 'Error 404'
228228
label {

docs/README_FR.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ home {
189189
_ "Hi, Welcome"
190190
}
191191
error {
192-
headers.add('HTTP-Type: 404')
193-
headers.add('Content-Type: text/html;charset=utf-8')
192+
headers.add('HTTP/1.0 404 Not Found')
193+
headers.add('content-type: text/html;charset=utf-8')
194194
_ "<h1>404></h1>"
195195
}
196196
main {
@@ -212,16 +212,16 @@ main {
212212

213213
```c
214214
error {
215-
headers.add('HTTP-Type: 404')
216-
headers.add('Content-Type: text/html;charset=utf-8')
215+
headers.add('HTTP/1.0 404 Not Found')
216+
headers.add('content-type: text/html;charset=utf-8')
217217
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
218218
}
219219

220220
vs
221221

222222
error {
223-
headers.add('HTTP-Type: 404')
224-
headers.add('Content-Type: text/html;charset=utf-8')
223+
headers.add('HTTP/1.0 404 Not Found')
224+
headers.add('content-type: text/html;charset=utf-8')
225225
page {
226226
title: 'Error 404'
227227
label {

docs/README_IT.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ home {
191191
_ "Hi, Welcome"
192192
}
193193
error {
194-
headers.add('HTTP-Type: 404')
195-
headers.add('Content-Type: text/html;charset=utf-8')
194+
headers.add('HTTP/1.0 404 Not Found')
195+
headers.add('content-type: text/html;charset=utf-8')
196196
_ "<h1>404></h1>"
197197
}
198198
main {
@@ -214,16 +214,16 @@ main {
214214

215215
```c
216216
error {
217-
headers.add('HTTP-Type: 404')
218-
headers.add('Content-Type: text/html;charset=utf-8')
217+
headers.add('HTTP/1.0 404 Not Found')
218+
headers.add('content-type: text/html;charset=utf-8')
219219
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
220220
}
221221

222222
vs
223223

224224
error {
225-
headers.add('HTTP-Type: 404')
226-
headers.add('Content-Type: text/html;charset=utf-8')
225+
headers.add('HTTP/1.0 404 Not Found')
226+
headers.add('content-type: text/html;charset=utf-8')
227227
page {
228228
title: 'Error 404'
229229
label {

docs/README_JA.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ home {
191191
_ "Hi, Welcome"
192192
}
193193
error {
194-
headers.add('HTTP-Type: 404')
195-
headers.add('Content-Type: text/html;charset=utf-8')
194+
headers.add('HTTP/1.0 404 Not Found')
195+
headers.add('content-type: text/html;charset=utf-8')
196196
_ "<h1>404></h1>"
197197
}
198198
main {
@@ -214,16 +214,16 @@ main {
214214

215215
```c
216216
error {
217-
headers.add('HTTP-Type: 404')
218-
headers.add('Content-Type: text/html;charset=utf-8')
217+
headers.add('HTTP/1.0 404 Not Found')
218+
headers.add('content-type: text/html;charset=utf-8')
219219
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
220220
}
221221

222222
vs
223223

224224
error {
225-
headers.add('HTTP-Type: 404')
226-
headers.add('Content-Type: text/html;charset=utf-8')
225+
headers.add('HTTP/1.0 404 Not Found')
226+
headers.add('content-type: text/html;charset=utf-8')
227227
page {
228228
title: 'Error 404'
229229
label {

docs/README_KR.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ home {
191191
_ "Hi, Welcome"
192192
}
193193
error {
194-
headers.add('HTTP-Type: 404')
195-
headers.add('Content-Type: text/html;charset=utf-8')
194+
headers.add('HTTP/1.0 404 Not Found')
195+
headers.add('content-type: text/html;charset=utf-8')
196196
_ "<h1>404></h1>"
197197
}
198198
main {
@@ -214,16 +214,16 @@ main {
214214

215215
```c
216216
error {
217-
headers.add('HTTP-Type: 404')
218-
headers.add('Content-Type: text/html;charset=utf-8')
217+
headers.add('HTTP/1.0 404 Not Found')
218+
headers.add('content-type: text/html;charset=utf-8')
219219
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
220220
}
221221

222222
vs
223223

224224
error {
225-
headers.add('HTTP-Type: 404')
226-
headers.add('Content-Type: text/html;charset=utf-8')
225+
headers.add('HTTP/1.0 404 Not Found')
226+
headers.add('content-type: text/html;charset=utf-8')
227227
page {
228228
title: 'Error 404'
229229
label {

docs/README_RU.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ home {
190190
_ "Hi, Welcome"
191191
}
192192
error {
193-
headers.add('HTTP-Type: 404')
194-
headers.add('Content-Type: text/html;charset=utf-8')
193+
headers.add('HTTP/1.0 404 Not Found')
194+
headers.add('content-type: text/html;charset=utf-8')
195195
_ "<h1>404></h1>"
196196
}
197197
main {
@@ -213,16 +213,16 @@ main {
213213

214214
```c
215215
error {
216-
headers.add('HTTP-Type: 404')
217-
headers.add('Content-Type: text/html;charset=utf-8')
216+
headers.add('HTTP/1.0 404 Not Found')
217+
headers.add('content-type: text/html;charset=utf-8')
218218
_ `<!doctype html><html><head><title>Error 404</title><meta charset="utf-8"></head><body><h1>404></h1></body></html>`
219219
}
220220

221221
vs
222222

223223
error {
224-
headers.add('HTTP-Type: 404')
225-
headers.add('Content-Type: text/html;charset=utf-8')
224+
headers.add('HTTP/1.0 404 Not Found')
225+
headers.add('content-type: text/html;charset=utf-8')
226226
page {
227227
title: 'Error 404'
228228
label {

0 commit comments

Comments
 (0)