Skip to content

Commit 6af7626

Browse files
authored
perf: re-order the http methods so the most often requested is first and the least requested is last (#874)
1 parent f089616 commit 6af7626

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/fastly/builtins/fetch/request-response.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ bool process_body_read(JSContext *cx, FastlyHandle handle, JS::HandleObject cont
127127
// https://fetch.spec.whatwg.org/#concept-method-normalize
128128
// Returns `true` if the method name was normalized, `false` otherwise.
129129
bool normalize_http_method(char *method) {
130-
static const char *names[6] = {"DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"};
130+
static const char *names[6] = {"GET", "HEAD", "OPTIONS", "POST", "PUT", "DELETE"};
131131

132132
for (size_t i = 0; i < 6; i++) {
133133
auto name = names[i];

0 commit comments

Comments
 (0)