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#include "urldata.h"
27#include "url.h"
28#include "cfilters.h"
29#include "curl_trc.h"
30#include "multiif.h"
31#include "multi_ev.h"
32#include "select.h"
33#include "uint-bset.h"
34#include "uint-spbset.h"
35#include "multihandle.h"
37#ifdef DEBUGBUILD
38#define SH_ENTRY_MAGIC 0x570091d
39#endif
41/* Information about a socket for which we inform the libcurl application
42 * what to supervise (CURL_POLL_IN/CURL_POLL_OUT/CURL_POLL_REMOVE)
43 */
44struct mev_sh_entry {
45 struct uint32_spbset xfers; /* bitset of transfers `mid`s on this socket */
46 struct connectdata *conn; /* connection using this socket or NULL */
47 void *user_data; /* libcurl app data via curl_multi_assign() */
48 unsigned int action; /* CURL_POLL_IN/CURL_POLL_OUT we last told the
49 * libcurl application to watch out for */
50 unsigned int readers; /* this many transfers want to read */
51 unsigned int writers; /* this many transfers want to write */
52#ifdef DEBUGBUILD
53 unsigned int magic;
54#endif
55 BIT(announced); /* this socket has been passed to the socket
56 callback at least once */
57};
59/* sockhash entry destructor callback */
60static void mev_sh_entry_dtor(void *freethis)
61{
62 struct mev_sh_entry *entry = (struct mev_sh_entry *)freethis;
63 Curl_uint32_spbset_destroy(&entry->xfers);
64#ifdef DEBUGBUILD
65 entry->magic = 0;
66#endif
67 curlx_free(entry);
68}
70/* look up a given socket in the socket hash, skip invalid sockets */
71static struct mev_sh_entry *mev_sh_entry_get(struct Curl_hash *sh,
72 curl_socket_t s)
73{
74 if(s != CURL_SOCKET_BAD) {
75 /* only look for proper sockets */
76 return Curl_hash_pick(sh, (const char *)&s, sizeof(curl_socket_t));
77 }
78 return NULL;
79}
81/* make sure this socket is present in the hash for this handle */
82static struct mev_sh_entry *mev_sh_entry_add(struct Curl_hash *sh,
83 curl_socket_t s)
84{
85 struct mev_sh_entry *there = mev_sh_entry_get(sh, s);
86 struct mev_sh_entry *check;
88 if(there) {
89 /* it is present, return fine */
90 return there;
91 }
93 /* not present, add it */
94 check = curlx_calloc(1, sizeof(struct mev_sh_entry));
95 if(!check)
96 return NULL; /* major failure */
98 Curl_uint32_spbset_init(&check->xfers);
100 /* make/add new hash entry */
101 if(!Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) {
102 mev_sh_entry_dtor(check);
103 return NULL; /* major failure */
104 }
105#ifdef DEBUGBUILD
106 check->magic = SH_ENTRY_MAGIC;
107#endif
108 return check; /* things are good in sockhash land */
109}
111/* delete the given socket entry from the hash */
112static void mev_sh_entry_kill(struct Curl_multi *multi, curl_socket_t s)
113{
114 Curl_hash_delete(&multi->ev.sh_entries, (char *)&s, sizeof(curl_socket_t));
115}
117static size_t mev_sh_entry_user_count(struct mev_sh_entry *e)
118{
119 return Curl_uint32_spbset_count(&e->xfers) + (e->conn ? 1 : 0);
120}
122static bool mev_sh_entry_xfer_known(struct mev_sh_entry *e,
123 struct Curl_easy *data)
124{
125 return Curl_uint32_spbset_contains(&e->xfers, data->mid);
126}
128static bool mev_sh_entry_conn_known(struct mev_sh_entry *e,
129 struct connectdata *conn)
130{
131 return (e->conn == conn);
132}
134static void mev_pollset_dtor(const void *key, size_t klen, void *entry)
135{
136 struct easy_pollset *ps = entry;
137 (void)key;
138 (void)klen;
139 if(ps) {
140 Curl_pollset_cleanup(ps);
141 curlx_free(ps);
142 }
143}
145static struct easy_pollset *mev_add_new_conn_pollset(struct connectdata *conn)
146{
147 struct easy_pollset *ps;
149 ps = Curl_pollset_create();
150 if(!ps)
151 return NULL;
152 if(Curl_conn_meta_set(conn, CURL_META_MEV_POLLSET, ps, mev_pollset_dtor))
153 return NULL;
154 return ps;
155}
157static struct easy_pollset *mev_add_new_xfer_pollset(struct Curl_easy *data)
158{
159 struct easy_pollset *ps;
161 ps = Curl_pollset_create();
162 if(!ps)
163 return NULL;
164 if(Curl_meta_set(data, CURL_META_MEV_POLLSET, ps, mev_pollset_dtor))
165 return NULL;
166 return ps;
167}
169static struct easy_pollset *mev_get_last_pollset(struct Curl_easy *data,
170 struct connectdata *conn)
171{
172 if(data) {
173 if(conn)
174 return Curl_conn_meta_get(conn, CURL_META_MEV_POLLSET);
175 return Curl_meta_get(data, CURL_META_MEV_POLLSET);
176 }
177 return NULL;
178}
180static bool mev_sh_entry_xfer_add(struct mev_sh_entry *e,
181 struct Curl_easy *data)
182{
183 /* detect weird values */
184 DEBUGASSERT(mev_sh_entry_user_count(e) < 100000);
185 return Curl_uint32_spbset_add(&e->xfers, data->mid);
186}
188static bool mev_sh_entry_conn_add(struct mev_sh_entry *e,
189 struct connectdata *conn)
190{
191 /* detect weird values */
192 DEBUGASSERT(mev_sh_entry_user_count(e) < 100000);
193 DEBUGASSERT(!e->conn);
194 if(e->conn)
195 return FALSE;
196 e->conn = conn;
197 return TRUE;
198}
200static bool mev_sh_entry_xfer_remove(struct mev_sh_entry *e,
201 struct Curl_easy *data)
202{
203 bool present = Curl_uint32_spbset_contains(&e->xfers, data->mid);
204 if(present)
205 Curl_uint32_spbset_remove(&e->xfers, data->mid);
206 return present;
207}
209static bool mev_sh_entry_conn_remove(struct mev_sh_entry *e,
210 struct connectdata *conn)
211{
212 DEBUGASSERT(e->conn == conn);
213 if(e->conn == conn) {
214 e->conn = NULL;
215 return TRUE;
216 }
217 return FALSE;
218}
220/* Purge any information about socket `s`.
221 * Let the socket callback know as well when necessary */
222static CURLMcode mev_forget_socket(struct Curl_multi *multi,
223 struct Curl_easy *data,
224 curl_socket_t s,
225 const char *cause)
226{
227 struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
228 uint32_t mid;
229 int rc = 0;
231 if(!entry) /* we never knew or already forgot about this socket */
232 return CURLM_OK;
234 /* Remove the socket from any pollset that is still registered. */
235 if(Curl_uint32_spbset_first(&entry->xfers, &mid)) {
236 do {
237 struct Curl_easy *sdata = Curl_multi_get_easy(multi, mid);
238 if(sdata) {
239 struct easy_pollset *ps = mev_get_last_pollset(sdata, NULL);
240 if(ps)
241 Curl_pollset_remove(ps, s);
242 }
243 } while(Curl_uint32_spbset_next(&entry->xfers, mid, &mid));
244 }
246 if(entry->conn) {
247 struct easy_pollset *ps = mev_get_last_pollset(data, entry->conn);
248 if(ps)
249 Curl_pollset_remove(ps, s);
250 }
252 /* We managed this socket before, tell the socket callback to forget it. */
253 if(entry->announced && multi->socket_cb) {
254 struct Curl_mapi_guard guard;
256 NOVERBOSE((void)cause);
257 CURL_TRC_M(data, "ev %s, call(fd=%" FMT_SOCKET_T ", ev=REMOVE)", cause, s);
258 CURL_CBAPI_MULTI_START(&guard, multi, multi_socket_cb);
259 rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
260 multi->socket_userp, entry->user_data);
261 CURL_CBAPI_END(&guard);
262 entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
263 if(entry)
264 entry->announced = FALSE;
265 }
267 mev_sh_entry_kill(multi, s);
268 if(rc == -1) {
269 multi->dead = TRUE;
270 return CURLM_ABORTED_BY_CALLBACK;
271 }
272 return CURLM_OK;
273}
275static CURLMcode mev_sh_entry_update(struct Curl_multi *multi,
276 struct Curl_easy *data,
277 struct mev_sh_entry *entry,
278 curl_socket_t s,
279 unsigned char last_action,
280 unsigned char cur_action)
281{
282 int rc, comboaction;
284 /* we should only be called when the callback exists */
285 DEBUGASSERT(multi->socket_cb);
286 DEBUGASSERT(entry->magic == SH_ENTRY_MAGIC);
287 if(!multi->socket_cb)
288 return CURLM_OK;
290 /* Transfer `data` goes from `last_action` to `cur_action` on socket `s`
291 * with `multi->ev.sh_entries` entry `entry`. Update `entry` and trigger
292 * `multi->socket_cb` on change, if the callback is set. */
293 if(last_action == cur_action) /* nothing from `data` changed */
294 return CURLM_OK;
296 if(last_action & CURL_POLL_IN) {
297 DEBUGASSERT(entry->readers);
298 if(!(cur_action & CURL_POLL_IN))
299 entry->readers--;
300 }
301 else if(cur_action & CURL_POLL_IN)
302 entry->readers++;
304 if(last_action & CURL_POLL_OUT) {
305 DEBUGASSERT(entry->writers);
306 if(!(cur_action & CURL_POLL_OUT))
307 entry->writers--;
308 }
309 else if(cur_action & CURL_POLL_OUT)
310 entry->writers++;
312 DEBUGASSERT(entry->readers <= mev_sh_entry_user_count(entry));
313 DEBUGASSERT(entry->writers <= mev_sh_entry_user_count(entry));
314 DEBUGASSERT(entry->writers + entry->readers);
316 CURL_TRC_M(data, "ev update fd=%" FMT_SOCKET_T ", action '%s%s' -> '%s%s'"
317 " (%u/%u r/w)", s,
318 (last_action & CURL_POLL_IN) ? "IN" : "",
319 (last_action & CURL_POLL_OUT) ? "OUT" : "",
320 (cur_action & CURL_POLL_IN) ? "IN" : "",
321 (cur_action & CURL_POLL_OUT) ? "OUT" : "",
322 entry->readers, entry->writers);
324 comboaction = (entry->writers ? CURL_POLL_OUT : 0) |
325 (entry->readers ? CURL_POLL_IN : 0);
326 if(((int)entry->action == comboaction)) /* nothing for socket changed */
327 return CURLM_OK;
329 CURL_TRC_M(data, "ev update call(fd=%" FMT_SOCKET_T ", ev=%s%s)",
330 s, (comboaction & CURL_POLL_IN) ? "IN" : "",
331 (comboaction & CURL_POLL_OUT) ? "OUT" : "");
332 {
333 struct Curl_mapi_guard guard;
334 CURL_CBAPI_MULTI_START(&guard, multi, multi_socket_cb);
335 rc = multi->socket_cb(data, s, comboaction, multi->socket_userp,
336 entry->user_data);
337 CURL_CBAPI_MULTI_END(&guard);
338 }
339 if(rc == -1) {
340 multi->dead = TRUE;
341 return CURLM_ABORTED_BY_CALLBACK;
342 }
343 /* curl_easy_pause() is documented as callable from any callback; it
344 * re-enters mev_assess() which may free this 'entry'. Re-fetch. */
345 entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
346 if(entry) {
347 DEBUGASSERT(entry->magic == SH_ENTRY_MAGIC);
348 entry->announced = TRUE;
349 entry->action = (unsigned int)comboaction;
350 }
351 return CURLM_OK;
352}
354static CURLMcode mev_pollset_diff(struct Curl_multi *multi,
355 struct Curl_easy *data,
356 struct connectdata *conn,
357 struct easy_pollset *ps,
358 struct easy_pollset *prev_ps)
359{
360 struct mev_sh_entry *entry;
361 curl_socket_t s;
362 unsigned int i, j;
363 CURLMcode mresult;
365 /* The transfer `data` reports in `ps` the sockets it is interested
366 * in and which combination of CURL_POLL_IN/CURL_POLL_OUT it wants
367 * to have monitored for events.
368 * There can be more than 1 transfer interested in the same socket
369 * and 1 transfer might be interested in more than 1 socket.
370 * `prev_ps` is the pollset copy from the previous call here. On
371 * the 1st call it will be empty.
372 */
373 DEBUGASSERT(ps);
374 DEBUGASSERT(prev_ps);
376 /* Handle changes to sockets the transfer is interested in. */
377 for(i = 0; i < ps->n; i++) {
378 unsigned char last_action;
379 bool first_time = FALSE; /* data/conn appears first time on socket */
381 s = ps->sockets[i];
382 /* Have we handled this socket before? */
383 entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
384 if(!entry) {
385 /* new socket, add new entry */
386 first_time = TRUE;
387 entry = mev_sh_entry_add(&multi->ev.sh_entries, s);
388 if(!entry) /* fatal */
389 return CURLM_OUT_OF_MEMORY;
390 CURL_TRC_M(data, "ev new entry fd=%" FMT_SOCKET_T, s);
391 }
392 else if(conn) {
393 first_time = !mev_sh_entry_conn_known(entry, conn);
394 }
395 else {
396 first_time = !mev_sh_entry_xfer_known(entry, data);
397 }
399 /* What was the previous action the transfer had regarding this socket?
400 * If the transfer is new to the socket, disregard the information
401 * in `last_poll`, because the socket might have been destroyed and
402 * reopened. We would have cleared the sh_entry for that, but the socket
403 * might still be mentioned in the hashed pollsets. */
404 last_action = 0;
405 if(first_time) {
406 if(conn) {
407 if(!mev_sh_entry_conn_add(entry, conn))
408 return CURLM_OUT_OF_MEMORY;
409 }
410 else {
411 if(!mev_sh_entry_xfer_add(entry, data))
412 return CURLM_OUT_OF_MEMORY;
413 }
414 CURL_TRC_M(data, "ev entry fd=%" FMT_SOCKET_T ", added %s #%" FMT_OFF_T
415 ", total=%u/%d (xfer/conn)", s,
416 conn ? "connection" : "transfer",
417 conn ? conn->connection_id : data->mid,
418 Curl_uint32_spbset_count(&entry->xfers),
419 entry->conn ? 1 : 0);
420 }
421 else {
422 for(j = 0; j < prev_ps->n; j++) {
423 if(s == prev_ps->sockets[j]) {
424 last_action = prev_ps->actions[j];
425 break;
426 }
427 }
428 }
429 /* track readers/writers changes and report to socket callback */
430 mresult = mev_sh_entry_update(multi, data, entry, s,
431 last_action, ps->actions[i]);
432 if(mresult)
433 return mresult;
434 }
436 /* Handle changes to sockets the transfer is NO LONGER interested in. */
437 for(i = 0; i < prev_ps->n; i++) {
438 bool stillused = FALSE;
440 s = prev_ps->sockets[i];
441 for(j = 0; j < ps->n; j++) {
442 if(s == ps->sockets[j]) {
443 /* socket is still supervised */
444 stillused = TRUE;
445 break;
446 }
447 }
448 if(stillused)
449 continue;
451 entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
452 /* if entry does not exist, we were either never told about it or
453 * have already cleaned up this socket via Curl_multi_ev_socket_done().
454 * In other words: this is perfectly normal */
455 if(!entry)
456 continue;
458 if(conn && !mev_sh_entry_conn_remove(entry, conn)) {
459 /* `conn` says in `prev_ps` that it had been using a socket,
460 * but `conn` has not been registered for it.
461 * This should not happen if our book-keeping is correct? */
462 CURL_TRC_M(data, "ev entry fd=%" FMT_SOCKET_T ", conn lost "
463 "interest but is not registered", s);
464 DEBUGASSERT(NULL);
465 continue;
466 }
468 if(!conn && !mev_sh_entry_xfer_remove(entry, data)) {
469 /* `data` says in `prev_ps` that it had been using a socket,
470 * but `data` has not been registered for it.
471 * This should not happen if our book-keeping is correct? */
472 CURL_TRC_M(data, "ev entry fd=%" FMT_SOCKET_T ", transfer lost "
473 "interest but is not registered", s);
474 DEBUGASSERT(NULL);
475 continue;
476 }
478 if(mev_sh_entry_user_count(entry)) {
479 /* track readers/writers changes and report to socket callback */
480 mresult = mev_sh_entry_update(multi, data, entry, s,
481 prev_ps->actions[i], 0);
482 if(mresult)
483 return mresult;
484 CURL_TRC_M(data, "ev entry fd=%" FMT_SOCKET_T ", removed transfer, "
485 "total=%u/%d (xfer/conn)", s,
486 Curl_uint32_spbset_count(&entry->xfers),
487 entry->conn ? 1 : 0);
488 }
489 else {
490 mresult = mev_forget_socket(multi, data, s, "last user gone");
491 if(mresult)
492 return mresult;
493 }
494 } /* for loop over num */
496 /* Remember for next time */
497 Curl_pollset_move(prev_ps, ps);
498 return CURLM_OK;
499}
501static CURLMcode mev_assess(struct Curl_multi *multi,
502 struct Curl_easy *data,
503 struct connectdata *conn)
504{
505 struct easy_pollset ps, *last_ps;
506 CURLMcode mresult = CURLM_OK;
508 if(!multi || !multi->socket_cb)
509 return CURLM_OK;
511 Curl_pollset_init(&ps);
512 if(conn) {
513 CURLcode result = Curl_conn_adjust_pollset(data, conn, &ps);
514 if(result) {
515 mresult = (result == CURLE_OUT_OF_MEMORY) ?
516 CURLM_OUT_OF_MEMORY : CURLM_INTERNAL_ERROR;
517 goto out;
518 }
519 }
520 else
521 Curl_multi_pollset(data, &ps);
522 last_ps = mev_get_last_pollset(data, conn);
524 if(!last_ps && ps.n) {
525 if(conn)
526 last_ps = mev_add_new_conn_pollset(conn);
527 else
528 last_ps = mev_add_new_xfer_pollset(data);
529 if(!last_ps) {
530 mresult = CURLM_OUT_OF_MEMORY;
531 goto out;
532 }
533 }
535 if(last_ps)
536 mresult = mev_pollset_diff(multi, data, conn, &ps, last_ps);
537 else
538 DEBUGASSERT(!ps.n);
539out:
540 Curl_pollset_cleanup(&ps);
541 return mresult;
542}
544CURLMcode Curl_multi_ev_assess_xfer(struct Curl_multi *multi,
545 struct Curl_easy *data)
546{
547 return mev_assess(multi, data, NULL);
548}
550CURLMcode Curl_multi_ev_assess_conn(struct Curl_multi *multi,
551 struct Curl_easy *data,
552 struct connectdata *conn)
553{
554 return mev_assess(multi, data, conn);
555}
557CURLMcode Curl_multi_ev_assess_xfer_bset(struct Curl_multi *multi,
558 struct uint32_bset *set)
559{
560 uint32_t mid;
561 CURLMcode mresult = CURLM_OK;
563 if(multi && multi->socket_cb && Curl_uint32_bset_first(set, &mid)) {
564 do {
565 struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
566 if(data) {
567 mresult = Curl_multi_ev_assess_xfer(multi, data);
568 }
569 } while(!mresult && Curl_uint32_bset_next(set, mid, &mid));
570 }
571 return mresult;
572}
574CURLMcode Curl_multi_ev_assign(struct Curl_multi *multi,
575 curl_socket_t s,
576 void *user_data)
577{
578 struct mev_sh_entry *e = mev_sh_entry_get(&multi->ev.sh_entries, s);
579 if(!e)
580 return CURLM_BAD_SOCKET;
581 e->user_data = user_data;
582 return CURLM_OK;
583}
585void Curl_multi_ev_dirty_xfers(struct Curl_multi *multi,
586 curl_socket_t s)
587{
588 struct mev_sh_entry *entry;
590 DEBUGASSERT(s != CURL_SOCKET_TIMEOUT);
591 entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
593 /* Unmatched socket, we cannot act on it but we ignore this fact. In
594 real-world tests it has been proved that libevent can in fact give
595 the application actions even though the socket was previously
596 asked to get removed, so thus we better survive stray socket actions
597 and move on. */
598 if(entry) {
599 struct Curl_easy *data;
600 uint32_t mid;
602 if(Curl_uint32_spbset_first(&entry->xfers, &mid)) {
603 do {
604 data = Curl_multi_get_easy(multi, mid);
605 if(data) {
606 Curl_multi_mark_dirty(data);
607 }
608 else {
609 CURL_TRC_M(multi->admin, "socket transfer %u no longer found", mid);
610 Curl_uint32_spbset_remove(&entry->xfers, mid);
611 }
612 } while(Curl_uint32_spbset_next(&entry->xfers, mid, &mid));
613 }
615 if(entry->conn)
616 Curl_multi_mark_dirty(multi->admin);
617 }
618}
620void Curl_multi_ev_socket_done(struct Curl_multi *multi,
621 struct Curl_easy *data, curl_socket_t s)
622{
623 mev_forget_socket(multi, data, s, "socket done");
624}
626void Curl_multi_ev_xfer_done(struct Curl_multi *multi,
627 struct Curl_easy *data)
628{
629 DEBUGASSERT(!data->conn); /* transfer should have been detached */
630 (void)mev_assess(multi, data, NULL);
631 Curl_meta_remove(data, CURL_META_MEV_POLLSET);
632}
634void Curl_multi_ev_conn_done(struct Curl_multi *multi,
635 struct Curl_easy *data,
636 struct connectdata *conn)
637{
638 (void)mev_assess(multi, data, conn);
639 Curl_conn_meta_remove(conn, CURL_META_MEV_POLLSET);
640}
642void Curl_multi_ev_init(struct Curl_multi *multi, size_t hashsize)
643{
644 Curl_hash_init(&multi->ev.sh_entries, hashsize, CURL_HASH_TYPE_SOCKET,
645 mev_sh_entry_dtor);
646}
648void Curl_multi_ev_cleanup(struct Curl_multi *multi)
649{
650 Curl_hash_destroy(&multi->ev.sh_entries);
651}
Diagnostics4 git calls · 526 ms
CallStatusSizeTime0526 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 · 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 · hit2 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=521 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.7 KiB521 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=5846 git.response.cache=MISS git.response.duration_ms=521 git.fetch.wants=7215ee25e383f327fe4de0f3f2921ddc0c37d5d6 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=5846 git.pkt.payload.max=5825 git.sideband.band1.bytes=5824 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
- a5e22c0c3fc62a83
- Request
- 3cd83d58…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format