Skip to content

Commit

Permalink
latest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed May 15, 2024
1 parent bd9c1fb commit c0caefc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"GET /cache-override/constructor/invalid-mode",
"GET /cache-override/constructor/valid-mode",
"GET /cache-override/fetch/mode-none",
"GET /cache-override/fetch/mode-pass",
"GET /simple-cache/interface",
"GET /simple-store/constructor/called-as-regular-function",
"GET /simple-cache/constructor/throws",
Expand Down Expand Up @@ -92,6 +93,11 @@
"GET /simple-cache/getOrSet/executes-the-set-method-when-key-not-in-cache",
"GET /simple-cache/getOrSet/does-not-execute-the-set-method-when-key-is-in-cache",
"GET /simple-cache/getOrSet/does-not-freeze-when-called-after-a-get",
"GET /client/tlsJA3MD5",
"GET /client/tlsClientHello",
"GET /client/tlsClientCertificate",
"GET /client/tlsCipherOpensslName",
"GET /client/tlsProtocol",
"GET /console",
"GET /crypto",
"GET /crypto.subtle",
Expand Down Expand Up @@ -255,7 +261,19 @@
"GET /backend/health/happy-path-backend-exists",
"GET /backend/health/happy-path-backend-does-not-exist",
"GET /env",
"GET /fastly/now",
"GET /fastly/version",
"GET /fastly/getgeolocationforipaddress/interface",
"GET /fastly/getgeolocationforipaddress/called-as-constructor",
"GET /fastly/getgeolocationforipaddress/parameter-calls-7.1.17-ToString",
"GET /fastly/getgeolocationforipaddress/parameter-not-supplied",
"GET /fastly/getgeolocationforipaddress/parameter-empty-string",
"GET /fastly/getgeolocationforipaddress/parameter-ipv4-string",
"GET /fastly/getgeolocationforipaddress/parameter-compressed-ipv6-string",
"GET /fastly/getgeolocationforipaddress/parameter-shortened-ipv6-string",
"GET /fastly/getgeolocationforipaddress/parameter-expanded-ipv6-string",
"GET /fastly/getgeolocationforipaddress/called-unbound",
"GET /fastly:geolocation",
"GET /kv-store/exposed-as-global",
"GET /kv-store/interface",
"GET /kv-store/constructor/called-as-regular-function",
Expand Down Expand Up @@ -291,6 +309,7 @@
"GET /kv-store/put/value-parameter-arraybuffer",
"GET /kv-store/put/value-parameter-typed-arrays",
"GET /kv-store/put/value-parameter-dataview",
"POST /kv-store/put/request-body",
"GET /kv-store/delete/called-as-constructor",
"GET /kv-store/delete/called-unbound",
"GET /kv-store/delete/key-parameter-calls-7.1.17-ToString",
Expand Down Expand Up @@ -324,10 +343,29 @@
"GET /kv-store/get/key-does-not-exist-returns-null",
"GET /kv-store/get/key-exists",
"GET /kv-store/get/multiple-lookups-at-once",
"GET /kv-store-entry/interface",
"GET /kv-store-entry/text/valid",
"GET /kv-store-entry/json/valid",
"GET /kv-store-entry/json/invalid",
"GET /kv-store-entry/arrayBuffer/valid",
"GET /kv-store-entry/bodyUsed",
"GET /missing-backend",
"GET /multiple-set-cookie/response-init",
"GET /multiple-set-cookie/response-direct",
"GET /multiple-set-cookie/downstream",
"GET /Performance/interface",
"GET /request/constructor/fastly/decompressGzip/true",
"GET /request/constructor/fastly/decompressGzip/false",
"GET /fetch/requestinit/fastly/decompressGzip/true",
"GET /fetch/requestinit/fastly/decompressGzip/false",
"GET /request/setCacheKey/called-as-constructor",
"GET /request/setCacheKey/called-unbound",
"GET /request/setCacheKey/key-parameter-calls-7.1.17-ToString",
"GET /request/setCacheKey/key-parameter-not-supplied",
"GET /request/setCacheKey/key-valid",
"GET /request/clone/called-as-constructor",
"GET /request/clone/called-unbound",
"GET /request/clone/valid",
"GET /request/clone/invalid",
"GET /response/text/guest-backed-stream",
"GET /response/json/guest-backed-stream",
Expand Down Expand Up @@ -379,6 +417,7 @@
"GET /urlsearchparams/sort",
"GET /random",
"GET /error",
"GET /tee/error",
"GET /override-content-length/request/init/object-literal/true",
"GET /override-content-length/request/init/object-literal/false",
"GET /override-content-length/fetch/init/object-literal/true",
Expand All @@ -388,5 +427,6 @@
"GET /override-content-length/response/init/response-instance/true",
"GET /override-content-length/response/init/response-instance/false",
"GET /override-content-length/response/method/false",
"GET /override-content-length/response/method/true"
"GET /override-content-length/response/method/true",
"GET /headers/non-ascii-latin1-field-value"
]
6 changes: 6 additions & 0 deletions runtime/fastly/builtins/fetch-event.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "fetch-event.h"
#include "../../StarlingMonkey/builtins/web/performance.h"
#include "../../StarlingMonkey/builtins/web/url.h"
#include "../../StarlingMonkey/builtins/web/worker-location.h"
#include "../host-api/fastly.h"
Expand Down Expand Up @@ -172,6 +173,7 @@ bool ClientInfo::tls_cipher_openssl_name_get(JSContext *cx, unsigned argc, JS::V
}

bool ClientInfo::tls_ja3_md5_get(JSContext *cx, unsigned argc, JS::Value *vp) {
fprintf(stderr, "tlsJA3MD5");
METHOD_HEADER(0);

JS::RootedString result(cx, ja3(self));
Expand Down Expand Up @@ -410,6 +412,10 @@ JSObject *FetchEvent::prepare_downstream_request(JSContext *cx) {

bool FetchEvent::init_request(JSContext *cx, JS::HandleObject self, host_api::HttpReq req,
host_api::HttpBody body) {

builtins::web::performance::Performance::timeOrigin.emplace(
std::chrono::high_resolution_clock::now());

JS::RootedObject request(
cx, &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Request)).toObject());

Expand Down

0 comments on commit c0caefc

Please sign in to comment.