Tcl Library Source Code

Check-in [357caec02f]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Removing hardcoded path, and registering the paths in the appropriate manner in the httpd tests
Timelines: family | ancestors | descendants | both | aku-the-big-httpd-testsuite-cleanup
Files: files | file ages | folders
SHA3-256: 357caec02f74e46507a363b5bb211aac5b63d1ba622ed5400cc40aa16b035fc3
User & Date: hypnotoad 2019-06-04 19:50:05
Context
2019-06-04
20:08
Added demonstrations of passing configuration parameters and seeing the data reflected in behavior in httpd Closed-Leaf check-in: 367088a3b3 user: hypnotoad tags: aku-the-big-httpd-testsuite-cleanup
19:50
Removing hardcoded path, and registering the paths in the appropriate manner in the httpd tests check-in: 357caec02f user: hypnotoad tags: aku-the-big-httpd-testsuite-cleanup
19:38
Adding a DOCUMENT_ROOT to the server headers for scgi servers check-in: a4f6ae73f9 user: hypnotoad tags: aku-the-big-httpd-testsuite-cleanup
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/httpd/httpd.test.

286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
...
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
...
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
        #puts [list REPLY BODY WAS $reply_body]
    }
}
clay::define ::test::content.file {
    superclass ::httpd::content.file
    method content {} {
        my reset
        set doc_root $::TESTDIR
        my variable reply_file
        set reply_file [file join $doc_root pkgIndex.tcl]
    }
}
clay::define ::test::content.time {
    method content {} {
        my variable reply_body
................................................................................
# Build the server
###

::httpd::server create TESTAPP port 10001 doc_root $::TESTDIR
TESTAPP plugin dict_dispatch
TESTAPP uri add * /      [list mixin {reply ::test::content.echo}]
TESTAPP uri add * /echo  [list mixin {reply ::test::content.echo}]
TESTAPP uri add * /file  [list mixin {reply ::test::content.file}]
TESTAPP uri add * /time  [list mixin {reply ::test::content.time}]
TESTAPP uri add * /error [list mixin {reply ::test::content.error}]

# Catch all
#TESTAPP uri add * * [list mixin {reply httpd::content.echo}]

::DEBUG puts httpd-client-0001
................................................................................
}

::httpd::server create TESTPROXY port 10002 doc_root $::TESTDIR
TESTAPP   uri add * /proxy* [list mixin {reply ::test::content.proxy} proxy_port [TESTPROXY port_listening]]
TESTPROXY plugin dict_dispatch
TESTPROXY uri add * /       [list mixin {reply ::test::content.echo}]
TESTPROXY uri add * /echo   [list mixin {reply ::test::content.echo}]
TESTPROXY uri add * /file   [list mixin {reply ::test::content.file}]
TESTPROXY uri add * /time   [list mixin {reply ::test::content.time}]
TESTPROXY uri add * /error  [list mixin {reply ::test::content.error}]

## AKU ##
#
# Note: Proxy replies are not normalized to \n. They contain \r\n
# endings.  The old test::compare was ok with that due to running a






|







 







|







 







|







286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
...
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
...
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
        #puts [list REPLY BODY WAS $reply_body]
    }
}
clay::define ::test::content.file {
    superclass ::httpd::content.file
    method content {} {
        my reset
        set doc_root  [my clay get path]
        my variable reply_file
        set reply_file [file join $doc_root pkgIndex.tcl]
    }
}
clay::define ::test::content.time {
    method content {} {
        my variable reply_body
................................................................................
# Build the server
###

::httpd::server create TESTAPP port 10001 doc_root $::TESTDIR
TESTAPP plugin dict_dispatch
TESTAPP uri add * /      [list mixin {reply ::test::content.echo}]
TESTAPP uri add * /echo  [list mixin {reply ::test::content.echo}]
TESTAPP uri add * /file  [list mixin {reply ::test::content.file} path $::TESTDIR]
TESTAPP uri add * /time  [list mixin {reply ::test::content.time}]
TESTAPP uri add * /error [list mixin {reply ::test::content.error}]

# Catch all
#TESTAPP uri add * * [list mixin {reply httpd::content.echo}]

::DEBUG puts httpd-client-0001
................................................................................
}

::httpd::server create TESTPROXY port 10002 doc_root $::TESTDIR
TESTAPP   uri add * /proxy* [list mixin {reply ::test::content.proxy} proxy_port [TESTPROXY port_listening]]
TESTPROXY plugin dict_dispatch
TESTPROXY uri add * /       [list mixin {reply ::test::content.echo}]
TESTPROXY uri add * /echo   [list mixin {reply ::test::content.echo}]
TESTPROXY uri add * /file   [list mixin {reply ::test::content.file} path $::TESTDIR]
TESTPROXY uri add * /time   [list mixin {reply ::test::content.time}]
TESTPROXY uri add * /error  [list mixin {reply ::test::content.error}]

## AKU ##
#
# Note: Proxy replies are not normalized to \n. They contain \r\n
# endings.  The old test::compare was ok with that due to running a