Artifactspublic-v0

curl

master
ply4 git calls223 ms293 KiB2 cachedprotocol v2
739 lines19 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 "tool_setup.h"
26#include "tool_cfgable.h"
27#include "tool_getparam.h"
28#include "tool_getpass.h"
29#include "tool_msgs.h"
30#include "tool_paramhlp.h"
31#include "tool_libinfo.h"
32#include "tool_util.h"
33#include "tool_version.h"
35struct getout *new_getout(struct OperationConfig *config)
37 struct getout *node = curlx_calloc(1, sizeof(struct getout));
38 struct getout *last = config->url_last;
39 if(node) {
40 static int outnum = 0;
42 /* append this new node last in the list */
43 if(last)
44 last->next = node;
45 else
46 config->url_list = node; /* first node */
48 /* move the last pointer */
49 config->url_last = node;
51 node->useremote = config->remote_name_all;
52 node->num = outnum++;
53 }
54 return node;
57#define ISCRLF(x) (((x) == '\r') || ((x) == '\n') || ((x) == '\0'))
59/* memcrlf() has two modes. Both operate on a given memory area with
60 a specified size.
62 countcrlf FALSE - return number of bytes from the start that DO NOT include
63 any CR or LF or NULL
65 countcrlf TRUE - return number of bytes from the start that are ONLY CR or
66 LF or NULL.
67 */
68static size_t memcrlf(char *orig,
69 bool countcrlf, /* TRUE if we count CRLF, FALSE
70 if we count non-CRLF */
71 size_t max)
73 char *ptr;
74 size_t total = max;
75 for(ptr = orig; max; max--, ptr++) {
76 bool crlf = ISCRLF(*ptr);
77 if(countcrlf ^ crlf)
78 return ptr - orig;
79 }
80 return total; /* no delimiter found */
83#define MAX_FILE2STRING MAX_FILE2MEMORY
85ParameterError file2string(char **bufp, FILE *file)
87 struct dynbuf dyn;
88 curlx_dyn_init(&dyn, MAX_FILE2STRING);
89 if(file) {
90 do {
91 char buffer[4096];
92 char *ptr;
93 size_t nread = fread(buffer, 1, sizeof(buffer), file);
94 if(ferror(file)) {
95 curlx_dyn_free(&dyn);
96 *bufp = NULL;
97 return PARAM_READ_ERROR;
98 }
99 ptr = buffer;
100 while(nread) {
101 size_t nlen = memcrlf(ptr, FALSE, nread);
102 if(curlx_dyn_addn(&dyn, ptr, nlen))
103 return PARAM_NO_MEM;
104 nread -= nlen;
106 if(nread) {
107 ptr += nlen;
108 nlen = memcrlf(ptr, TRUE, nread);
109 ptr += nlen;
110 nread -= nlen;
111 }
112 }
113 } while(!feof(file));
114 }
115 *bufp = curlx_dyn_ptr(&dyn);
116 return PARAM_OK;
119ParameterError file2memory_range(char **bufp, size_t *size, FILE *file,
120 curl_off_t starto, curl_off_t endo)
122 if(file) {
123 size_t nread;
124 struct dynbuf dyn;
125 curl_off_t offset = 0;
126 curl_off_t throwaway = 0;
128 if(starto) {
129 if(file != stdin) {
130 if(curlx_fseek(file, starto, SEEK_SET))
131 return PARAM_READ_ERROR;
132 offset = starto;
133 }
134 else
135 /* we cannot seek stdin, read 'starto' bytes and throw them away */
136 throwaway = starto;
137 }
139 /* The size needs to fit in an int later */
140 curlx_dyn_init(&dyn, MAX_FILE2MEMORY);
141 do {
142 char buffer[4096];
143 size_t n_add;
144 char *ptr_add;
145 nread = fread(buffer, 1, sizeof(buffer), file);
146 if(ferror(file)) {
147 curlx_dyn_free(&dyn);
148 *size = 0;
149 *bufp = NULL;
150 return PARAM_READ_ERROR;
151 }
152 n_add = nread;
153 ptr_add = buffer;
154 if(nread) {
155 if(throwaway) {
156 if(throwaway >= (curl_off_t)nread) {
157 throwaway -= nread;
158 offset += nread;
159 n_add = 0; /* nothing to add */
160 }
161 else {
162 /* append the trailing piece */
163 n_add = (size_t)(nread - throwaway);
164 ptr_add = &buffer[throwaway];
165 offset += throwaway;
166 throwaway = 0;
167 }
168 }
169 if(n_add) {
170 if((curl_off_t)(n_add + offset) > endo)
171 n_add = (size_t)(endo - offset + 1);
173 if(curlx_dyn_addn(&dyn, ptr_add, n_add))
174 return PARAM_NO_MEM;
176 offset += n_add;
177 if(offset > endo)
178 break;
179 }
180 }
181 } while(!feof(file));
182 *size = curlx_dyn_len(&dyn);
183 *bufp = curlx_dyn_ptr(&dyn);
184 }
185 else {
186 *size = 0;
187 *bufp = NULL;
188 }
189 return PARAM_OK;
192ParameterError file2memory(char **bufp, size_t *size, FILE *file)
194 return file2memory_range(bufp, size, file, 0, CURL_OFF_T_MAX);
197/*
198 * Parse the string and write the long in the given address. Return PARAM_OK
199 * on success, otherwise a parameter specific error enum.
200 *
201 * Since this function gets called with the 'nextarg' pointer from within the
202 * getparameter a lot, we must check it for NULL before accessing the str
203 * data.
204 */
205ParameterError str2num(long *val, const char *str)
207 curl_off_t num;
208 bool is_neg = FALSE;
209 DEBUGASSERT(str);
210 if(!curlx_str_single(&str, '-'))
211 is_neg = TRUE;
212 if(curlx_str_number(&str, &num, LONG_MAX) ||
213 curlx_str_single(&str, '\0'))
214 return PARAM_BAD_NUMERIC; /* badness */
216 *val = (long)num;
217 if(is_neg)
218 *val = -*val;
219 return PARAM_OK; /* Ok */
222ParameterError oct2nummax(long *val, const char *str, long max)
224 curl_off_t num;
225 int rc;
226 DEBUGASSERT(str);
227 rc = curlx_str_octal(&str, &num, max);
228 if(rc) {
229 if(STRE_OVERFLOW == rc)
230 return PARAM_NUMBER_TOO_LARGE;
231 return PARAM_BAD_NUMERIC;
232 }
233 if(curlx_str_single(&str, '\0'))
234 return PARAM_BAD_NUMERIC;
235 if(num < 0)
236 return PARAM_NEGATIVE_NUMERIC;
237 *val = (long)num;
239 return PARAM_OK;
242/*
243 * Parse the string and write the long in the given address. Return PARAM_OK
244 * on success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS!
245 *
246 * Since this function gets called with the 'nextarg' pointer from within the
247 * getparameter a lot, we must check it for NULL before accessing the str
248 * data.
249 */
251ParameterError str2unum(long *val, const char *str)
253 ParameterError err = str2num(val, str);
254 if(err != PARAM_OK)
255 return err;
256 if(*val < 0)
257 return PARAM_NEGATIVE_NUMERIC;
259 return PARAM_OK;
262/*
263 * Parse the string and write the long in the given address if it is below the
264 * maximum allowed value. Return PARAM_OK on success, otherwise a parameter
265 * error enum. ONLY ACCEPTS POSITIVE NUMBERS!
266 *
267 * Since this function gets called with the 'nextarg' pointer from within the
268 * getparameter a lot, we must check it for NULL before accessing the str
269 * data.
270 */
272ParameterError str2unummax(long *val, const char *str, long max)
274 ParameterError err = str2unum(val, str);
275 if(err != PARAM_OK)
276 return err;
277 if(*val > max)
278 return PARAM_NUMBER_TOO_LARGE;
280 return PARAM_OK;
283/*
284 * Parse the string as seconds with decimals, and write the number of
285 * milliseconds that corresponds in the given address. Return PARAM_OK on
286 * success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS!
287 *
288 * The 'max' argument is the maximum value allowed, as the numbers are often
289 * multiplied when later used.
290 *
291 * Since this function gets called with the 'nextarg' pointer from within the
292 * getparameter a lot, we must check it for NULL before accessing the str
293 * data.
294 *
295 * Verified in test 1623
296 */
298ParameterError secs2ms(long *val, const char *str)
300 curl_off_t secs;
301 long ms = 0;
302 static const unsigned int digs[] = {
303 1,
304 10,
305 100,
306 1000,
307 10000,
308 100000,
309 1000000,
310 10000000,
311 100000000
312 };
313 if(!str || curlx_str_number(&str, &secs, LONG_MAX / 1000 - 1))
314 return PARAM_BAD_NUMERIC;
315 if(!curlx_str_single(&str, '.')) {
316 curl_off_t fracs;
317 const char *s = str;
318 size_t len;
319 int rc = curlx_str_number(&str, &fracs, CURL_OFF_T_MAX);
320 if(rc == STRE_OVERFLOW)
321 return PARAM_NUMBER_TOO_LARGE;
322 else if(rc)
323 return PARAM_BAD_NUMERIC;
324 /* how many milliseconds are in fracs ? */
325 len = (str - s);
326 while((len > CURL_ARRAYSIZE(digs) || (fracs > LONG_MAX / 100))) {
327 fracs /= 10;
328 len--;
329 }
330 ms = ((long)fracs * 100) / digs[len - 1];
331 }
332 if(curlx_str_single(&str, '\0'))
333 return PARAM_BAD_NUMERIC; /* trailing garbage */
335 *val = ((long)secs * 1000) + ms;
336 return PARAM_OK;
339/*
340 * Implement protocol sets in null-terminated array of protocol name pointers.
341 */
343/* Return index of prototype token in set, card(set) if not found.
344 Can be called with proto == NULL to get card(set). */
345static size_t protoset_index(const char * const *protoset, const char *proto)
347 const char * const *p = protoset;
349 DEBUGASSERT(proto == proto_token(proto)); /* Ensure it is tokenized. */
351 for(; *p; p++)
352 if(proto == *p)
353 break;
354 return p - protoset;
357/* Include protocol token in set. */
358static void protoset_set(const char **protoset, const char *proto)
360 if(proto) {
361 size_t n = protoset_index(protoset, proto);
363 if(!protoset[n]) {
364 DEBUGASSERT(n < proto_count);
365 protoset[n] = proto;
366 protoset[n + 1] = NULL;
367 }
368 }
371/* Exclude protocol token from set. */
372static void protoset_clear(const char **protoset, const char *proto)
374 if(proto) {
375 size_t n = protoset_index(protoset, proto);
377 if(protoset[n]) {
378 size_t m = protoset_index(protoset, NULL) - 1;
380 protoset[n] = protoset[m];
381 protoset[m] = NULL;
382 }
383 }
386/*
387 * Parse the string and provide an allocated libcurl compatible protocol
388 * string output. Return non-zero on failure, zero on success.
389 *
390 * The string is a list of protocols
391 *
392 * Since this function gets called with the 'nextarg' pointer from within the
393 * getparameter a lot, we must check it for NULL before accessing the str
394 * data.
395 */
397#define MAX_PROTOS 34
398#define MAX_PROTOSTRING (MAX_PROTOS * 11) /* Room for MAX_PROTOS number of
399 10-chars proto names. */
401ParameterError proto2num(const char * const *val, char **ostr, const char *str)
403 struct dynbuf obuf;
404 size_t proto;
405 CURLcode result = CURLE_OK;
406 const char *protoset[MAX_PROTOS + 1];
408 DEBUGASSERT(proto_count <= MAX_PROTOS);
409 if(proto_count > MAX_PROTOS) /* if case of surprises */
410 return PARAM_NO_MEM;
412 curlx_dyn_init(&obuf, MAX_PROTOSTRING);
414 /* Preset protocol set with default values. */
415 protoset[0] = NULL;
416 for(; *val; val++) {
417 const char *p = proto_token(*val);
419 if(p)
420 protoset_set(protoset, p);
421 }
423 while(*str) {
424 const char *next = strchr(str, ',');
425 size_t plen;
426 enum e_action { allow, deny, set } action = allow;
428 if(next) {
429 if(str == next) {
430 str++;
431 continue;
432 }
433 plen = next - str - 1;
434 }
435 else
436 plen = strlen(str) - 1;
438 /* Process token modifiers */
439 switch(*str++) {
440 case '=':
441 action = set;
442 break;
443 case '-':
444 action = deny;
445 break;
446 case '+':
447 action = allow;
448 break;
449 default:
450 /* no modifier */
451 str--;
452 plen++;
453 break;
454 }
456 if((plen == 3) && curl_strnequal(str, "all", 3)) {
457 switch(action) {
458 case deny:
459 protoset[0] = NULL;
460 break;
461 case allow:
462 case set:
463 memcpy((char *)protoset, built_in_protos,
464 (proto_count + 1) * sizeof(*protoset));
465 break;
466 }
467 }
468 else {
469 char buffer[32];
470 const char *p;
471 curl_msnprintf(buffer, sizeof(buffer), "%.*s", (int)plen, str);
473 p = proto_token(buffer);
475 if(p)
476 switch(action) {
477 case deny:
478 protoset_clear(protoset, p);
479 break;
480 case set:
481 protoset[0] = NULL;
482 FALLTHROUGH();
483 case allow:
484 protoset_set(protoset, p);
485 break;
486 }
487 else { /* unknown protocol */
488 /* If they have specified only this protocol, we say treat it as
489 if no protocols are allowed */
490 if(action == set)
491 protoset[0] = NULL;
492 errorf("unrecognized protocol '%s'", buffer);
493 return PARAM_BAD_USE;
494 }
495 }
496 if(next)
497 str = next + 1;
498 else
499 break;
500 }
502 /* We need the protocols in alphabetic order for CI tests requirements. */
503 qsort((char *)protoset, protoset_index(protoset, NULL), sizeof(*protoset),
504 struplocompare4sort);
506 for(proto = 0; protoset[proto] && !result; proto++)
507 result = curlx_dyn_addf(&obuf, "%s%s", curlx_dyn_len(&obuf) ? "," : "",
508 protoset[proto]);
509 if(result)
510 return PARAM_NO_MEM;
511 if(!curlx_dyn_len(&obuf)) {
512 curlx_dyn_free(&obuf);
513 return PARAM_BAD_USE;
514 }
515 curlx_free(*ostr);
516 *ostr = curlx_dyn_ptr(&obuf);
517 return PARAM_OK;
520/**
521 * Check if the given string is a protocol supported by libcurl
522 *
523 * @param str the protocol name
524 * @return PARAM_OK protocol supported
525 * @return PARAM_LIBCURL_UNSUPPORTED_PROTOCOL protocol not supported
526 * @return PARAM_REQUIRES_PARAMETER missing parameter
527 */
528ParameterError check_protocol(const char *str)
530 if(!str)
531 return PARAM_REQUIRES_PARAMETER;
533 if(proto_token(str))
534 return PARAM_OK;
535 return PARAM_LIBCURL_UNSUPPORTED_PROTOCOL;
538/**
539 * Parses the given string looking for an offset (which may be a
540 * larger-than-integer value). The offset CANNOT be negative!
541 *
542 * @param val the offset to populate
543 * @param str the buffer containing the offset
544 * @return PARAM_OK if successful, a parameter specific error enum if failure.
545 */
546ParameterError str2offset(curl_off_t *val, const char *str)
548 if(curlx_str_number(&str, val, CURL_OFF_T_MAX) ||
549 curlx_str_single(&str, '\0'))
550 return PARAM_BAD_NUMERIC;
551 return PARAM_OK;
554#define MAX_USERPWDLENGTH (100 * 1024)
555static CURLcode checkpasswd(const char *kind, /* for what purpose */
556 const size_t i, /* operation index */
557 const bool last, /* TRUE if last operation */
558 char **userpwd) /* pointer to allocated string */
560 char *psep;
561 char *osep;
563 if(!*userpwd)
564 return CURLE_OK;
566 /* Attempt to find the password separator */
567 psep = strchr(*userpwd, ':');
569 /* Attempt to find the options separator */
570 osep = strchr(*userpwd, ';');
572 if(!psep && **userpwd != ';') {
573 /* no password present, prompt for one */
574 char passwd[2048] = "";
575 char prompt[256];
576 struct dynbuf dyn;
578 curlx_dyn_init(&dyn, MAX_USERPWDLENGTH);
579 if(osep)
580 *osep = '\0';
582 /* build a nice-looking prompt */
583 if(!i && last)
584 curl_msnprintf(prompt, sizeof(prompt),
585 "Enter %s password for user '%s':",
586 kind, *userpwd);
587 else
588 curl_msnprintf(prompt, sizeof(prompt),
589 "Enter %s password for user '%s' on URL #%zu:",
590 kind, *userpwd, i + 1);
592 /* get password */
593 getpass_r(prompt, passwd, sizeof(passwd));
594 if(osep)
595 *osep = ';';
597 if(curlx_dyn_addf(&dyn, "%s:%s", *userpwd, passwd))
598 return CURLE_OUT_OF_MEMORY;
600 /* return the new string */
601 curlx_free(*userpwd);
602 *userpwd = curlx_dyn_ptr(&dyn);
603 }
605 return CURLE_OK;
608ParameterError add2list(struct curl_slist **list, const char *ptr)
610 struct curl_slist *newlist = curl_slist_append(*list, ptr);
611 if(newlist)
612 *list = newlist;
613 else
614 return PARAM_NO_MEM;
616 return PARAM_OK;
619long ftpfilemethod(const char *str)
621 if(curl_strequal("singlecwd", str))
622 return CURLFTPMETHOD_SINGLECWD;
623 if(curl_strequal("nocwd", str))
624 return CURLFTPMETHOD_NOCWD;
625 if(curl_strequal("multicwd", str))
626 return CURLFTPMETHOD_MULTICWD;
628 warnf("unrecognized ftp file method '%s', using default", str);
630 return CURLFTPMETHOD_MULTICWD;
633long ftpcccmethod(const char *str)
635 if(curl_strequal("passive", str))
636 return CURLFTPSSL_CCC_PASSIVE;
637 if(curl_strequal("active", str))
638 return CURLFTPSSL_CCC_ACTIVE;
640 warnf("unrecognized ftp CCC method '%s', using default", str);
642 return CURLFTPSSL_CCC_PASSIVE;
645long delegation(const char *str)
647 if(curl_strequal("none", str))
648 return CURLGSSAPI_DELEGATION_NONE;
649 if(curl_strequal("policy", str))
650 return CURLGSSAPI_DELEGATION_POLICY_FLAG;
651 if(curl_strequal("always", str))
652 return CURLGSSAPI_DELEGATION_FLAG;
654 warnf("unrecognized delegation method '%s', using none", str);
656 return CURLGSSAPI_DELEGATION_NONE;
659#define isheadersep(x) ((((x) == ':') || ((x) == ';')))
661/*
662 * inlist() returns true if the given 'checkfor' header is present in the
663 * header list.
664 */
665static bool inlist(const struct curl_slist *head, const char *checkfor)
667 size_t thislen = strlen(checkfor);
668 DEBUGASSERT(thislen);
669 DEBUGASSERT(checkfor[thislen - 1] != ':');
671 for(; head; head = head->next) {
672 if(curl_strnequal(head->data, checkfor, thislen) &&
673 isheadersep(head->data[thislen]))
674 return TRUE;
675 }
677 return FALSE;
680CURLcode get_args(struct OperationConfig *config, const size_t i)
682 CURLcode result = CURLE_OK;
683 bool last = (config->next ? FALSE : TRUE);
685 if(config->jsoned) {
686 ParameterError err = PARAM_OK;
687 /* --json also implies json Content-Type: and Accept: headers - if
688 they are not set with -H */
689 if(!inlist(config->headers, "Content-Type"))
690 err = add2list(&config->headers, "Content-Type: application/json");
691 if(!err && !inlist(config->headers, "Accept"))
692 err = add2list(&config->headers, "Accept: application/json");
693 if(err)
694 return CURLE_OUT_OF_MEMORY;
695 }
697 /* Check if we have a password for the given host user */
698 if(config->userpwd && !config->oauth_bearer)
699 result = checkpasswd("host", i, last, &config->userpwd);
701 /* Check if we have a password for the given proxy user */
702 if(!result && config->proxyuserpwd)
703 result = checkpasswd("proxy", i, last, &config->proxyuserpwd);
705 return result;
708/*
709 * Parse the string and modify ssl_version in the val argument. Return PARAM_OK
710 * on success, otherwise a parameter error enum.
711 *
712 * Since this function gets called with the 'nextarg' pointer from within the
713 * getparameter a lot, we must check it for NULL before accessing the str
714 * data.
715 */
717ParameterError str2tls_max(unsigned char *val, const char *str)
719 static struct s_tls_max {
720 const char *tls_max_str;
721 unsigned char tls_max;
722 } const tls_max_array[] = {
723 { "default", 0 }, /* lets the library decide */
724 { "1.0", 1 },
725 { "1.1", 2 },
726 { "1.2", 3 },
727 { "1.3", 4 }
728 };
729 size_t i = 0;
730 if(!str)
731 return PARAM_REQUIRES_PARAMETER;
732 for(i = 0; i < CURL_ARRAYSIZE(tls_max_array); i++) {
733 if(!strcmp(str, tls_max_array[i].tls_max_str)) {
734 *val = tls_max_array[i].tls_max;
735 return PARAM_OK;
736 }
737 }
738 return PARAM_BAD_USE;
Diagnostics4 git calls · 223 ms
CallStatusSizeTime0223 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
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 · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
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 · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
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
fetch2006.1 KiB218 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=218
git.response.bytes=6292
git.response.cache=MISS
git.response.duration_ms=218
git.fetch.wants=0056d181d105d65c60a8e20928a3d85d0d5bb34a
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=6292
git.pkt.payload.max=6271
git.sideband.band1.bytes=6270
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
a5e15f41eb29725b
Request
136f63ba…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format