master
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#ifndef CURL_DISABLE_NETRC
28#ifdef HAVE_PWD_H
29#ifdef __AMIGA__
30#undef __NO_NET_API /* required for AmigaOS to declare getpwuid() */
31#endif
32#include <pwd.h>
33#ifdef __AMIGA__
34#define __NO_NET_API
35#endif
36#endif
38#include "netrc.h"
39#include "urldata.h"
40#include "creds.h"
41#include "curl_trc.h"
42#include "strcase.h"
43#include "curl_get_line.h"
44#include "curlx/win32-fopen.h"
45#include "curlx/strparse.h"
48/* .netrc is not really a standard. The GNU definition can be found here:
49 * https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html
50 * This gives grammar like:
51 *
52 * LITERAL := \S+ | QUOTED
53 * QUOTED := "(\\[rnt\]|[^"])*"
54 * ANYTHING := .
55 * EMPTY_LINE := \r*\n\r*\n
56 * MACHINE := machine # case-insensitive
57 * LOGIN := login # case-insensitive
58 * PASSWD := password # case-insensitive
59 * ACCOUNT := account # case-insensitive
60 * MACDEF := macdef # case-insensitive
61 * DEFAULT := default # case-insensitive
62 *
63 * MACRO := MACDEF ANYTHING* EMPTY_LINE
64 * JUNK := LITERAL
65 * LKEY := ( LOGIN | PASSWD | ACCOUNT ) LITERAL
66 * MENTRY := MACHINE LITERAL LKEY*
67 * DENTRY := DEFAULT LKEY*
68 * NETRC := (MENTRY | DENTRY | MACRO | JUNK )* EOF
69 *
70 * Tokens are separated by whitespace or newlines. which have otherwise
71 * no special meaning, apart from the empty line ending a MACRO.
72 *
73 * Parsing is not strict, unmatched LITERALs are ignored
74 */
76#define MAX_NETRC_LINE 16384
77#define MAX_NETRC_FILE (128 * 1024)
78#define MAX_NETRC_TOKEN 4096
80#define NETRC_DEBUG 0
82/* convert a dynbuf call CURLcode error to a NETRCcode error */
83#define curl2netrc(r) \
84 ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
85 NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
87typedef enum {
88 NETRC_TOK_EOF,
89 NETRC_TOK_LITERAL,
90 NETRC_TOK_MACHINE,
91 NETRC_TOK_DEFAULT,
92 NETRC_TOK_ACCOUNT,
93 NETRC_TOK_LOGIN,
94 NETRC_TOK_PASSWD,
95 NETRC_TOK_MACDEF,
96 NETRC_TOK_JUNK
97} curl_netrc_token;
99struct netrc_lexer {
100 struct Curl_easy *data;
101 const char *content;
102 const char *pos;
103 struct dynbuf literal;
104 curl_netrc_token token;
105 bool pushed;
106};
108#if NETRC_DEBUG
109static const char *netrc_tokenstr(curl_netrc_token token)
110{
111 switch(token) {
112 case NETRC_TOK_EOF:
113 return "[EOF]";
114 case NETRC_TOK_LITERAL:
115 return "[LITERAL]";
116 case NETRC_TOK_MACHINE:
117 return "[MACHINE]";
118 case NETRC_TOK_DEFAULT:
119 return "[DEFAULT]";
120 case NETRC_TOK_ACCOUNT:
121 return "[ACCOUNT]";
122 case NETRC_TOK_LOGIN:
123 return "[LOGIN]";
124 case NETRC_TOK_PASSWD:
125 return "[PASSWORD]";
126 case NETRC_TOK_MACDEF:
127 return "[MACDEF]";
128 case NETRC_TOK_JUNK:
129 return "[JUNK]";
130 default:
131 return "[???]";
132 }
133}
134#endif
136static void netrc_lexer_init(struct netrc_lexer *lexer,
137 struct Curl_easy *data,
138 const char *content)
139{
140 curlx_dyn_init(&lexer->literal, MAX_NETRC_TOKEN);
141 lexer->data = data;
142 lexer->content = lexer->pos = content;
143}
145static void netrc_lexer_cleanup(struct netrc_lexer *lexer)
146{
147 lexer->content = lexer->pos = NULL;
148 lexer->data = NULL;
149 curlx_dyn_free(&lexer->literal);
150}
152static void netrc_skip_blanks(struct netrc_lexer *lexer)
153{
154 const char *s = lexer->pos;
155 while(*s) {
156 curlx_str_passblanks(&s);
157 while(*s == '\r')
158 ++s;
159 if(*s == '\n') {
160 ++s;
161 }
162 else
163 break;
164 }
165 lexer->pos = s;
166}
168static void netrc_skip_to_empty_line(struct netrc_lexer *lexer)
169{
170 const char *s = lexer->pos;
171 while(*s) {
172 if(*s == '\r')
173 ++s;
174 else if(*s == '\n') {
175 ++s;
176 while(*s == '\r')
177 ++s;
178 if(*s == '\n')
179 goto out;
180 }
181 else
182 ++s;
183 }
184out:
185 lexer->pos = s;
186}
188/*
189 * Parse a quoted token starting after the opening '"'. Handles \n, \r, \t
190 * escape sequences. Advances *tok_endp past the closing '"'.
191 *
192 * Returns NETRC_OK or error.
193 */
194static NETRCcode netrc_lexer_quoted(struct netrc_lexer *lexer)
195{
196 NETRCcode rc = NETRC_SYNTAX_ERROR;
197 const char *s = lexer->pos;
198 bool escape = FALSE;
199 CURLcode result;
201 DEBUGASSERT(*s == '\"');
202 ++s; /* pass the leading quote */
203 while(*s) {
204 char c = *s;
205 if(escape) {
206 escape = FALSE;
207 switch(c) {
208 case 'n':
209 c = '\n';
210 break;
211 case 'r':
212 c = '\r';
213 break;
214 case 't':
215 c = '\t';
216 break;
217 }
218 }
219 else if(c == '\\') {
220 escape = TRUE;
221 ++s;
222 continue;
223 }
224 else if(c == '\"') {
225 ++s; /* pass the ending quote */
226 /* Ensure even an empty literal has a null-terminator. */
227 result = curlx_dyn_addn(&lexer->literal, "", 0);
228 rc = curl2netrc(result);
229 goto out;
230 }
231 result = curlx_dyn_addn(&lexer->literal, &c, 1);
232 if(result) {
233 rc = curl2netrc(result);
234 goto out;
235 }
236 ++s;
237 }
238out:
239 lexer->pos = s;
240 return rc;
241}
243static void netrc_lexer_push(struct netrc_lexer *lexer)
244{
245 lexer->pushed = TRUE;
246}
248static NETRCcode netrc_lexer_next(struct netrc_lexer *lexer,
249 bool want_literal)
250{
251 const char *s = lexer->pos, *start;
252 NETRCcode rc = NETRC_OK;
253 size_t slen;
254 CURLcode result;
256 if(lexer->pushed) {
257 lexer->pushed = FALSE;
258 goto out;
259 }
261 curlx_dyn_reset(&lexer->literal);
262 netrc_skip_blanks(lexer);
263 s = lexer->pos;
265 switch(*s) {
266 case 0:
267 lexer->token = NETRC_TOK_EOF;
268 break;
269 case '\"':
270 rc = netrc_lexer_quoted(lexer);
271 lexer->token = NETRC_TOK_LITERAL;
272 s = lexer->pos;
273 break;
274 default:
275 /* unquoted token */
276 start = s;
277 while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
278 ++s;
279 slen = s - start;
280 if(!slen) {
281 rc = NETRC_SYNTAX_ERROR;
282 }
283 if(want_literal) {
284 lexer->token = NETRC_TOK_LITERAL;
285 result = curlx_dyn_addn(&lexer->literal, start, slen);
286 rc = curl2netrc(result);
287 }
288 else if((slen == 7) && curl_strnequal(start, "machine", slen)) {
289 lexer->token = NETRC_TOK_MACHINE;
290 }
291 else if((slen == 7) && curl_strnequal(start, "default", slen)) {
292 lexer->token = NETRC_TOK_DEFAULT;
293 }
294 else if((slen == 7) && curl_strnequal(start, "account", slen)) {
295 lexer->token = NETRC_TOK_ACCOUNT;
296 }
297 else if((slen == 5) && curl_strnequal(start, "login", slen)) {
298 lexer->token = NETRC_TOK_LOGIN;
299 }
300 else if((slen == 8) && curl_strnequal(start, "password", slen)) {
301 lexer->token = NETRC_TOK_PASSWD;
302 }
303 else if((slen == 6) && curl_strnequal(start, "macdef", slen)) {
304 lexer->token = NETRC_TOK_MACDEF;
305 }
306 else {
307 lexer->token = NETRC_TOK_JUNK;
308 }
309 break;
310 }
312out:
313#if NETRC_DEBUG
314 CURL_TRC_M(lexer->data, "[NETRC] token %s '%s', rc=%d",
315 netrc_tokenstr(lexer->token),
316 curlx_dyn_ptr(&lexer->literal), rc);
317#endif
318 lexer->pos = s;
319 return rc;
320}
322struct netrc_scanner {
323 struct netrc_lexer lexer;
324 const char *hostname; /* non-NULL, machine to scan for */
325 const char *user; /* maybe NULL, login to scan for */
326 char *login;
327 char *passwd;
328 struct Curl_creds *creds;
329 bool matches_host;
330 bool found;
331};
333static void netrc_scan_reset(struct netrc_scanner *sc)
334{
335 curlx_safefree(sc->login);
336 curlx_safefree(sc->passwd);
337 sc->matches_host = FALSE;
338}
340static void netrc_scan_init(struct netrc_scanner *sc,
341 struct Curl_easy *data,
342 const char *content,
343 const char *hostname,
344 const char *user)
345{
346 memset(sc, 0, sizeof(*sc));
347 netrc_lexer_init(&sc->lexer, data, content);
348 sc->hostname = hostname;
349 sc->user = (user && user[0]) ? user : NULL;
350 netrc_scan_reset(sc);
351}
353static void netrc_scan_cleanup(struct netrc_scanner *sc)
354{
355 netrc_scan_reset(sc);
356 sc->hostname = NULL;
357 sc->user = NULL;
358 Curl_creds_unlink(&sc->creds);
359 netrc_lexer_cleanup(&sc->lexer);
360}
362static NETRCcode netrc_scan_literal(struct netrc_scanner *sc,
363 char **pdest)
364{
365 NETRCcode rc = netrc_lexer_next(&sc->lexer, TRUE);
366 if(!rc) {
367 if(sc->lexer.token == NETRC_TOK_LITERAL) {
368 if(pdest && sc->matches_host) {
369 curlx_free(*pdest);
370 *pdest = curlx_strdup(curlx_dyn_ptr(&sc->lexer.literal));
371 if(!*pdest)
372 rc = NETRC_OUT_OF_MEMORY;
373 }
374 }
375 else
376 netrc_lexer_push(&sc->lexer);
377 }
378 return rc;
379}
381static NETRCcode netrc_scan_end_entry(struct netrc_scanner *sc)
382{
383 NETRCcode rc = NETRC_OK;
384#if NETRC_DEBUG
385 CURL_TRC_M(sc->lexer.data,
386 "[NETRC] entry matches_host=%d, login='%s', passwd='%s'",
387 sc->matches_host, sc->login, sc->passwd);
388#endif
389 if(sc->matches_host) {
390 if(sc->login) {
391 if(sc->user) {
392 if(Curl_timestrcmp(sc->user, sc->login))
393 goto out;
394 /* We look for a specific user,
395 * entry is only interesting with password */
396 sc->found = !!sc->passwd;
397 }
398 else {
399 sc->found = TRUE;
400 }
401 }
402 else if(sc->passwd) {
403 /* found a passwd that applies to any user */
404 sc->found = TRUE;
405 }
406 else {
407 /* entry has nothing interesting */
408 }
409 if(sc->found) {
410#if NETRC_DEBUG
411 CURL_TRC_M(sc->lexer.data, "[NETRC] entry match found");
412#endif
413 if(Curl_creds_create(sc->user ? sc->user : sc->login, sc->passwd,
414 NULL, NULL, NULL, CREDS_NETRC, &sc->creds))
415 rc = NETRC_OUT_OF_MEMORY;
416 }
417 }
418out:
419 netrc_scan_reset(sc);
420 return rc;
421}
423static NETRCcode netrc_scan(struct Curl_easy *data,
424 const char *content,
425 const char *hostname,
426 const char *user,
427 struct Curl_creds **pcreds)
428{
429 struct netrc_scanner sc;
430 NETRCcode rc = NETRC_OK;
432 Curl_creds_unlink(pcreds);
433 netrc_scan_init(&sc, data, content, hostname, user);
435 while(!rc && !sc.found) {
436 rc = netrc_lexer_next(&sc.lexer, FALSE);
437 if(!rc) {
438 /* Does this token end any previous entry? */
439 switch(sc.lexer.token) {
440 case NETRC_TOK_EOF:
441 case NETRC_TOK_MACHINE:
442 case NETRC_TOK_DEFAULT:
443 case NETRC_TOK_MACDEF:
444 rc = netrc_scan_end_entry(&sc);
445 if(rc || sc.found)
446 goto out;
447 break;
448 default:
449 break;
450 }
452 switch(sc.lexer.token) {
453 case NETRC_TOK_EOF:
454 goto out;
455 case NETRC_TOK_MACHINE:
456 rc = netrc_lexer_next(&sc.lexer, TRUE);
457 if(!rc) {
458 if(sc.lexer.token == NETRC_TOK_LITERAL) {
459 sc.matches_host = curl_strequal(
460 sc.hostname, curlx_dyn_ptr(&sc.lexer.literal));
461 }
462 else {
463 sc.matches_host = FALSE;
464 netrc_lexer_push(&sc.lexer);
465 }
466 }
467 break;
468 case NETRC_TOK_DEFAULT:
469 sc.matches_host = TRUE;
470 break;
471 case NETRC_TOK_ACCOUNT:
472 rc = netrc_scan_literal(&sc, NULL); /* ignore, not used */
473 break;
474 case NETRC_TOK_LOGIN:
475 rc = netrc_scan_literal(&sc, &sc.login);
476 break;
477 case NETRC_TOK_PASSWD:
478 rc = netrc_scan_literal(&sc, &sc.passwd);
479 break;
480 case NETRC_TOK_MACDEF:
481 netrc_skip_to_empty_line(&sc.lexer);
482 break;
483 case NETRC_TOK_LITERAL:
484 case NETRC_TOK_JUNK:
485 default:
486 /* skip this */
487 break;
488 }
489 }
490 }
492out:
493 if(!rc) {
494 if(sc.creds)
495 Curl_creds_link(pcreds, sc.creds);
496 else
497 rc = NETRC_NO_MATCH;
498 }
499 netrc_scan_cleanup(&sc);
500 return rc;
501}
503static NETRCcode file2memory(const char *filename, struct dynbuf *filebuf)
504{
505 NETRCcode ret = NETRC_FILE_MISSING; /* if it cannot open the file */
506 FILE *file = curlx_fopen(filename, FOPEN_READTEXT);
508 curlx_dyn_reset(filebuf);
509 if(file) {
510 curlx_struct_stat stat;
511 if((curlx_fstat(fileno(file), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
512 CURLcode result = CURLE_OK;
513 bool eof;
514 struct dynbuf linebuf;
515 curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
516 ret = NETRC_OK;
517 do {
518 const char *line;
519 /* Curl_get_line always returns lines ending with a newline */
520 result = Curl_get_line(&linebuf, file, &eof);
521 if(!result) {
522 line = curlx_dyn_ptr(&linebuf);
523 /* skip comments on load */
524 curlx_str_passblanks(&line);
525 if(*line == '#')
526 continue;
527 result = curlx_dyn_add(filebuf, line);
528 }
529 if(result) {
530 curlx_dyn_free(filebuf);
531 ret = curl2netrc(result);
532 break;
533 }
534 } while(!eof);
535 curlx_dyn_free(&linebuf);
536 }
537 curlx_fclose(file);
538 }
539 return ret;
540}
542static NETRCcode netrc_scan_file(struct Curl_easy *data,
543 struct store_netrc *store,
544 const char *hostname,
545 const char *user,
546 const char *netrcfile,
547 struct Curl_creds **pcreds)
548{
549 struct dynbuf *filebuf = &store->filebuf;
551 if(!store->loaded || strcmp(netrcfile, store->filename)) {
552 NETRCcode ret;
553 store->loaded = FALSE;
554 ret = file2memory(netrcfile, filebuf);
555 if(ret) {
556 CURL_TRC_M(data, "[NETRC] could not load '%s'", netrcfile);
557 return ret;
558 }
559 curlx_free(store->filename);
560 store->filename = curlx_strdup(netrcfile);
561 if(!store->filename) {
562 curlx_dyn_reset(&store->filebuf);
563 return NETRC_OUT_OF_MEMORY;
564 }
565 store->loaded = TRUE;
566 }
567 if(!curlx_dyn_len(filebuf))
568 return NETRC_NO_MATCH;
570 return netrc_scan(data, curlx_dyn_ptr(filebuf), hostname, user, pcreds);
571}
573/*
574 * @unittest: 1304
575 *
576 * *loginp and *passwordp MUST be allocated if they are not NULL when passed
577 * in.
578 */
579NETRCcode Curl_netrc_scan(struct Curl_easy *data,
580 struct store_netrc *store,
581 const char *hostname,
582 const char *user,
583 const char *netrcfile,
584 struct Curl_creds **pcreds)
585{
586 NETRCcode retcode = NETRC_OK;
588 CURL_TRC_M(data, "[NETRC] scanning '%s' for host '%s' user '%s'",
589 netrcfile, hostname, user);
590 Curl_creds_unlink(pcreds);
591 if(!netrcfile) {
592 char *home = NULL;
593 char *homea = NULL;
594 char *filealloc = NULL;
595#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
596 char pwbuf[1024];
597#endif
598 filealloc = curl_getenv("NETRC");
599 if(!filealloc) {
600 homea = curl_getenv("HOME"); /* portable environment reader */
601 if(homea) {
602 home = homea;
603#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
604 }
605 else {
606 struct passwd pw, *pw_res;
607 if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) &&
608 pw_res) {
609 home = pw.pw_dir;
610 }
611#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
612 }
613 else {
614 struct passwd *pw;
615 pw = getpwuid(geteuid());
616 if(pw) {
617 home = pw->pw_dir;
618 }
619#elif defined(_WIN32)
620 }
621 else {
622 homea = curl_getenv("USERPROFILE");
623 if(homea) {
624 home = homea;
625 }
626#endif
627 }
629 if(!home)
630 return NETRC_FILE_MISSING; /* no home directory found (or possibly out
631 of memory) */
633 filealloc = curl_maprintf("%s%s.netrc", home, DIR_CHAR);
634 if(!filealloc) {
635 curlx_free(homea);
636 retcode = NETRC_OUT_OF_MEMORY;
637 goto out;
638 }
639 }
640 retcode = netrc_scan_file(
641 data, store, hostname, user, filealloc, pcreds);
642 curlx_free(filealloc);
643#ifdef _WIN32
644 if(retcode == NETRC_FILE_MISSING) {
645 /* fallback to the old-style "_netrc" file */
646 filealloc = curl_maprintf("%s%s_netrc", home, DIR_CHAR);
647 if(!filealloc) {
648 curlx_free(homea);
649 return NETRC_OUT_OF_MEMORY;
650 }
651 retcode = netrc_scan_file(
652 data, store, hostname, user, filealloc, pcreds);
653 curlx_free(filealloc);
654 }
655#endif
656 curlx_free(homea);
657 }
658 else
659 retcode = netrc_scan_file(
660 data, store, hostname, user, netrcfile, pcreds);
662out:
663 if(retcode)
664 Curl_creds_unlink(pcreds);
665 return retcode;
666}
668void Curl_netrc_init(struct store_netrc *store)
669{
670 curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
671 store->loaded = FALSE;
672 store->filename = NULL;
673}
674void Curl_netrc_cleanup(struct store_netrc *store)
675{
676 curlx_dyn_free(&store->filebuf);
677 curlx_safefree(store->filename);
678 store->loaded = FALSE;
679}
681const char *Curl_netrc_strerror(NETRCcode ret)
682{
683 switch(ret) {
684 default:
685 return ""; /* not a legit error */
686 case NETRC_FILE_MISSING:
687 return "no such file";
688 case NETRC_NO_MATCH:
689 return "no matching entry";
690 case NETRC_OUT_OF_MEMORY:
691 return "out of memory";
692 case NETRC_SYNTAX_ERROR:
693 return "syntax error";
694 }
695 /* never reached */
696}
698#endif /* !CURL_DISABLE_NETRC */
Diagnostics4 git calls · 36 ms
CallStatusSizeTime036 ms
discover200152 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch 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 · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=31 git.response.bytes=293470 git.response.cache=HIT git.response.duration_ms=2 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=86Open pack map
fetch2005.4 KiB · hit31 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=5493 git.response.cache=HIT git.response.duration_ms=31 git.fetch.wants=6a6049a7d2eb4bf976ad9f18bfb99022f909eecc 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=5493 git.pkt.payload.max=5472 git.sideband.band1.bytes=5471 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
- a5e180c8987e3014
- Request
- 0b2dbf9d…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format