Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
5145486e
Commit
5145486e
authored
Jan 22, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some #ifdef'd out code to find magic gzip inputs for tests still
to come.
parent
df48e70a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
1 deletion
+63
-1
vtc_http.c
bin/varnishtest/vtc_http.c
+63
-1
No files found.
bin/varnishtest/vtc_http.c
View file @
5145486e
...
@@ -520,7 +520,7 @@ cmd_http_rxresp(CMD_ARGS)
...
@@ -520,7 +520,7 @@ cmd_http_rxresp(CMD_ARGS)
#define TRUST_ME(ptr) ((void*)(uintptr_t)(ptr))
#define TRUST_ME(ptr) ((void*)(uintptr_t)(ptr))
#define OVERHEAD
31
#define OVERHEAD
64
static
void
static
void
...
@@ -1073,3 +1073,65 @@ http_process(struct vtclog *vl, const char *spec, int sock, int sfd)
...
@@ -1073,3 +1073,65 @@ http_process(struct vtclog *vl, const char *spec, int sock, int sfd)
free
(
hp
->
rxbuf
);
free
(
hp
->
rxbuf
);
free
(
hp
);
free
(
hp
);
}
}
/**********************************************************************
* Magic test routine
*
* This function brute-forces some short strings through gzip(9) to
* find candidates for all possible 8 bit positions of the stopbit.
*
* Here is some good short output strings:
*
* 0 184 <e04c8d0fd604c>
* 1 257 <1ea86e6cf31bf4ec3d7a86>
* 2 106 <10>
* 3 163 <a5e2e2e1c2e2>
* 4 180 <71c5d18ec5d5d1>
* 5 189 <39886d28a6d2988>
* 6 118 <80000>
* 7 151 <386811868>
*
*/
#if 0
void xxx(void);
void
xxx(void)
{
z_stream vz;
int n;
char ibuf[200];
char obuf[200];
int fl[8];
int i, j;
for (n = 0; n < 8; n++)
fl[n] = 9999;
memset(&vz, 0, sizeof vz);
for(n = 0; n < 999999999; n++) {
*ibuf = 0;
for (j = 0; j < 7; j++) {
sprintf(strchr(ibuf, 0), "%x",
(unsigned)random() & 0xffff);
vz.next_in = TRUST_ME(ibuf);
vz.avail_in = strlen(ibuf);
vz.next_out = TRUST_ME(obuf);
vz.avail_out = sizeof obuf;
assert(Z_OK == deflateInit2(&vz,
9, Z_DEFLATED, 31, 9, Z_DEFAULT_STRATEGY));
assert(Z_STREAM_END == deflate(&vz, Z_FINISH));
i = vz.stop_bit & 7;
if (fl[i] > strlen(ibuf)) {
printf("%d %jd <%s>\n", i, vz.stop_bit, ibuf);
fl[i] = strlen(ibuf);
}
assert(Z_OK == deflateEnd(&vz));
}
}
printf("FOO\n");
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment