master
1/***************************************************************************
2 * _ _ ____ _
3 * Project ___| | | | _ \| |
4 * / __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
7 *
8 * Copyright (C) Linus Nielsen Feltzing, <linus@haxx.se>
9 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
10 *
11 * This software is licensed as described in the file COPYING, which
12 * you should have received as part of this distribution. The terms
13 * are also available at https://curl.se/docs/copyright.html.
14 *
15 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
16 * copies of the Software, and permit persons to whom the Software is
17 * furnished to do so, under the terms of the COPYING file.
18 *
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
21 *
22 * SPDX-License-Identifier: curl
23 *
24 ***************************************************************************/
25#include "curl_setup.h"
27#include "urldata.h"
28#include "url.h"
29#include "cfilters.h"
30#include "progress.h"
31#include "multiif.h"
32#include "multi_ev.h"
33#include "curl_trc.h"
34#include "cshutdn.h"
35#include "sigpipe.h"
36#include "connect.h"
37#include "select.h"
38#include "curlx/strparse.h"
41#define DEFAULT_SHUTDOWN_TIMEOUT_MS (2 * 1000)
43void Curl_cshutdn_start_timer(struct Curl_easy *data, int8_t sockindex,
44 int timeout_ms)
45{
46 struct connectdata *conn = data->conn;
47 const struct curltime *pnow = Curl_pgrs_now(data);
49 DEBUGASSERT(conn);
50 conn->shutdown.start_ms[sockindex] =
51 curlx_ptimediff_ms(pnow, &conn->created);
52 conn->shutdown.timeout_ms = (timeout_ms > 0) ?
53 (timediff_t)timeout_ms :
54 ((data->set.shutdowntimeout > 0) ?
55 data->set.shutdowntimeout : DEFAULT_SHUTDOWN_TIMEOUT_MS);
56 CURL_TRC_M(data, "shutdown start on%s connection",
57 sockindex ? " secondary" : "");
58}
60timediff_t Curl_cshutdn_timeleft_ms(struct Curl_easy *data,
61 struct connectdata *conn,
62 int8_t sockindex)
63{
64 timediff_t left_ms;
66 if(conn->shutdown.start_ms[sockindex] < 0)
67 return 0; /* not started or no limits */
69 left_ms = conn->shutdown.timeout_ms -
70 (curlx_ptimediff_ms(Curl_pgrs_now(data), &conn->created) -
71 conn->shutdown.start_ms[sockindex]);
72 return left_ms ? left_ms : -1;
73}
75static timediff_t cshutdn_conn_timeleft(struct Curl_easy *data,
76 struct connectdata *conn)
77{
78 timediff_t left_ms = 0, ms;
79 int8_t i;
81 for(i = 0; conn->shutdown.timeout_ms && (i < 2); ++i) {
82 if(conn->shutdown.start_ms[i] < 0)
83 continue;
84 ms = Curl_cshutdn_timeleft_ms(data, conn, i);
85 if(ms && (!left_ms || ms < left_ms))
86 left_ms = ms;
87 }
88 return left_ms;
89}
91void Curl_cshutdn_clear_timer(struct Curl_easy *data, int8_t sockindex)
92{
93 data->conn->shutdown.start_ms[sockindex] = -1;
94}
96static void cshutdn_run_conn_handler(struct Curl_easy *data,
97 struct connectdata *conn)
98{
99 if(!conn->bits.shutdown_handler) {
101 if(conn->scheme && conn->scheme->run->disconnect) {
102 /* Some disconnect handlers do a blocking wait on server responses.
103 * FTP/IMAP/SMTP and SFTP are among them. When using the internal
104 * handle, set an overall short timeout so we do not hang for the
105 * default 120 seconds. */
106 if(data->state.internal) {
107 data->set.timeout = DEFAULT_SHUTDOWN_TIMEOUT_MS;
108 Curl_pgrsTime(data, TIMER_STARTOP);
109 }
111 /* This is set if protocol-specific cleanups should be made */
112 DEBUGF(infof(data, "connection #%" FMT_OFF_T
113 ", shutdown protocol handler (aborted=%d)",
114 conn->connection_id, conn->bits.aborted));
115 /* There are protocol handlers that block on retrieving
116 * server responses here (FTP). Set a short timeout. */
117 conn->scheme->run->disconnect(data, conn, (bool)conn->bits.aborted);
118 }
120 conn->bits.shutdown_handler = TRUE;
121 }
122}
124static CURLcode cshutdn_try_once_idx(struct Curl_easy *data,
125 int8_t sockindex, bool *done)
126{
127 struct Curl_cfilter *cf;
128 CURLcode result = CURLE_OK;
129 timediff_t timeout_ms;
131 DEBUGASSERT(data->conn);
133 if(!CONN_SOCK_IDX_VALID(sockindex))
134 return CURLE_BAD_FUNCTION_ARGUMENT;
136 /* Get the first connected filter that is not shut down already. */
137 cf = data->conn->cfilter[sockindex];
138 while(cf && (!cf->connected || cf->shutdown))
139 cf = cf->next;
141 if(!cf) {
142 *done = TRUE;
143 return CURLE_OK;
144 }
146 *done = FALSE;
147 if(!CURL_CONN_IN_SHUTDOWN(data->conn, sockindex)) {
148 Curl_cshutdn_start_timer(data, sockindex, 0);
149 }
150 else {
151 timeout_ms = Curl_cshutdn_timeleft_ms(data, data->conn, sockindex);
152 if(timeout_ms < 0) {
153 /* info message, since this might be regarded as acceptable */
154 infof(data, "shutdown timeout");
155 return CURLE_OPERATION_TIMEDOUT;
156 }
157 }
159 while(cf) {
160 if(!cf->shutdown) {
161 bool cfdone = FALSE;
162 result = cf->cft->do_shutdown(cf, data, &cfdone);
163 if(result) {
164 CURL_TRC_CF(data, cf, "shut down failed with %d", (int)result);
165 return result;
166 }
167 else if(!cfdone) {
168 CURL_TRC_CF(data, cf, "shut down not done yet");
169 return CURLE_OK;
170 }
171 CURL_TRC_CF(data, cf, "shut down successfully");
172 cf->shutdown = TRUE;
173 }
174 cf = cf->next;
175 }
176 *done = (!result);
177 return result;
178}
180CURLcode Curl_cshutdn_try_once_idx(struct Curl_easy *data,
181 int8_t sockindex, bool *done)
182{
183 CURLcode result = cshutdn_try_once_idx(data, sockindex, done);
184 /* Set a timer if shutdown is ongoing */
185 if(!result && !*done) {
186 timediff_t ms = cshutdn_conn_timeleft(data, data->conn);
187 if(ms)
188 Curl_expire_set(data, EXPIRE_SHUTDOWN, ms, Curl_pgrs_now(data));
189 }
190 return result;
191}
193static void cshutdn_run_once(struct Curl_easy *data,
194 struct connectdata *conn,
195 bool *done)
196{
197 CURLcode r1, r2;
198 bool done1, done2;
200 /* We expect to be attached when called */
201 DEBUGASSERT(data->conn == conn);
203 if(!CURL_CONN_IN_SHUTDOWN(conn, FIRSTSOCKET)) {
204 Curl_cshutdn_start_timer(data, FIRSTSOCKET, 0);
205 }
207 cshutdn_run_conn_handler(data, conn);
209 if(conn->bits.shutdown_filters) {
210 *done = TRUE;
211 return;
212 }
214 if(!conn->bits.connect_only && Curl_conn_is_connected(conn, FIRSTSOCKET))
215 r1 = cshutdn_try_once_idx(data, FIRSTSOCKET, &done1);
216 else {
217 r1 = CURLE_OK;
218 done1 = TRUE;
219 }
221 if(!conn->bits.connect_only && Curl_conn_is_connected(conn, SECONDARYSOCKET))
222 r2 = cshutdn_try_once_idx(data, SECONDARYSOCKET, &done2);
223 else {
224 r2 = CURLE_OK;
225 done2 = TRUE;
226 }
228 /* we are done when any failed or both report success */
229 *done = (r1 || r2 || (done1 && done2));
230 if(*done)
231 conn->bits.shutdown_filters = TRUE;
232}
234void Curl_cshutdn_try_once(struct Curl_easy *admin,
235 struct connectdata *conn,
236 bool *done)
237{
238 DEBUGASSERT(!admin->conn);
239 DEBUGASSERT(!admin->mid);
240 Curl_attach_connection(admin, conn, FALSE);
241 cshutdn_run_once(admin, conn, done);
242 CURL_TRC_M(admin, "[SHUTDOWN] shutdown, done=%d", *done);
243 Curl_detach_connection(admin);
244}
246void Curl_cshutdn_terminate(struct Curl_easy *admin,
247 struct connectdata *conn,
248 bool do_shutdown)
249{
250 bool done;
252 /* there must be a connection to close */
253 DEBUGASSERT(conn);
254 /* it must be removed from the connection pool */
255 DEBUGASSERT(conn->cpid == UINT32_MAX);
256 /* the transfer must be detached from the connection */
257 DEBUGASSERT(admin && !admin->conn);
258 DEBUGASSERT(!admin->mid);
260 Curl_attach_connection(admin, conn, FALSE);
262 cshutdn_run_conn_handler(admin, conn);
263 if(do_shutdown) {
264 /* Make a last attempt to shutdown handlers and filters, if
265 * not done so already. */
266 cshutdn_run_once(admin, conn, &done);
267 }
268 CURL_TRC_M(admin, "[SHUTDOWN] %sclosing connection #%" FMT_OFF_T,
269 conn->bits.shutdown_filters ? "" : "force ",
270 conn->connection_id);
271 Curl_conn_cf_discard_all(admin, conn, SECONDARYSOCKET);
272 Curl_conn_cf_discard_all(admin, conn, FIRSTSOCKET);
273 Curl_detach_connection(admin);
275 if(admin->multi)
276 Curl_multi_ev_conn_done(admin->multi, admin, conn);
277 Curl_conn_free(admin, conn);
279 if(admin->multi) {
280 CURL_TRC_M(admin, "[SHUTDOWN] trigger multi connchanged");
281 Curl_multi_connchanged(admin->multi);
282 }
283}
285static size_t cshutdn_destroy_oldest(struct cshutdn *cshutdn,
286 struct Curl_easy *admin,
287 const char *destination,
288 size_t count)
289{
290 struct Curl_sigpipe_ctx sigpipe_ctx;
291 size_t removed = 0;
292 uint32_t i = 0;
294 sigpipe_init(&sigpipe_ctx);
295 while((removed < count) && (i < CURL_PTRARRAY_COUNT(&cshutdn->conns))) {
296 struct connectdata *conn = CURL_PTRARRAY_GET(&cshutdn->conns, i);
297 if(!destination || !strcmp(destination, conn->destination)) {
298 Curl_ptrarray_remove(&cshutdn->conns, i);
299 sigpipe_apply(admin, &sigpipe_ctx);
300 Curl_cshutdn_terminate(admin, conn, FALSE);
301 ++removed;
302 }
303 else
304 ++i;
305 }
306 sigpipe_restore(&sigpipe_ctx);
307 return removed;
308}
310size_t Curl_cshutdn_close_oldest(struct cshutdn *cshutdn,
311 struct Curl_easy *admin,
312 const char *destination,
313 size_t count)
314{
315 if(cshutdn) {
316 return cshutdn_destroy_oldest(cshutdn, admin, destination, count);
317 }
318 return 0;
319}
321#define NUM_POLLS_ON_STACK 10
323static CURLcode cshutdn_wait(struct cshutdn *cshutdn,
324 struct Curl_easy *admin,
325 int timeout_ms)
326{
327 struct pollfd a_few_on_stack[NUM_POLLS_ON_STACK];
328 struct curl_pollfds cpfds;
329 CURLcode result;
331 Curl_pollfds_init(&cpfds, a_few_on_stack, NUM_POLLS_ON_STACK);
333 result = Curl_cshutdn_add_pollfds(cshutdn, admin, &cpfds);
334 if(result)
335 goto out;
337 Curl_poll(cpfds.pfds, cpfds.n, CURLMIN(timeout_ms, 1000));
339out:
340 Curl_pollfds_cleanup(&cpfds);
341 return result;
342}
344static void cshutdn_perform(struct cshutdn *cshutdn,
345 struct Curl_easy *admin,
346 struct Curl_sigpipe_ctx *sigpipe_ctx)
347{
348 struct connectdata *conn;
349 timediff_t next_expire_ms = 0, ms;
350 uint32_t i = 0;
351 bool done;
353 if(!CURL_PTRARRAY_COUNT(&cshutdn->conns))
354 return;
356 CURL_TRC_M(admin, "[SHUTDOWN] perform on %u connections",
357 CURL_PTRARRAY_COUNT(&cshutdn->conns));
358 sigpipe_apply(admin, sigpipe_ctx);
359 while(i < CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
360 conn = CURL_PTRARRAY_GET(&cshutdn->conns, i);
361 Curl_cshutdn_try_once(admin, conn, &done);
362 if(done) {
363 Curl_ptrarray_remove(&cshutdn->conns, i);
364 Curl_cshutdn_terminate(admin, conn, FALSE);
365 }
366 else {
367 ++i;
368 /* idata has one timer list, but maybe more than one connection.
369 * Set EXPIRE_SHUTDOWN to the smallest time left for all. */
370 ms = cshutdn_conn_timeleft(admin, conn);
371 if(ms && (!next_expire_ms || (ms < next_expire_ms)))
372 next_expire_ms = ms;
373 }
374 }
376 if(next_expire_ms)
377 Curl_expire(admin, next_expire_ms, EXPIRE_SHUTDOWN);
378}
380static void cshutdn_terminate_all(struct cshutdn *cshutdn,
381 struct Curl_easy *admin,
382 int timeout_ms)
383{
384 struct curltime started = *Curl_pgrs_now(admin);
385 struct Curl_sigpipe_ctx sigpipe_ctx;
387 CURL_TRC_M(admin, "[SHUTDOWN] shutdown all");
388 sigpipe_init(&sigpipe_ctx);
390 while(CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
391 timediff_t spent_ms;
392 int remain_ms;
394 cshutdn_perform(cshutdn, admin, &sigpipe_ctx);
396 if(!CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
397 CURL_TRC_M(admin, "[SHUTDOWN] shutdown finished cleanly");
398 break;
399 }
401 /* wait for activity, timeout or "nothing" */
402 spent_ms = curlx_ptimediff_ms(Curl_pgrs_now(admin), &started);
403 if(spent_ms >= (timediff_t)timeout_ms) {
404 CURL_TRC_M(admin, "[SHUTDOWN] shutdown finished, %s",
405 (timeout_ms > 0) ? "timeout" : "best effort done");
406 break;
407 }
409 remain_ms = timeout_ms - (int)spent_ms;
410 if(cshutdn_wait(cshutdn, admin, remain_ms)) {
411 CURL_TRC_M(admin, "[SHUTDOWN] shutdown finished, aborted");
412 break;
413 }
414 }
416 /* Terminate any remaining. */
417 while(CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
418 struct connectdata *conn = Curl_ptrarray_remove(&cshutdn->conns, 0);
419 Curl_cshutdn_terminate(admin, conn, FALSE);
420 }
421 DEBUGASSERT(!CURL_PTRARRAY_COUNT(&cshutdn->conns));
423 sigpipe_restore(&sigpipe_ctx);
424}
426void Curl_cshutdn_init(struct cshutdn *cshutdn)
427{
428 Curl_ptrarray_init(&cshutdn->conns);
429}
431void Curl_cshutdn_destroy(struct cshutdn *cshutdn,
432 struct Curl_easy *admin)
433{
434 if(admin) {
435 int timeout_ms = 0;
436 /* for testing, run graceful shutdown */
437#ifdef DEBUGBUILD
438 {
439 const char *p = getenv("CURL_GRACEFUL_SHUTDOWN");
440 if(p) {
441 curl_off_t l;
442 if(!curlx_str_number(&p, &l, INT_MAX))
443 timeout_ms = (int)l;
444 }
445 }
446#endif
447 if(CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
448 CURL_TRC_M(admin, "[SHUTDOWN] destroy, %u connections, timeout=%dms",
449 CURL_PTRARRAY_COUNT(&cshutdn->conns), timeout_ms);
450 cshutdn_terminate_all(cshutdn, admin, timeout_ms);
451 }
452 }
453}
455size_t Curl_cshutdn_count(struct cshutdn *cshutdn)
456{
457 if(cshutdn) {
458 return CURL_PTRARRAY_COUNT(&cshutdn->conns);
459 }
460 return 0;
461}
463size_t Curl_cshutdn_dest_count(struct cshutdn *cshutdn,
464 const char *destination)
465{
466 if(cshutdn) {
467 size_t n = 0;
468 uint32_t i = 0;
469 for(i = 0; i < CURL_PTRARRAY_COUNT(&cshutdn->conns); ++i) {
470 struct connectdata *conn = CURL_PTRARRAY_GET(&cshutdn->conns, i);
471 if(!strcmp(destination, conn->destination))
472 ++n;
473 }
474 return n;
475 }
476 return 0;
477}
479static CURLMcode cshutdn_update_ev(struct Curl_multi *multi,
480 struct connectdata *conn)
481{
482 CURLMcode mresult;
483 Curl_attach_connection(multi->admin, conn, FALSE);
484 mresult = Curl_multi_ev_assess_conn(multi, multi->admin, conn);
485 Curl_detach_connection(multi->admin);
486 return mresult;
487}
489void Curl_cshutdn_add(struct cshutdn *cshutdn,
490 struct Curl_multi *multi,
491 struct connectdata *conn,
492 size_t max_shutdowns)
493{
494 struct Curl_easy *admin = multi->admin;
496 /* Add the connection to our shutdown list for non-blocking shutdown
497 * during multi processing. */
498 if(max_shutdowns <= CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
499 CURL_TRC_M(admin, "[SHUTDOWN] discarding oldest shutdown connection "
500 "due to shutdown limit of %zu", max_shutdowns);
501 cshutdn_destroy_oldest(cshutdn, admin, NULL, 1);
502 }
504 if(multi->socket_cb && cshutdn_update_ev(multi, conn)) {
505 CURL_TRC_M(admin, "[SHUTDOWN] update events failed, discarding #%"
506 FMT_OFF_T, conn->connection_id);
507 Curl_cshutdn_terminate(admin, conn, FALSE);
508 return;
509 }
511 if(Curl_ptrarray_add(&cshutdn->conns, conn)) {
512 CURL_TRC_M(admin, "[SHUTDOWN] adding failed, discarding #%"
513 FMT_OFF_T, conn->connection_id);
514 Curl_cshutdn_terminate(admin, conn, FALSE);
515 return;
516 }
517 CURL_TRC_M(admin, "[SHUTDOWN] added #%" FMT_OFF_T
518 " to shutdowns, now %u conns in shutdown",
519 conn->connection_id, CURL_PTRARRAY_COUNT(&cshutdn->conns));
520 Curl_multi_mark_dirty(admin);
521}
523void Curl_cshutdn_perform(struct cshutdn *cshutdn,
524 struct Curl_easy *admin,
525 struct Curl_sigpipe_ctx *sigpipe_ctx)
526{
527 cshutdn_perform(cshutdn, admin, sigpipe_ctx);
528}
530/* return fd_set info about the shutdown connections */
531void Curl_cshutdn_setfds(struct cshutdn *cshutdn,
532 struct Curl_easy *admin,
533 fd_set *read_fd_set, fd_set *write_fd_set,
534 int *maxfd)
535{
536 if(CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
537 struct easy_pollset ps;
538 uint32_t i;
540 Curl_pollset_init(&ps);
541 for(i = 0; i < CURL_PTRARRAY_COUNT(&cshutdn->conns); ++i) {
542 unsigned int j;
543 struct connectdata *conn = CURL_PTRARRAY_GET(&cshutdn->conns, i);
544 CURLcode result;
546 Curl_pollset_reset(&ps);
547 Curl_attach_connection(admin, conn, FALSE);
548 result = Curl_conn_adjust_pollset(admin, conn, &ps);
549 Curl_detach_connection(admin);
551 if(result)
552 continue;
554 for(j = 0; j < ps.n; j++) {
555 curl_socket_t sock = ps.sockets[j];
556 if(!FDSET_SOCK(sock))
557 continue;
558 if(ps.actions[j] & CURL_POLL_IN)
559 FD_SET(sock, read_fd_set);
560 if(ps.actions[j] & CURL_POLL_OUT)
561 FD_SET(sock, write_fd_set);
562 if((ps.actions[j] & (CURL_POLL_OUT | CURL_POLL_IN)) &&
563 ((int)sock > *maxfd))
564 *maxfd = (int)sock;
565 }
566 }
567 Curl_pollset_cleanup(&ps);
568 }
569}
571/* return information about the shutdown connections */
572unsigned int Curl_cshutdn_add_waitfds(struct cshutdn *cshutdn,
573 struct Curl_easy *admin,
574 struct Curl_waitfds *cwfds)
575{
576 unsigned int need = 0;
578 if(CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
579 struct easy_pollset ps;
580 struct connectdata *conn;
581 uint32_t i;
582 CURLcode result;
584 Curl_pollset_init(&ps);
585 for(i = 0; i < CURL_PTRARRAY_COUNT(&cshutdn->conns); ++i) {
586 conn = CURL_PTRARRAY_GET(&cshutdn->conns, i);
587 Curl_pollset_reset(&ps);
588 Curl_attach_connection(admin, conn, FALSE);
589 result = Curl_conn_adjust_pollset(admin, conn, &ps);
590 Curl_detach_connection(admin);
592 if(!result)
593 need += Curl_waitfds_add_ps(cwfds, &ps);
594 }
595 Curl_pollset_cleanup(&ps);
596 }
597 return need;
598}
600CURLcode Curl_cshutdn_add_pollfds(struct cshutdn *cshutdn,
601 struct Curl_easy *admin,
602 struct curl_pollfds *cpfds)
603{
604 CURLcode result = CURLE_OK;
606 if(CURL_PTRARRAY_COUNT(&cshutdn->conns)) {
607 struct easy_pollset ps;
608 struct connectdata *conn;
609 uint32_t i;
611 Curl_pollset_init(&ps);
612 for(i = 0; i < CURL_PTRARRAY_COUNT(&cshutdn->conns); ++i) {
613 conn = CURL_PTRARRAY_GET(&cshutdn->conns, i);
614 Curl_pollset_reset(&ps);
615 Curl_attach_connection(admin, conn, FALSE);
616 result = Curl_conn_adjust_pollset(admin, conn, &ps);
617 Curl_detach_connection(admin);
619 if(!result)
620 result = Curl_pollfds_add_ps(cpfds, &ps);
621 if(result) {
622 Curl_pollset_cleanup(&ps);
623 Curl_pollfds_cleanup(cpfds);
624 goto out;
625 }
626 }
627 Curl_pollset_cleanup(&ps);
628 }
629out:
630 return result;
631}
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 · 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=86Open pack map
fetch2005.2 KiB · hit25 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=25 git.response.bytes=5316 git.response.cache=HIT git.response.duration_ms=25 git.fetch.wants=90057110556c88367c54518191ffaad2e66caf9e 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=5316 git.pkt.payload.max=5295 git.sideband.band1.bytes=5294 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
- a5e2bc451e63cfc3
- Request
- 1435eded…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format