Artifactspublic-v0

curl

master
ply4 git calls31 ms293 KiB3 cachedprotocol v2
689 lines20 KiBRaw
1/***************************************************************************
2 * _ _ ____ _
3 * Project ___| | | | _ \| |
4 * / __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
7 *
8 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9 *
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at https://curl.se/docs/copyright.html.
13 *
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 * SPDX-License-Identifier: curl
22 *
23 ***************************************************************************/
24#include "curl_setup.h"
26#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HTTPSIG)
28#include "urldata.h"
29#include "http_httpsig.h"
30#include "curl_ed25519.h"
31#include "curl_hmac.h"
32#include "curl_sha256.h"
33#include "http.h"
34#include "transfer.h"
35#include "curl_trc.h"
36#include "slist.h"
37#include "curlx/dynbuf.h"
38#include "curlx/base64.h"
39#include "curlx/strdup.h"
40#include "curlx/strparse.h"
41#include "strcase.h"
43#include <time.h>
45#define HTTPSIG_MAX_SIG_BASE CURL_MAX_HTTP_HEADER
46#define HTTPSIG_MAX_COMPONENTS 16
47#define HTTPSIG_MAX_RAW_SIG CURL_ED25519_SIGLEN
48#define HTTPSIG_DEFAULT_LABEL "sig1"
50enum httpsig_alg {
51 HTTPSIG_ALG_ED25519,
52 HTTPSIG_ALG_HMAC_SHA256,
53 HTTPSIG_ALG_UNKNOWN
54};
56static const char *alg_to_str(enum httpsig_alg alg)
58 switch(alg) {
59 case HTTPSIG_ALG_ED25519:
60 return "ed25519";
61 case HTTPSIG_ALG_HMAC_SHA256:
62 return "hmac-sha256";
63 default:
64 break;
65 }
66 return NULL;
69static enum httpsig_alg id_to_alg(uint8_t val)
71 switch(val) {
72 case CURLHTTPSIG_ED25519:
73 return HTTPSIG_ALG_ED25519;
74 case CURLHTTPSIG_HMAC_SHA256:
75 return HTTPSIG_ALG_HMAC_SHA256;
76 default:
77 break;
78 }
79 return HTTPSIG_ALG_UNKNOWN;
82static CURLcode decode_hex_key(struct Curl_easy *data,
83 const char *hexstr,
84 unsigned char **keyout,
85 size_t *keylen)
87 size_t len, i;
88 unsigned char *keybuf;
90 *keyout = NULL;
91 *keylen = 0;
93 len = strlen(hexstr);
94 while(len > 0 && ISNEWLINE(hexstr[len - 1]))
95 len--;
97 if(len == 0 || (len & 1) != 0) {
98 failf(data, "httpsig: invalid hex key (length %zu)", len);
99 return CURLE_BAD_FUNCTION_ARGUMENT;
100 }
102 if(len > CURL_MAX_INPUT_LENGTH) {
103 failf(data, "httpsig: hex key too long");
104 return CURLE_BAD_FUNCTION_ARGUMENT;
105 }
107 keybuf = curlx_malloc(len / 2);
108 if(!keybuf)
109 return CURLE_OUT_OF_MEMORY;
111 for(i = 0; i < len; i += 2) {
112 if(!ISXDIGIT(hexstr[i]) || !ISXDIGIT(hexstr[i + 1])) {
113 failf(data, "httpsig: invalid hex at position %zu ('%c%c')",
114 i, hexstr[i], hexstr[i + 1]);
115 curlx_free(keybuf);
116 return CURLE_BAD_FUNCTION_ARGUMENT;
117 }
118 keybuf[i / 2] = (unsigned char)((curlx_hexval(hexstr[i]) << 4) |
119 curlx_hexval(hexstr[i + 1]));
120 }
122 *keyout = keybuf;
123 *keylen = len / 2;
124 return CURLE_OK;
127/* @authority matches the Host header field-value when available (RFC 9421).
128 data->state.http_host is produced by http_set_aptr_host() before auth. */
129static CURLcode httpsig_authority(struct Curl_easy *data,
130 struct connectdata *conn,
131 struct dynbuf *authority_buf)
133 const char *h = data->state.http_host;
135 if(h && curl_strnequal(h, "host:", 5)) {
136 const char *value = h + 5;
137 const char *end;
139 while(ISBLANK(*value))
140 value++;
141 if(*value) {
142 CURLcode result;
144 end = value;
145 while(*end && !ISNEWLINE(*end))
146 end++;
147 while(end > value && ISBLANK(end[-1]))
148 end--;
149 result = curlx_dyn_addn(authority_buf, value, (size_t)(end - value));
150 if(result)
151 return result;
152 return CURLE_OK;
153 }
154 }
156 {
157 const char *hostname = conn->origin->hostname;
158 uint16_t port = conn->origin->port;
160 if((conn->origin->scheme->defport != port) && port)
161 return curlx_dyn_addf(authority_buf, "%s:%u", hostname, port);
162 return curlx_dyn_add(authority_buf, hostname);
163 }
166static CURLcode sf_append_quoted(struct dynbuf *buf, const char *str)
168 CURLcode result = curlx_dyn_addn(buf, "\"", 1);
169 if(result)
170 return result;
171 while(*str) {
172 if(ISCNTRL(*str))
173 return CURLE_BAD_FUNCTION_ARGUMENT;
174 if(*str == '\\' || *str == '"') {
175 result = curlx_dyn_addn(buf, "\\", 1);
176 if(result)
177 return result;
178 }
179 result = curlx_dyn_addn(buf, str, 1);
180 if(result)
181 return result;
182 str++;
183 }
184 return curlx_dyn_addn(buf, "\"", 1);
187/* base64-encode raw bytes into an RFC 8941 byte sequence (:base64:) */
188static CURLcode sf_encode_byte_seq(const unsigned char *raw, size_t rawlen,
189 struct dynbuf *out)
191 CURLcode result;
192 size_t b64len;
193 char *b64;
195 result = curlx_base64_encode(raw, rawlen, &b64, &b64len);
196 if(result)
197 return result;
199 result = curlx_dyn_addn(out, ":", 1);
200 if(!result)
201 result = curlx_dyn_addn(out, b64, b64len);
202 if(!result)
203 result = curlx_dyn_addn(out, ":", 1);
205 curlx_free(b64);
206 return result;
209static CURLcode build_sig_params(struct dynbuf *params,
210 const char **components, size_t count,
211 time_t created, const char *keyid,
212 enum httpsig_alg alg)
214 CURLcode result;
215 size_t i;
217 result = curlx_dyn_addn(params, "(", 1);
218 if(result)
219 return result;
221 for(i = 0; i < count; i++) {
222 if(i > 0) {
223 result = curlx_dyn_addn(params, " ", 1);
224 if(result)
225 return result;
226 }
227 result = sf_append_quoted(params, components[i]);
228 if(result)
229 return result;
230 }
232 result = curlx_dyn_addn(params, ")", 1);
233 if(result)
234 return result;
236 result = curlx_dyn_addf(params, ";created=%lld", (long long)created);
237 if(result)
238 return result;
240 if(keyid && *keyid) {
241 result = curlx_dyn_add(params, ";keyid=");
242 if(result)
243 return result;
244 result = sf_append_quoted(params, keyid);
245 if(result)
246 return result;
247 }
249 result = curlx_dyn_addf(params, ";alg=\"%s\"", alg_to_str(alg));
250 return result;
253/* strings defined by RFC 9421 */
254#define SIG_METHOD "@method"
255#define SIG_AUTHORITY "@authority"
256#define SIG_PATH "@path"
257#define SIG_QUERY "@query"
259/* Resolve a component identifier to its value.
260 * For headers, we walk the full user-supplied header list to combine
261 * duplicate field values with ", " per RFC 9421 Section 2.1. Each
262 * individual value is trimmed of leading/trailing OWS and the trailing
263 * \r\n. The combined result is written into the caller-provided buffer. */
264static CURLcode resolve_component(const char *name,
265 const char *method,
266 const char *authority,
267 const char *path,
268 const char *query,
269 struct Curl_easy *data,
270 struct dynbuf *valbuf,
271 const char **out)
273 *out = NULL;
275 if(name[0] == '@') {
276 if(curl_strequal(name, SIG_METHOD))
277 *out = method;
278 else if(curl_strequal(name, SIG_AUTHORITY))
279 *out = authority;
280 else if(curl_strequal(name, SIG_PATH))
281 *out = path;
282 else if(curl_strequal(name, SIG_QUERY))
283 *out = query;
284 else {
285 failf(data, "httpsig: unsupported derived component '%s'", name);
286 return CURLE_BAD_FUNCTION_ARGUMENT;
287 }
288 if(!*out) {
289 failf(data, "httpsig: derived component '%s' has no value", name);
290 return CURLE_BAD_FUNCTION_ARGUMENT;
291 }
292 return CURLE_OK;
293 }
294 else {
295 /* RFC 9421 Section 2.1: walk all user-supplied headers and combine
296 duplicate field values with ", " per HTTP field combination rules. */
297 struct curl_slist *head;
298 size_t namelen = strlen(name);
299 bool found = FALSE;
301 curlx_dyn_reset(valbuf);
303 for(head = data->set.headers; head; head = head->next) {
304 if(curl_strnequal(head->data, name, namelen) &&
305 Curl_headersep(head->data[namelen])) {
306 const char *p = strchr(head->data, ':');
307 if(p) {
308 CURLcode result;
309 struct Curl_str content;
310 curlx_str_assign(&content, p + 1, strlen(p + 1));
311 curlx_str_trimblanks(&content);
312 if(found) {
313 result = curlx_dyn_addn(valbuf, ", ", 2);
314 if(result)
315 return result;
316 }
317 result = curlx_dyn_addn(valbuf, curlx_str(&content),
318 curlx_strlen(&content));
319 if(result)
320 return result;
321 found = TRUE;
322 }
323 }
324 }
326 if(found) {
327 *out = curlx_dyn_ptr(valbuf);
328 return CURLE_OK;
329 }
330 failf(data, "httpsig: header '%s' not found in request", name);
331 return CURLE_BAD_FUNCTION_ARGUMENT;
332 }
335static CURLcode build_sig_base(struct dynbuf *base,
336 const char **components, size_t count,
337 const char *method,
338 const char *authority,
339 const char *path,
340 const char *query,
341 struct Curl_easy *data,
342 const char *sig_params)
344 CURLcode result;
345 size_t i;
346 struct dynbuf hdrvalbuf;
348 curlx_dyn_init(&hdrvalbuf, CURL_MAX_HTTP_HEADER);
350 for(i = 0; i < count; i++) {
351 const char *val = NULL;
352 result = resolve_component(components[i], method,
353 authority, path, query, data,
354 &hdrvalbuf, &val);
355 if(result || !val) {
356 failf(data, "httpsig: cannot resolve component '%s'", components[i]);
357 curlx_dyn_free(&hdrvalbuf);
358 return result ? result : CURLE_BAD_FUNCTION_ARGUMENT;
359 }
361 result = curlx_dyn_addf(base, "\"%s\": %s\n", components[i], val);
362 if(result) {
363 curlx_dyn_free(&hdrvalbuf);
364 return result;
365 }
366 }
368 curlx_dyn_free(&hdrvalbuf);
369 result = curlx_dyn_addf(base, "\"@signature-params\": %s", sig_params);
370 return result;
373static CURLcode parse_components(struct Curl_easy *data,
374 const char *query,
375 const char **components,
376 size_t *ncomp_out,
377 char **hdrs_copy_out)
379 const char *hdrs = CURL_EASY_STR(data, STRING_HTTPSIG_HEADERS);
380 size_t ncomp = 0;
382 *hdrs_copy_out = NULL;
383 if(hdrs && *hdrs) {
384 char *p;
385 char *hdrs_copy = curlx_strdup(hdrs);
386 if(!hdrs_copy)
387 return CURLE_OUT_OF_MEMORY;
388 *hdrs_copy_out = hdrs_copy;
389 p = hdrs_copy;
390 while(*p && ncomp < HTTPSIG_MAX_COMPONENTS) {
391 char *start;
392 size_t tlen = 0;
393 const char *p2 = p;
395 curlx_str_passblanks(&p2);
396 if(!*p2)
397 break;
398 p = start = CURL_UNCONST(p2);
399 while(*p && !ISBLANK(*p)) {
400 if((*p == '\"') || (*p == '\\'))
401 return CURLE_BAD_FUNCTION_ARGUMENT;
402 p++;
403 tlen++;
404 }
405 if(*p)
406 *p++ = '\0';
408 if(tlen && start[tlen - 1] == ':') {
409 /* Header field: drop the trailing ':' marker. RFC 9421 field
410 names are canonically lowercase (Section 2.1). */
411 start[--tlen] = '\0';
412 if(!tlen) {
413 failf(data, "httpsig: empty header component name");
414 return CURLE_BAD_FUNCTION_ARGUMENT;
415 }
416 Curl_strntolower(start, start, tlen);
417 components[ncomp++] = start;
418 }
419 else {
420 /* Derived component: map the bare name to its canonical RFC 9421
421 '@'-prefixed identifier (Section 2.2). */
422 Curl_strntolower(start, start, tlen);
423 if(!strcmp(start, "method"))
424 components[ncomp++] = SIG_METHOD;
425 else if(!strcmp(start, "authority"))
426 components[ncomp++] = SIG_AUTHORITY;
427 else if(!strcmp(start, "path"))
428 components[ncomp++] = SIG_PATH;
429 else if(!strcmp(start, "query"))
430 components[ncomp++] = SIG_QUERY;
431 else {
432 failf(data, "httpsig: unknown component '%s'", start);
433 return CURLE_BAD_FUNCTION_ARGUMENT;
434 }
435 }
436 }
437 if(!ncomp) {
438 failf(data, "httpsig: no signature components specified");
439 return CURLE_BAD_FUNCTION_ARGUMENT;
440 }
441 if(*p) {
442 failf(data, "httpsig: too many signature components (max %u)",
443 (unsigned int)HTTPSIG_MAX_COMPONENTS);
444 return CURLE_BAD_FUNCTION_ARGUMENT;
445 }
447 /* RFC 9421 Section 2: each covered component MUST occur only once */
448 {
449 size_t i, j;
451 for(i = 0; i < ncomp; i++) {
452 for(j = i + 1; j < ncomp; j++) {
453 if(!strcmp(components[i], components[j])) {
454 failf(data, "httpsig: duplicate signature component '%s'",
455 components[i]);
456 return CURLE_BAD_FUNCTION_ARGUMENT;
457 }
458 }
459 }
460 }
461 }
462 else {
463 components[ncomp++] = SIG_METHOD;
464 components[ncomp++] = SIG_AUTHORITY;
465 components[ncomp++] = SIG_PATH;
466 if(query)
467 components[ncomp++] = SIG_QUERY;
468 }
470 *ncomp_out = ncomp;
471 return CURLE_OK;
474static time_t httpsig_get_created(void)
476#ifdef DEBUGBUILD
477 char *force = getenv("CURL_FORCETIME");
478 if(force && *force) {
479 char *sigts = getenv("CURL_HTTPSIG_CREATED");
480 if(sigts && *sigts) {
481 const char *p = sigts;
482 curl_off_t num;
483 if(!curlx_str_number(&p, &num, CURL_OFF_T_MAX))
484 return (time_t)num;
485 }
486 return 0;
487 }
488#endif
489 return time(NULL);
492static CURLcode httpsig_sign_base(struct Curl_easy *data,
493 enum httpsig_alg alg,
494 const unsigned char *keybuf,
495 size_t keylen,
496 const struct dynbuf *sig_base,
497 unsigned char *raw_sig,
498 size_t *raw_sig_len)
500 CURLcode result;
502 switch(alg) {
503 case HTTPSIG_ALG_ED25519:
504 result = Curl_ed25519_sign(
505 keybuf, keylen,
506 (const unsigned char *)curlx_dyn_ptr(sig_base),
507 curlx_dyn_len(sig_base),
508 raw_sig, raw_sig_len);
509 break;
510 case HTTPSIG_ALG_HMAC_SHA256:
511 result = Curl_hmacit(&Curl_HMAC_SHA256, keybuf, keylen,
512 (const unsigned char *)curlx_dyn_ptr(sig_base),
513 curlx_dyn_len(sig_base), raw_sig);
514 if(!result)
515 *raw_sig_len = CURL_SHA256_DIGEST_LENGTH;
516 break;
517 default:
518 result = CURLE_BAD_FUNCTION_ARGUMENT;
519 break;
520 }
522 if(result && result == CURLE_NOT_BUILT_IN) {
523 failf(data, "httpsig: algorithm '%s' not supported by TLS backend",
524 alg_to_str(alg));
525 }
526 return result;
529CURLcode Curl_output_httpsig(struct Curl_easy *data)
531 CURLcode result = CURLE_OUT_OF_MEMORY;
532 struct connectdata *conn = data->conn;
533 const char *path;
534 const char *query;
535 Curl_HttpReq httpreq;
536 const char *method = NULL;
537 const char *hexkey = CURL_EASY_STR(data, STRING_HTTPSIG_KEY);
538 const char *keyid = CURL_EASY_STR(data, STRING_HTTPSIG_KEYID);
539 enum httpsig_alg alg;
540 time_t created;
541 struct dynbuf sig_params;
542 struct dynbuf sig_base;
543 struct dynbuf sig_hdr;
544 struct dynbuf input_hdr;
545 struct dynbuf authority_buf;
546 const char *authority;
547 const char *components[HTTPSIG_MAX_COMPONENTS];
548 size_t ncomp = 0;
549 unsigned char *keybuf = NULL;
550 size_t keylen = 0;
551 unsigned char raw_sig[HTTPSIG_MAX_RAW_SIG];
552 size_t raw_sig_len = 0;
553 char *auth_headers = NULL;
554 char *hdrs_copy = NULL;
555 struct dynbuf query_dyn;
557 alg = id_to_alg(data->set.httpsig_algorithm);
558 if(alg == HTTPSIG_ALG_UNKNOWN) {
559 failf(data, "httpsig: CURLOPT_HTTPSIG_ALGORITHM is required");
560 return CURLE_BAD_FUNCTION_ARGUMENT;
561 }
563 if(!hexkey || !*hexkey) {
564 failf(data, "httpsig: CURLOPT_HTTPSIG_KEY is required");
565 return CURLE_BAD_FUNCTION_ARGUMENT;
566 }
567 if(!keyid || !*keyid) {
568 failf(data, "httpsig: CURLOPT_HTTPSIG_KEYID is required");
569 return CURLE_BAD_FUNCTION_ARGUMENT;
570 }
572 curlx_dyn_init(&sig_params, CURL_MAX_HTTP_HEADER);
573 curlx_dyn_init(&sig_base, HTTPSIG_MAX_SIG_BASE);
574 curlx_dyn_init(&sig_hdr, CURL_MAX_HTTP_HEADER);
575 curlx_dyn_init(&input_hdr, CURL_MAX_HTTP_HEADER);
576 curlx_dyn_init(&authority_buf, CURL_MAX_HTTP_HEADER);
577 curlx_dyn_init(&query_dyn, CURL_MAX_HTTP_HEADER);
579 if(Curl_checkheaders(data, STRCONST("Signature")) ||
580 Curl_checkheaders(data, STRCONST("Signature-Input"))) {
581 /* user provides their own Signature / Signature-Input headers, consider
582 this done */
583 goto done;
584 }
586 result = decode_hex_key(data, hexkey, &keybuf, &keylen);
587 if(result)
588 goto fail;
590 if(alg == HTTPSIG_ALG_ED25519 && keylen != 32) {
591 failf(data, "httpsig: ed25519 requires a 32-byte key (got %zu)", keylen);
592 result = CURLE_BAD_FUNCTION_ARGUMENT;
593 goto fail;
594 }
596 Curl_http_method(data, &method, &httpreq);
598 path = data->state.up.path;
599 if(!path || !*path)
600 path = "/";
602 query = data->state.up.query;
604 result = httpsig_authority(data, conn, &authority_buf);
605 if(result)
606 goto fail;
607 authority = curlx_dyn_ptr(&authority_buf);
609 /* Build @query value: RFC 9421 Section 2.2.7 - always starts with "?" */
610 if(query && *query)
611 result = curlx_dyn_addf(&query_dyn, "?%s", query);
612 else
613 result = curlx_dyn_add(&query_dyn, "?");
614 if(result)
615 goto fail;
617 result = parse_components(data, query, components, &ncomp, &hdrs_copy);
618 if(result)
619 goto fail;
621 created = httpsig_get_created();
623 result = build_sig_params(&sig_params, components, ncomp,
624 created, keyid, alg);
625 if(result)
626 goto fail;
628 infof(data, "httpsig: Signature-Input params: %s",
629 curlx_dyn_ptr(&sig_params));
631 result = build_sig_base(&sig_base, components, ncomp,
632 method, authority, path,
633 curlx_dyn_ptr(&query_dyn),
634 data, curlx_dyn_ptr(&sig_params));
635 if(result)
636 goto fail;
638 infof(data, "httpsig: Signature base: [%s]",
639 curlx_dyn_ptr(&sig_base));
641 result = httpsig_sign_base(data, alg, keybuf, keylen, &sig_base,
642 raw_sig, &raw_sig_len);
643 if(result)
644 goto fail;
646 result = curlx_dyn_add(&sig_hdr, HTTPSIG_DEFAULT_LABEL "=");
647 if(result)
648 goto fail;
649 result = sf_encode_byte_seq(raw_sig, raw_sig_len, &sig_hdr);
650 if(result)
651 goto fail;
653 result = curlx_dyn_addf(&input_hdr, "%s=%s", HTTPSIG_DEFAULT_LABEL,
654 curlx_dyn_ptr(&sig_params));
655 if(result)
656 goto fail;
658 auth_headers = curl_maprintf("Signature-Input: %s\r\n"
659 "Signature: %s\r\n",
660 curlx_dyn_ptr(&input_hdr),
661 curlx_dyn_ptr(&sig_hdr));
662 if(!auth_headers)
663 goto fail;
665 infof(data, "httpsig: Signature-Input: %s", curlx_dyn_ptr(&input_hdr));
666 infof(data, "httpsig: Signature: %s", curlx_dyn_ptr(&sig_hdr));
667done:
668 curlx_free(data->req.hd_auth);
669 data->req.hd_auth = auth_headers;
670 data->state.authhost.done = TRUE;
671 result = CURLE_OK;
673fail:
674 if(keybuf) {
675 memset(keybuf, 0, keylen);
676 curlx_free(keybuf);
677 }
678 memset(raw_sig, 0, sizeof(raw_sig));
679 curlx_free(hdrs_copy);
680 curlx_dyn_free(&sig_params);
681 curlx_dyn_free(&sig_base);
682 curlx_dyn_free(&sig_hdr);
683 curlx_dyn_free(&input_hdr);
684 curlx_dyn_free(&authority_buf);
685 curlx_dyn_free(&query_dyn);
686 return result;
689#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_HTTPSIG */
Diagnostics4 git calls · 31 ms
CallStatusSizeTime031 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit4 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=4
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=4
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2005.8 KiB · hit24 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=24
git.response.bytes=5906
git.response.cache=HIT
git.response.duration_ms=24
git.fetch.wants=804018081e3227b064a7f10f1578c22f531d9768
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=5906
git.pkt.payload.max=5885
git.sideband.band1.bytes=5884
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e14014a9320bf5
Request
fd0390b7…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format