Skip to content

Commit 4e51caa

Browse files
author
Dmitry Olshansky
committed
Use constants not magic numbers
1 parent 0a31e47 commit 4e51caa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

frameworks/D/photon-http/dub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"mir-ion": "~>2.3.4",
88
"xbuf" : "~>0.2.1",
99
"photon": "~>0.18.5",
10-
"photon-http": "~>0.6.7"
10+
"photon-http": "~>0.6.8"
1111
},
1212
"description": "Benchmark of photon-http",
1313
"license": "BSL-1.0",

frameworks/D/photon-http/source/app.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class BenchmarkProcessor : HttpProcessor {
2727

2828
override void handle(HttpRequest req) {
2929
if (req.uri == "/plaintext") {
30-
respondWith("Hello, world!", 200, plainText);
30+
respondWith("Hello, world!", HttpStatus.OK, plainText);
3131
} else if(req.uri == "/json") {
3232
jsonBuf.clear();
3333
serializeJsonPretty!""(jsonBuf, Message("Hello, World!"));
34-
respondWith(jsonBuf.data, 200, json);
34+
respondWith(jsonBuf.data, HttpStatus.OK, json);
3535
} else {
36-
respondWith("Not found", 404, plainText);
36+
respondWith("Not found", HttpStatus.NotFound, plainText);
3737
}
3838
}
3939
}

0 commit comments

Comments
 (0)