Issues (323)

debugger/controller.php (4 issues)

Labels
Severity
1
<?php
2
/**
3
 * @author Gaetano Giunta
4
 * @copyright (C) 2005-2025 G. Giunta
5
 * @license code licensed under the BSD License: see file license.txt
6
 *
7
 * @todo add links to documentation from every option caption
8
 * @todo switch params for http compression from 0,1,2 to values to be used directly
9
 * @todo add a little bit more CSS formatting: we broke IE box model getting a width > 100%...
10
 * @todo add support for more options, such as ntlm auth to proxy, or request charset encoding
11
 * @todo parse content of payload textarea to be fed to visual editor
12
 * @todo add http no-cache headers
13
 * @todo if jsonrpc php classes are not available, gray out or hide altogether the JSONRPC option & title
14
 * @todo if js libs are not available, do not try to load them
15
 **/
16
17
// Make sure we set the correct charset type for output, so that we can display all characters
18
header('Content-Type: text/html; charset=utf-8');
19
20
global $inputcharset, $debug, $protocol, $run, $hasjsonrpcclient, $hasjsonrpc2, $wstype, $id, $host, $port, $path, $action,
21
    $method, $methodsig, $payload, $alt_payload, $username, $password, $authtype, $verifyhost, $verifypeer, $cainfo, $proxy,
22
    $proxyuser, $proxypwd, $timeout, $requestcompression, $responsecompression, $clientcookies;
23
24
include __DIR__ . '/common.php';
25
26
if ($action == '') {
27
    $action = 'list';
28
}
29
30
$haseditor = false;
31
$editorurlpath = null;
32
// @const JSXMLRPC_BASEURL Url to the visual xml-rpc editing dialog's containing folder. We allow to easily configure this
33
if (defined('JSXMLRPC_BASEURL')) {
34
    $editorurlpath = JSXMLRPC_BASEURL;
0 ignored issues
show
The constant JSXMLRPC_BASEURL was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
35
    $haseditor = true;
36
} else {
37
    /// @deprecated
38
    /// @const JSXMLRPC_PATH Path to the visual xml-rpc editing dialog's containing folder. Can be absolute, or
39
    ///         relative to this debugger's folder.
40
    if (defined('JSXMLRPC_PATH')) {
41
        $editorpaths = array(JSXMLRPC_PATH[0] === '/' ? JSXMLRPC_PATH : (__DIR__ . '/' . JSXMLRPC_PATH));
0 ignored issues
show
The constant JSXMLRPC_PATH was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
42
    } else {
43
        $editorpaths = array(
44
            __DIR__ . '/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via taskfile
45
            __DIR__ . '/vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer inside the debugger
46
            __DIR__ . '/node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm inside the debugger
47
            __DIR__ . '/../vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer
48
            __DIR__ . '/../node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm
49
            __DIR__ . '/../../jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc too
50
            __DIR__ . '/../../../../debugger/jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc installed in the top-level via taskfile (ie. jsonrpc)
51
            __DIR__ . '/../../../../debugger/vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc installed in the top-level debugger via composer
52
            __DIR__ . '/../../../../debugger/node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc installed in the top-level debugger via npm
53
            __DIR__ . '/../../../../node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc installed via npm in the top-level project
54
        );
55
    }
56
    foreach($editorpaths as $editorpath) {
57
        if (is_file(realpath($editorpath . 'visualeditor.html'))) {
58
            $haseditor = true;
59
            break;
60
        }
61
    }
62
    if ($haseditor) {
63
        $controllerRootUrl = str_replace('/controller.php', '', parse_url($_SERVER['REQUEST_URI'],  PHP_URL_PATH));
64
        $editorurlpath = $controllerRootUrl . '/' . preg_replace('|^' . preg_quote(__DIR__, '|') .'|', '', $editorpath);
65
        /// @todo for cases above 4 and up, look at $controllerRootUrl and check if the web root is not pointing directly
66
        ///       at this folder, as in that case the link to the visualeditor will not
67
        ///       work, as it will be in the form http(s)://domain/../../jsxmlrpc/debugger/visualeditor.html
68
    }
69
}
70
?><!DOCTYPE html>
71
<html lang="en">
72
<head>
73
    <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico">
74
    <title><?php if (defined('DEFAULT_WSTYPE') && (DEFAULT_WSTYPE == 1 || DEFAULT_WSTYPE == 2)) echo 'JSON-RPC'; else echo 'XML-RPC'; ?> Debugger</title>
0 ignored issues
show
The constant DEFAULT_WSTYPE was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
75
    <meta name="robots" content="index,nofollow"/>
76
    <script type="text/javascript" language="Javascript">
77
        if (window.name != 'frmcontroller')
78
            top.location.replace('index.php?run=' + escape(self.location));
79
    </script>
80
    <!-- xml-rpc/json-rpc base library -->
81
    <script type="module">
82
        import {base64_decode} from 'https://cdn.jsdelivr.net/npm/@jsxmlrpc/[email protected]/lib/index.js';
83
        window.base64_decode = base64_decode;
84
    </script>
85
    <style>
86
        <!--
87
        html {
88
            overflow: -moz-scrollbars-vertical;
89
        }
90
        body {
91
            padding: 0.5em;
92
            background-color: #EEEEEE;
93
            font-family: Verdana, Arial, Helvetica, sans-serif;
94
            font-size: 8pt;
95
        }
96
        h1 {
97
            font-size: 12pt;
98
            margin: 0.5em;
99
            display: inline-block;
100
        }
101
        h2 {
102
            font-size: 10pt;
103
            display: inline;
104
            vertical-align: top;
105
        }
106
        h3 {
107
            display: inline;
108
        }
109
        table {
110
            border: 1px solid gray;
111
            margin-bottom: 0.5em;
112
            padding: 0.25em;
113
            width: 100%;
114
        }
115
        #methodpayload {
116
            display: inline;
117
        }
118
        #idcell {
119
            visibility: hidden;
120
        }
121
        td {
122
            vertical-align: top;
123
            font-family: Verdana, Arial, Helvetica, sans-serif;
124
            font-size: 8pt;
125
        }
126
        .labelcell {
127
            text-align: right;
128
        }
129
        -->
130
    </style>
131
    <script type="text/javascript">
132
        function verifyserver() {
133
            if (document.frmaction.host.value == '') {
134
                alert('Please insert a server name or address');
135
                return false;
136
            }
137
            if (document.frmaction.path.value == '')
138
                document.frmaction.path.value = '/';
139
            var action = '';
140
            for (counter = 0; counter < document.frmaction.action.length; counter++)
141
                if (document.frmaction.action[counter].checked) {
142
                    action = document.frmaction.action[counter].value;
143
                }
144
            if (document.frmaction.method.value == '' && (action == 'execute' || action == 'wrap' || action == 'describe')) {
145
                alert('Please insert a method name');
146
                return false;
147
            }
148
            if (document.frmaction.authtype.value != '1' && document.frmaction.username.value == '') {
149
                alert('No username for authenticating to server: authentication disabled');
150
            }
151
152
            return true;
153
        }
154
155
        function switchaction() {
156
            // reset html layout depending on action to be taken
157
            var action = '';
158
            for (counter = 0; counter < document.frmaction.action.length; counter++)
159
                if (document.frmaction.action[counter].checked) {
160
                    action = document.frmaction.action[counter].value;
161
                }
162
            if (action == 'execute') {
163
                document.frmaction.methodpayload.disabled = false;
164
                displaydialogeditorbtn(true);//if (document.getElementById('methodpayloadbtn') != undefined) document.getElementById('methodpayloadbtn').disabled = false;
165
                document.frmaction.method.disabled = false;
166
                document.frmaction.methodpayload.rows = 10;
167
                document.frmaction.id.disabled = false;
168
                if (document.frmaction.id.value == '') {
169
                    document.frmaction.id.value = '1';
170
                }
171
            }
172
            else if (action == 'notification') {
173
                document.frmaction.methodpayload.disabled = false;
174
                displaydialogeditorbtn(true);//if (document.getElementById('methodpayloadbtn') != undefined) document.getElementById('methodpayloadbtn').disabled = false;
175
                document.frmaction.method.disabled = false;
176
                document.frmaction.methodpayload.rows = 10;
177
                document.frmaction.id.disabled = true;
178
                if (document.frmaction.id.value != '') {
179
                    document.frmaction.id.value = '';
180
                }
181
            }
182
            else {
183
                document.frmaction.methodpayload.rows = 1;
184
                if (action == 'describe' || action == 'wrap') {
185
                    document.frmaction.methodpayload.disabled = true;
186
                    displaydialogeditorbtn(false); //if (document.getElementById('methodpayloadbtn') != undefined) document.getElementById('methodpayloadbtn').disabled = true;
187
                    document.frmaction.method.disabled = false;
188
                    document.frmaction.id.disabled = false;
189
                    if (document.frmaction.id.value == '') {
190
                        document.frmaction.id.value = '1';
191
                    }
192
                }
193
                else // list
194
                {
195
                    document.frmaction.methodpayload.disabled = true;
196
                    displaydialogeditorbtn(false); //if (document.getElementById('methodpayloadbtn') != undefined) document.getElementById('methodpayloadbtn').disabled = false;
197
                    document.frmaction.method.disabled = true;
198
                    document.frmaction.id.disabled = false;
199
                    if (document.frmaction.id.value == '') {
200
                        document.frmaction.id.value = '1';
201
                    }
202
                }
203
            }
204
        }
205
206
        function switchssl() {
207
            if (document.frmaction.protocol.value != '2' && document.frmaction.protocol.value != '3') {
208
                document.frmaction.verifypeer.disabled = true;
209
                document.frmaction.verifyhost.disabled = true;
210
                document.frmaction.cainfo.disabled = true;
211
            }
212
            else {
213
                document.frmaction.verifypeer.disabled = false;
214
                document.frmaction.verifyhost.disabled = false;
215
                document.frmaction.cainfo.disabled = false;
216
            }
217
        }
218
219
        function switchauth() {
220
            if (document.frmaction.protocol.value != '0') {
221
                document.frmaction.authtype.disabled = false;
222
            }
223
            else {
224
                document.frmaction.authtype.disabled = true;
225
                document.frmaction.authtype.value = 1;
226
            }
227
        }
228
229
        function swicthcainfo() {
230
            if (document.frmaction.verifypeer.checked == true) {
231
                document.frmaction.cainfo.disabled = false;
232
            }
233
            else {
234
                document.frmaction.cainfo.disabled = true;
235
            }
236
        }
237
238
        function switchtransport(is_json) {
239
            if (is_json == 2) {
240
                document.getElementById("idcell").style.visibility = 'visible';
241
                document.getElementById("notificationcell").style.visibility = 'visible';
242
                document.frmjsonrpc2.yes.checked = true;
243
                document.frmjsonrpc1.yes.checked = false;
244
                document.frmxmlrpc.yes.checked = false;
245
                document.frmaction.wstype.value = "2";
246
            } else if (is_json == 1) {
247
                document.getElementById("idcell").style.visibility = 'visible';
248
                document.getElementById("notificationcell").style.visibility = 'visible';
249
                document.frmjsonrpc2.yes.checked = false;
250
                document.frmjsonrpc1.yes.checked = true;
251
                document.frmxmlrpc.yes.checked = false;
252
                document.frmaction.wstype.value = "1";
253
            }
254
            else {
255
                document.getElementById("idcell").style.visibility = 'hidden';
256
                document.getElementById("notificationcell").style.visibility = 'hidden';
257
                if (document.getElementById("actionnotification").checked) {
258
                    document.getElementById("actionnotification").checked = false;
259
                    document.getElementById("actionexecute").checked = true;
260
                }
261
                document.frmjsonrpc2.yes.checked = false;
262
                document.frmjsonrpc1.yes.checked = false;
263
                document.frmxmlrpc.yes.checked = true;
264
                document.frmaction.wstype.value = "0";
265
            }
266
        }
267
268
        function displaydialogeditorbtn(show) {
269
            if (show && <?php echo $haseditor ? 'true' : 'false'; ?>) {
270
                document.getElementById('methodpayloadbtn').innerHTML = '[<a href="#" onclick="activateeditor(); return false;">Edit</a>]';
271
            }
272
            else {
273
                document.getElementById('methodpayloadbtn').innerHTML = '';
274
            }
275
        }
276
277
        function activateeditor() {
278
            var url = '<?php echo $editorurlpath; ?>visualeditor.html?params=<?php echo str_replace(array("\\", "'"), array( "\\\\", "\\'"), $alt_payload); ?>';
279
            if (document.frmaction.wstype.value == "1" || document.frmaction.wstype.value == "2")
280
                url += '&type=jsonrpc';
281
            var wnd = window.open(url, '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1');
282
        }
283
284
        // if javascript version of the lib is found, allow it to send us params
285
        function buildparams(base64data) {
286
            if (typeof base64_decode == 'function') {
287
                if (base64data == '0') // workaround for bug in base64_encode...
288
                    document.getElementById('methodpayload').value = '';
289
                else
290
                    document.getElementById('methodpayload').value = base64_decode(base64data);
291
            }
292
        }
293
294
        // use GET for ease of refresh, switch to POST when payload is too big to fit in url (in IE: 2048 bytes! see http://support.microsoft.com/kb/q208427/)
295
        function switchFormMethod() {
296
            /// @todo use a more precise calculation, adding the rest of the fields to the actual generated url length -
297
            ///       retrieve first max url length for current browsers and webservers
298
            if (document.frmaction.methodpayload.value.length > 1536) {
299
                document.frmaction.action = 'action.php?usepost=true';
300
                document.frmaction.method = 'post';
301
            }
302
            /*let form = document.forms[0];
303
            let formData = new FormData(form);
304
            let search = new URLSearchParams(formData);
305
            let queryString = search.toString();
306
            alert(queryString);alert(queryString.length);*/
307
        }
308
    </script>
309
</head>
310
<body
311
    onload="<?php if ($hasjsonrpcclient) echo "switchtransport($wstype); " ?>switchaction(); switchssl(); switchauth(); swicthcainfo();<?php if ($run) {
312
        echo ' document.frmaction.submit();';
313
    } ?>">
314
<h1>XML-RPC
315
<?php if ($hasjsonrpcclient) {
316
    echo '<form name="frmxmlrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(0);"' .
317
        // q: does this check make sense at all?
318
        (!class_exists('\PhpXmlRpc\Client') ? ' disabled="disabled"' : '') . ' /></form>';
319
    if ($hasjsonrpc2) {
320
        echo ' / <form name="frmjsonrpc2" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(2);"/></form>JSON-RPC 2.0 ';
321
    }
322
    echo ' / <form name="frmjsonrpc1" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(1);"/></form>JSON-RPC 1.0 ';
323
} ?>
324
Debugger</h1><h3>(based on <a href="https://gggeek.github.io/phpxmlrpc/">PHPXMLRPC</a>, ver. <?php echo htmlspecialchars(\PhpXmlRpc\PhpXmlRpc::$xmlrpcVersion)?>
325
<?php if (class_exists('\PhpXmlRpc\JsonRpc\PhpJsonRpc')) echo ' and <a href="https://gggeek.github.io/phpxmlrpc-jsonrpc/">PHPJOSNRPC</a>, ver. ' . htmlspecialchars(\PhpXmlRpc\JsonRpc\PhpJsonRpc::$jsonrpcVersion); ?>)</h3>
0 ignored issues
show
The type PhpXmlRpc\JsonRpc\PhpJsonRpc was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
326
<form name="frmaction" method="get" action="action.php" target="frmaction" onSubmit="switchFormMethod();">
327
328
    <table id="serverblock">
329
        <tr>
330
            <td><h2>Target server</h2></td>
331
            <td class="labelcell">Protocol:</td>
332
            <td><select name="protocol" onchange="switchssl(); switchauth(); swicthcainfo();">
333
                <option value="0"<?php if ($protocol == 0) { echo ' selected="selected"'; } ?>>HTTP 1.0</option>
334
                <option value="1"<?php if ($protocol == 1) { echo ' selected="selected"'; } ?>>HTTP 1.1</option>
335
                <option value="2"<?php if ($protocol == 2) { echo ' selected="selected"'; } ?>>HTTPS</option>
336
                <option value="3"<?php if ($protocol == 3) { echo ' selected="selected"'; } ?>>HTTP2</option>
337
                <option value="4"<?php if ($protocol == 3) { echo ' selected="selected"'; } ?>>HTTP2 no TLS</option>
338
            </select></td>
339
            <td class="labelcell">Address:</td>
340
            <td><input type="text" name="host" value="<?php echo htmlspecialchars($host, ENT_COMPAT, $inputcharset); ?>"/></td>
341
            <td class="labelcell">Port:</td>
342
            <td><input type="text" name="port" value="<?php echo htmlspecialchars($port, ENT_COMPAT, $inputcharset); ?>" size="5" maxlength="5"/>
343
            </td>
344
            <td class="labelcell">Path:</td>
345
            <td><input type="text" name="path" value="<?php echo htmlspecialchars($path, ENT_COMPAT, $inputcharset); ?>"/></td>
346
        </tr>
347
    </table>
348
349
    <table id="actionblock">
350
        <tr>
351
            <td><h2>Action</h2></td>
352
            <td>List available methods<input type="radio" name="action" value="list"<?php if ($action == 'list') { echo ' checked="checked"'; } ?> onclick="switchaction();"/></td>
353
            <td>Describe method<input type="radio" name="action" value="describe"<?php if ($action == 'describe') { echo ' checked="checked"'; } ?> onclick="switchaction();"/></td>
354
            <td>Execute method<input type="radio" name="action" id="actionexecute" value="execute"<?php if ($action == 'execute') { echo ' checked="checked"'; } ?> onclick="switchaction();"/></td>
355
            <?php if ($hasjsonrpcclient) { ?><td id="notificationcell">Send notification <input type="radio" name="action" id="actionnotification" value="notification"<?php if ($action == 'notification') { echo ' checked="checked"'; } ?> onclick="switchaction();"/></td><?php } ?>
356
            <td>Generate stub for method call<input type="radio" name="action" value="wrap"<?php if ($action == 'wrap') { echo ' checked="checked"'; } ?> onclick="switchaction();"/></td>
357
        </tr>
358
    </table>
359
    <input type="hidden" name="methodsig" value="<?php echo htmlspecialchars($methodsig, ENT_COMPAT, $inputcharset); ?>"/>
360
361
    <table id="methodblock">
362
        <tr>
363
            <td><h2>Method</h2></td>
364
            <td class="labelcell">Name:</td>
365
            <td><input type="text" name="method" value="<?php echo htmlspecialchars($method, ENT_COMPAT, $inputcharset); ?>"/></td>
366
            <td class="labelcell">Payload:<br/>
367
                <div id="methodpayloadbtn"></div>
368
            </td>
369
            <td><textarea id="methodpayload" name="methodpayload" rows="1" cols="40"><?php echo htmlspecialchars($payload, ENT_COMPAT, $inputcharset); ?></textarea></td>
370
            <td class="labelcell" id="idcell">Req id: <input type="text" name="id" size="3" value="<?php echo htmlspecialchars($id, ENT_COMPAT, $inputcharset); ?>"/></td>
371
            <td><input type="hidden" name="wstype" value="<?php echo $wstype; ?>"/>
372
                <input type="submit" value="Execute" onclick="return verifyserver();"/></td>
373
        </tr>
374
    </table>
375
376
    <table id="optionsblock">
377
        <tr>
378
            <td><h2>Client options</h2></td>
379
            <td class="labelcell">Show debug info:</td>
380
            <td><select name="debug">
381
                    <option value="0"<?php if ($debug == 0) { echo ' selected="selected"'; } ?>>No</option>
382
                    <option value="1"<?php if ($debug == 1) { echo ' selected="selected"'; } ?>>Yes</option>
383
                    <option value="2"<?php if ($debug == 2) { echo ' selected="selected"'; } ?>>More</option>
384
                </select>
385
            </td>
386
            <td class="labelcell">Timeout:</td>
387
            <td><input type="text" name="timeout" size="3" value="<?php if ($timeout > 0) { echo $timeout; } ?>"/></td>
388
            <td></td>
389
            <td></td>
390
        </tr>
391
        <tr>
392
            <td class="labelcell">AUTH:</td>
393
            <td class="labelcell">Username:</td>
394
            <td><input type="text" name="username" value="<?php echo htmlspecialchars($username, ENT_COMPAT, $inputcharset); ?>"/></td>
395
            <td class="labelcell">Pwd:</td>
396
            <td><input type="password" name="password" value="<?php echo htmlspecialchars($password, ENT_COMPAT, $inputcharset); ?>"/></td>
397
            <td class="labelcell">Type</td>
398
            <td><select name="authtype">
399
                    <option value="1"<?php if ($authtype == 1) { echo ' selected="selected"'; } ?>>Basic</option>
400
                    <option value="2"<?php if ($authtype == 2) { echo ' selected="selected"'; } ?>>Digest</option>
401
                    <option value="8"<?php if ($authtype == 8) { echo ' selected="selected"'; } ?>>NTLM</option>
402
                </select></td>
403
            <td></td>
404
        </tr>
405
        <tr>
406
            <td class="labelcell">SSL:</td>
407
            <td class="labelcell">Verify Host's CN:</td>
408
            <td><select name="verifyhost">
409
                    <option value="0"<?php if ($verifyhost == 0) { echo ' selected="selected"'; } ?>>No</option>
410
                    <option value="1"<?php if ($verifyhost == 1) { echo ' selected="selected"'; } ?>>Check CN existence</option>
411
                    <option value="2"<?php if ($verifyhost == 2) { echo ' selected="selected"'; } ?>>Check CN match</option>
412
                </select></td>
413
            <td class="labelcell">Verify Cert:</td>
414
            <td><input type="checkbox" value="1" name="verifypeer" onclick="swicthcainfo();"<?php if ($verifypeer) { echo ' checked="checked"'; } ?> /></td>
415
            <td class="labelcell">CA Cert file:</td>
416
            <td><input type="text" name="cainfo" value="<?php echo htmlspecialchars($cainfo, ENT_COMPAT, $inputcharset); ?>"/></td>
417
        </tr>
418
        <tr>
419
            <td class="labelcell">PROXY:</td>
420
            <td class="labelcell">Server:</td>
421
            <td><input type="text" name="proxy" value="<?php echo htmlspecialchars($proxy, ENT_COMPAT, $inputcharset); ?>"/></td>
422
            <td class="labelcell">Proxy user:</td>
423
            <td><input type="text" name="proxyuser" value="<?php echo htmlspecialchars($proxyuser, ENT_COMPAT, $inputcharset); ?>"/></td>
424
            <td class="labelcell">Proxy pwd:</td>
425
            <td><input type="password" name="proxypwd" value="<?php echo htmlspecialchars($proxypwd, ENT_COMPAT, $inputcharset); ?>"/></td>
426
        </tr>
427
        <tr>
428
            <td class="labelcell">COMPRESSION:</td>
429
            <td class="labelcell">Request:</td>
430
            <td><select name="requestcompression">
431
                    <option value="0"<?php if ($requestcompression == 0) { echo ' selected="selected"'; } ?>>None </option>
432
                    <option value="1"<?php if ($requestcompression == 1) { echo ' selected="selected"'; } ?>>Gzip</option>
433
                    <option value="2"<?php if ($requestcompression == 2) { echo ' selected="selected"'; } ?>>Deflate</option>
434
                </select></td>
435
            <td class="labelcell">Response:</td>
436
            <td><select name="responsecompression">
437
                    <option value="0"<?php if ($responsecompression == 0) { echo ' selected="selected"'; } ?>>None</option>
438
                    <option value="1"<?php if ($responsecompression == 1) { echo ' selected="selected"'; } ?>>Gzip</option>
439
                    <option value="2"<?php if ($responsecompression == 2) { echo ' selected="selected"'; } ?>>Deflate</option>
440
                    <option value="3"<?php if ($responsecompression == 3) { echo ' selected="selected"'; } ?>>Any</option>
441
                </select></td>
442
            <td></td>
443
        </tr>
444
        <tr>
445
            <td class="labelcell">COOKIES:</td>
446
            <td colspan="4" class="labelcell"><input type="text" name="clientcookies" size="80" value="<?php echo htmlspecialchars($clientcookies, ENT_COMPAT, $inputcharset); ?>"/></td>
447
            <td colspan="2">Format: 'cookie1=value1, cookie2=value2'</td>
448
        </tr>
449
    </table>
450
451
</form>
452
</body>
453
</html>
454