Artifactspublic-v0

curl

master
ply4 git calls45 ms290 KiB3 cachedprotocol v2
266 lines11 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 "first.h"
26static CURLcode test_lib517(const char *URL)
28 struct dcheck {
29 const char *input;
30 time_t output;
31 };
33 static const struct dcheck dates[] = {
34 { "Sat May 5 GMT 11:56:27 2035", 2061978987 },
35 { "Sat, May 5 GMT 11:56:27 2035", 2061978987 },
36 { "Saturday, May 5 GMT 11:56:27 2035", 2061978987 },
37 { "Saturdax, May 5 GMT 11:56:27 2035", -1 },
38 { "Saturda, May 5 GMT 11:56:27 2035", -1 },
39 { "Sun, 06 Nov 1994 08:49:37 GMT", 784111777 },
40 { "Sunday, 06-Nov-94 08:49:37 GMT", 784111777 },
41 { "Sun Nov 6 08:49:37 1994", 784111777 },
42 { "Sun Nov 6 8:49:37 1994", 784111777 },
43 { "Sun Nov 6 8:9:37 1994", 784109377 },
44 { "Sun Nov 6 008:09:37 1994", -1 },
45 { "Nov Sun 6 8:9:7 1994", 784109347 },
46 { "06 Nov 1994 08:49:37 GMT", 784111777 },
47 { "06-Nov-94 08:49:37 GMT", 784111777 },
48 { "Nov 6 08:49:37 1994", 784111777 },
49 { "06 Nov 1994 08:49:37", 784111777 },
50 { "06-Nov-94 08:49:37", 784111777 },
51 { "1994 Nov 6 08:49:37", 784111777 },
52 { "GMT 08:49:37 06-Nov-94 Sunday", 784111777 },
53 { "94 6 Nov 08:49:37", 784111777 },
54 { "1994 Nov 6", 784080000 },
55 { "06-Nov-94", 784080000 },
56 { "Sun Nov 6 94", 784080000 },
57 { "1994.Nov.6", 784080000 },
58 { "Sun/Nov/6/94/GMT", 784080000 },
59 { "Sun, 06 Nov 1994 08:49:37 CET", 784108177 },
60 { "Sun, 06 Nov 1994 08:49:37 cet", -1 }, /* lowercase time zone */
61 { "Sun, 06 Nov 1994 08:49:37 utc", -1 }, /* lowercase time zone */
62 { "Sun, 06 Nov 1994 08:49:37 gmt", -1 }, /* lowercase time zone */
63 { "06 Nov 1994 08:49:37 EST", 784129777 },
64 { "Sun, 06 Nov 1994 08:49:37 UT", 784111777 },
65 { "Sun, 12 Sep 2004 15:05:58 -0700", 1095026758 },
66 { "Sat, 11 Sep 2004 21:32:11 +0200", 1094931131 },
67 { "20040912 15:05:58 -0700", 1095026758 },
68 { "20040911 +0200", 1094853600 },
69 { "Thu, 01-Jan-1970 00:59:59 GMT", 3599 },
70 { "Thu, 01-Jan-1970 01:00:00 GMT", 3600 },
71 { "Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },
72 { "Thu, 19-Apr-2007 16:00:00 GMT", 1176998400 },
73 { "Wed, 25 Apr 2007 21:02:13 GMT", 1177534933 },
74 { "Thu, 19/Apr\\2007 16:00:00 GMT", 1176998400 },
75 { "Fri, 1 Jan 2010 01:01:50 GMT", 1262307710 },
76 { "Wednesday, 1-Jan-2003 00:00:00 GMT", 1041379200 },
77 { ", 1-Jan-2003 00:00:00 GMT", 1041379200 },
78 { "1-Jan-2003 00:00:00 GMT", 1041379200 },
79 { "1-Jan-2003 00:00:00 GMT", 1041379200 },
80 { "Wed,18-Apr-07 22:50:12 GMT", 1176936612 },
81 { "BillyWonka , 18-Apr-07 22:50:12 GMT", -1 },
82 { "BillyWonka , 18-Apr-07 22:50:12", -1 },
83 { "BillyWonka , 18-apr-07 22:50:12", -1 },
84 { "Mon, 18-Apr-1977 22:50:13 GMT", 230251813 },
85 { "Mon, 18-Apr-77 22:50:13 GMT", 230251813 },
86 { "Sat, 15-Apr-17\"21:01:22\"GMT", 1492290082 },
87 { "Partyday, 18- April-07 22:50:12", -1 },
88 { "Partyday, 18 - Apri-07 22:50:12", -1 },
89 { "Wednes, 1-Januar-2003 00:00:00 GMT", -1 },
90 { "Sat, 15-Apr-17 21:01:22", 1492290082 },
91 { "Sat, 15-Apr-17 21:01:22 GMT-2", 1492290082 },
92 { "Sat, 15-Apr-17 21:01:22 GMT BLAH", 1492290082 },
93 { "Sat, 15-Apr-17 21:01:22 GMT-0400", 1492290082 },
94 { "Sat, 15-Apr-17 21:01:22 GMT-0400 (EDT)", 1492290082 },
95 { "Sat, 15-Apr-17 21:01:22 DST", -1 },
96 { "Sat, 15-Apr-17 21:01:22 -0400", 1492304482 },
97 { "Sat, 15-Apr-17 21:01:22 (hello there)", -1 },
98 { "Sat, 15-Apr-17 21:01:22 11:22:33", -1 },
99 { "Sat, 15-Apr-17 ::00 21:01:22", -1 },
100 { "Sat, 15-Apr-17 boink:z 21:01:22", -1 },
101 { "Sat, 15-Apr-17 91:22:33 21:01:22", -1 },
102 { "Thu Apr 18 22:50:12 2007 GMT", 1176936612 },
103 { "22:50:12 Thu Apr 18 2007 GMT", 1176936612 },
104 { "Thu 22:50:12 Apr 18 2007 GMT", 1176936612 },
105 { "Thu Apr 22:50:12 18 2007 GMT", 1176936612 },
106 { "Thu Apr 18 22:50:12 2007 GMT", 1176936612 },
107 { "Thu Apr 18 2007 22:50:12 GMT", 1176936612 },
108 { "Thu Apr 18 2007 GMT 22:50:12", 1176936612 },
110 { "\"Thu Apr 18 22:50:12 2007 GMT\"", 1176936612 },
111 { "-\"22:50:12 Thu Apr 18 2007 GMT\"", 1176936612 },
112 { "*\"Thu 22:50:12 Apr 18 2007 GMT\"", 1176936612 },
113 { ";\"Thu Apr 22:50:12 18 2007 GMT\"", 1176936612 },
114 { ".\"Thu Apr 18 22:50:12 2007 GMT\"", 1176936612 },
115 { "\"Thu Apr 18 2007 22:50:12 GMT\"", 1176936612 },
116 { "\"Thu Apr 18 2007 GMT 22:50:12\"", 1176936612 },
118 { "Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },
119 { "15-Sat, Apr-17 21:01:22 GMT", 1492290082 },
120 { "15-Sat, Apr 21:01:22 GMT 17", 1492290082 },
121 { "15-Sat, Apr 21:01:22 GMT 2017", 1492290082 },
122 { "15 Apr 21:01:22 2017", 1492290082 },
123 { "15 17 Apr 21:01:22", 1492290082 },
124 { "Apr 15 17 21:01:22", 1492290082 },
125 { "Apr 15 21:01:22 17", 1492290082 },
126 { "2017 April 15 21:01:22", -1 },
127 { "15 April 2017 21:01:22", -1 },
128 { "98 April 17 21:01:22", -1 },
129 { "Thu, 012-Aug-2008 20:49:07 GMT", 1218574147 },
130 { "Thu, 999999999999-Aug-2007 20:49:07 GMT", -1 },
131 { "Thu, 12-Aug-2007 20:61:99999999999 GMT", -1 },
132 { "IAintNoDateFool", -1 },
133 { "Thu Apr 18 22:50 2007 GMT", 1176936600 },
134 { "20110623 12:34:56", 1308832496 },
135 { "20110023 12:34:56", -1 },
136 { "20110632 12:34:56", -1 },
137 { "20110623 56:34:56", -1 },
138 { "20111323 12:34:56", -1 },
139 { "20110623 12:34:79", -1 },
140 { "Wed, 31 Dec 2008 23:59:60 GMT", 1230768000 },
141 { "Wed, 31 Dec 2008 23:59:61 GMT", -1 },
142 { "Wed, 31 Dec 2008 24:00:00 GMT", -1 },
143 { "Wed, 31 Dec 2008 23:60:59 GMT", -1 },
144 { "20110623 12:3", 1308830580 },
145 { "20110623 1:3", 1308790980 },
146 { "20110623 1:30", 1308792600 },
147 { "20110623 12:12:3", 1308831123 },
148 { "20110623 01:12:3", 1308791523 },
149 { "20110623 01:99:30", -1 },
150 { "Thu, 01-Jan-1970 00:00:00 GMT", 0 },
151 { "Thu, 31-Dec-1969 23:59:58 GMT", -2 },
152 { "Thu, 31-Dec-1969 23:59:59 GMT", 0 }, /* avoids -1 ! */
153#if SIZEOF_TIME_T > 4
154 { "Sun, 06 Nov 2044 08:49:37 GMT", (time_t)2362034977LL },
155 { "Sun, 06 Nov 3144 08:49:37 GMT", 37074617377 },
156#ifndef HAVE_TIME_T_UNSIGNED
157 { "Sun, 06 Nov 1900 08:49:37 GMT", (time_t)-2182259423LL },
158 { "Sun, 06 Nov 1800 08:49:37 GMT", -5337933023 },
159 { "Thu, 01-Jan-1583 00:00:00 GMT", -12212553600 },
160#endif /* HAVE_TIME_T_UNSIGNED */
161 { "Thu, 01-Jan-1499 00:00:00 GMT", -1 },
162#else
163 { "Sun, 06 Nov 2044 08:49:37 GMT", -1 },
164#endif /* SIZEOF_TIME_T > 4 */
165#ifndef HAVE_TIME_T_UNSIGNED
166 { "Sun, 06 Nov 1968 08:49:37 GMT", -36342623 },
167#endif /* !HAVE_TIME_T_UNSIGNED */
169#if SIZEOF_TIME_T > 4
170 { "2094 Nov 6 08:49:37", 3939871777 },
171#endif
172 { "01 Jan 2001 8:0:0", 978336000 },
173 { "01 Jan 2001 8:00:0", 978336000 },
174 /* Out-of-range day-of-month Cases */
175 { "29 Feb 2023 12:00:00 GMT", 1677672000 },
176 { "31 Apr 2024 12:00:00 GMT", 1714564800 },
177 { "30 Feb 2024 12:00:00 GMT", 1709294400 },
178 { "01-13-2024", -1 },
179 { "32 Jan 2024", -1 },
180 { "31 Jan 2024", 1706659200 },
181 { "32 Feb 2024", -1 },
182 { "32 Mar 2024", -1 },
183 { "32 Apr 2024", -1 },
184 { "32 May 2024", -1 },
185 { "32 Jun 2024", -1 },
186 { "32 Jul 2024", -1 },
187 { "32 Aug 2024", -1 },
188 { "32 Sep 2024", -1 },
189 { "32 Oct 2024", -1 },
190 { "32 Nov 2024", -1 },
191 { "32 Dec 2024", -1 },
192 /* Timezone Offsets */
193 { "Sun, 06 Nov 1994 08:49:37 +0530", 784091977 },
194 { "Sun, 06 Nov 1994 08:49:37 +0545", 784091077 },
195 { "06 Nov 1994 08:49:37 Z", 784111777 },
196 { "06 Nov 1994 08:49:37 A", 784108177 },
197 { "06 Nov 1994 08:49:37 B", 784104577 },
198 { "06 Nov 1994 08:49:37 C", 784100977 },
199 { "06 Nov 1994 08:49:37 D", 784097377 },
200 { "06 Nov 1994 08:49:37 E", 784093777 },
201 { "06 Nov 1994 08:49:37 F", 784090177 },
202 { "06 Nov 1994 08:49:37 G", 784086577 },
203 { "06 Nov 1994 08:49:37 H", 784082977 },
204 { "06 Nov 1994 08:49:37 I", 784079377 },
205 { "06 Nov 1994 08:49:37 J", -1 }, /* not a valid time zone */
206 { "06 Nov 1994 08:49:37 K", 784075777 },
207 { "06 Nov 1994 08:49:37 L", 784072177 },
208 { "06 Nov 1994 08:49:37 M", 784068577 },
209 { "06 Nov 1994 08:49:37 N", 784115377 },
210 { "06 Nov 1994 08:49:37 O", 784118977 },
211 { "06 Nov 1994 08:49:37 P", 784122577 },
212 { "06 Nov 1994 08:49:37 Q", 784126177 },
213 { "06 Nov 1994 08:49:37 R", 784129777 },
214 { "06 Nov 1994 08:49:37 S", 784133377 },
215 { "06 Nov 1994 08:49:37 T", 784136977 },
216 { "06 Nov 1994 08:49:37 U", 784140577 },
217 { "06 Nov 1994 08:49:37 V", 784144177 },
218 { "06 Nov 1994 08:49:37 W", 784147777 },
219 { "06 Nov 1994 08:49:37 X", 784151377 },
220 { "06 Nov 1994 08:49:37 Y", 784154977 },
221 { "GMT+05:30", -1 },
222 { "GMT-08:00", -1 },
223 /* ISO 8601 & Variations - not supported */
224 { "1994-11-06T08:49:37Z", -1 },
225 { "1994-11-06 08:49:37.123 GMT", -1 },
226 { "19941106T084937Z", -1 },
227 /* Y2K38 & Historical Boundaries */
228 { "19 Jan 2038 03:14:07 GMT", 2147483647 },
229#if SIZEOF_TIME_T > 4
230 { "19 Jan 2038 03:14:08 GMT", 2147483648 },
231 { "01 Jan 69 00:00:00 GMT", 3124224000 },
232#endif
233 { "01 Jan 1500 00:00:00 GMT", -1 },
234 /* Formatting & Malformed Junk */
235 { "Sun, 06-Nov/1994 08:49:37", 784111777 },
236 { "Sun, 06 Nov 1994 08:49:37 GMT", 784111777 },
237 { " Sun, 06 Nov 1994 08:49:37 GMT ", 784111777 },
238 { "Date: Sun, 06 Nov 1994 08:49:37 GMT", -1 },
239 /* wrong day name is ignored */
240 { "Monday, 06 Nov 1994 08:49:37 GMT", 784111777 },
241 { NULL, 0 }
242 };
244 int i;
245 int error = 0;
247 (void)URL;
249 for(i = 0; dates[i].input; i++) {
250 time_t out = curl_getdate(dates[i].input, NULL);
251 if(out != dates[i].output) {
252 curl_mprintf("WRONGLY %s => %" CURL_FORMAT_CURL_OFF_T
253 " (instead of %" CURL_FORMAT_CURL_OFF_T ")\n",
254 dates[i].input,
255 (curl_off_t)out, (curl_off_t)dates[i].output);
256 error++;
257 }
258 }
260 if(curl_getdate(NULL, NULL) != (time_t)-1) {
261 curl_mprintf("WRONGLY parsed NULL string\n");
262 error++;
263 }
265 return error == 0 ? CURLE_OK : TEST_ERR_FAILURE;
Diagnostics4 git calls · 45 ms
CallStatusSizeTime045 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
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 · 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=40
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
fetch2003.0 KiB · hit40 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=3108
git.response.cache=HIT
git.response.duration_ms=40
git.fetch.wants=aa15af6c9d61e98cadcf3599c3088d83f08133b6
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=3108
git.pkt.payload.max=3087
git.sideband.band1.bytes=3086
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
a5e32a1b8bfa5094
Request
523517e6…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format