MCPcopy Create free account
hub / github.com/OISF/libhtp / SetUp

Method SetUp

test/test_gunzip.cpp:114–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 virtual void SetUp() {
115 home = getenv("srcdir");
116 if (home == NULL) {
117 fprintf(stderr, "This program needs environment variable 'srcdir' set.");
118 exit(EXIT_FAILURE);
119 }
120
121 cfg = htp_config_create();
122 htp_config_set_server_personality(cfg, HTP_SERVER_APACHE_2);
123
124 connp = htp_connp_create(cfg);
125 tx = htp_connp_tx_create(connp);
126 htp_tx_set_user_data(tx, &output);
127
128 decompressor = htp_gzip_decompressor_create(connp, HTP_COMPRESSION_GZIP);
129 decompressor->callback = GUnzip_decompressor_callback;
130
131 o_boxing_wizards = bstr_dup_c("The five boxing wizards jump quickly.");
132 output = NULL;
133 }
134
135 virtual void TearDown() {
136 bstr_free(output);

Callers

nothing calls this directly

Calls 7

htp_config_createFunction · 0.85
htp_connp_createFunction · 0.85
htp_connp_tx_createFunction · 0.85
htp_tx_set_user_dataFunction · 0.85
bstr_dup_cFunction · 0.85

Tested by

no test coverage detected