]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: replace significant invisible spaces with macros
authorViktor Szakats <commit@vsz.me>
Thu, 30 Oct 2025 23:55:13 +0000 (00:55 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 31 Oct 2025 16:15:33 +0000 (17:15 +0100)
To make them explicit, visible, avoid being accidentally trimmed.
Also prevents Git warnings, e.g. on `git am`.

Also:
- runtests: add support for `%spc%` and `%tab%` macros.
- test59: delete non-significant line-ending space.
- spacecheck.pl: drop line-ending whitespace exception for tests.

Closes #19300

41 files changed:
.github/scripts/spacecheck.pl
docs/tests/FILEFORMAT.md
tests/data/test1029
tests/data/test1070
tests/data/test1185
tests/data/test136
tests/data/test1461
tests/data/test1654
tests/data/test1664
tests/data/test17
tests/data/test188
tests/data/test189
tests/data/test1940
tests/data/test1941
tests/data/test1942
tests/data/test1944
tests/data/test1945
tests/data/test1946
tests/data/test1947
tests/data/test1955
tests/data/test1958
tests/data/test2302
tests/data/test2306
tests/data/test2400
tests/data/test2403
tests/data/test2406
tests/data/test2500
tests/data/test2503
tests/data/test378
tests/data/test4
tests/data/test421
tests/data/test459
tests/data/test46
tests/data/test54
tests/data/test57
tests/data/test59
tests/data/test689
tests/data/test769
tests/data/test792
tests/data/test793
tests/testutil.pm

index fbd064db3ba2dc0666311959495e322eea376dab..fc1bf8f76cd1329e93504a45ca91452508b2df7e 100755 (executable)
@@ -42,10 +42,6 @@ my @need_crlf = (
     "\\.(bat|sln)\$",
 );
 
-my @space_at_eol = (
-    "^tests/data/test",
-);
-
 my @non_ascii_allowed = (
     '\xC3\xB6',  # UTF-8 for https://codepoints.net/U+00F6 LATIN SMALL LETTER O WITH DIAERESIS
 );
@@ -129,8 +125,7 @@ while(my $filename = <$git_ls_files>) {
         push @err, "content: must use LF EOL for this file type";
     }
 
-    if(!fn_match($filename, @space_at_eol) &&
-       $content =~ /[ \t]\n/) {
+    if($content =~ /[ \t]\n/) {
         my $line;
         for my $l (split(/\n/, $content)) {
             $line++;
index 91aa9a587028bdbaa2a739e8ce776062773729e5..cbc9221056671fde193a71b7bc13f5e32f6feaa2 100644 (file)
@@ -76,6 +76,14 @@ For example, to insert the word hello 100 times:
 
     %repeat[100 x hello]%
 
+## Whitespace
+
+To add significant whitespace characters at the end of the line, or to empty
+lines:
+
+    %spc%
+    %tab%
+
 ## Insert capped epoch days
 
 Mostly to test capped cookie expire dates: `%days[NUM]` inserts the number of
index f37146a7478768faa95f673d418aa3966fce6b5b..d019bff7b1878281e70908a3da360bfe802c4a3c 100644 (file)
@@ -50,7 +50,7 @@ Content-Length: 62
 Connection: close\r
 \r
 This server reply is for testing a simple Location: following
-http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER 0 
+http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER 0%spc%
 </stdout>
 </verify>
 </testcase>
index 7f2b4fb09b3fff0020c04e2b90301786c93663f5..f199e71d4bd278ac58f693e7b945bd1229c777de 100644 (file)
@@ -57,7 +57,7 @@ Expect: 100-continue
 Content-Length: 2313
 Content-Type: application/x-www-form-urlencoded
 
-This creates 
+This creates%spc%
 </protocol>
 </verify>
 </testcase>
index 7323c59a0dce86640458bd6b8bd4af0def5909d6..c00e982301d2424d85a678be247c7d0dfe823022 100644 (file)
@@ -91,7 +91,7 @@ void startfunc(int a, int b) {
 ./%LOGDIR/code1185.c:4:82: warning: Longer than 79 columns (LONGLINE)
  int hello; /*------------------------------------------------------------------*/
 ./%LOGDIR/code1185.c:5:4: error: Contains TAB character (TABS)
- int   tab;
+ int%tab%tab;
     ^
 ./%LOGDIR/code1185.c:7:13: warning:  func with space (SPACEBEFOREPAREN)
  int a = func ();
@@ -118,7 +118,7 @@ void startfunc(int a, int b) {
  } else {
  ^
 ./%LOGDIR/code1185.c:24:11: warning: missing space after close paren (PARENBRACE)
- if(a == 2){  
+ if(a == 2){%spc%%spc%
            ^
 ./%LOGDIR/code1185.c:28:14: warning: no space before semicolon (SPACESEMICOLON)
  func_return() ;
@@ -205,10 +205,10 @@ void startfunc(int a, int b) {
   // CPP comment ?
   ^
 ./%LOGDIR/code1185.c:1:1: error: Missing copyright statement (COPYRIGHT)
+%spc%
  ^
 ./%LOGDIR/code1185.c:1:1: error: Missing closing comment (OPENCOMMENT)
+%spc%
  ^
 checksrc: 0 errors and 41 warnings
 </stdout>
index 949ae2ebb2d4a1dd6e65c5c88436bc35a678bb27..70537719cce89290f3a8e0febd5315039859943d 100644 (file)
@@ -30,7 +30,7 @@ FTP with user and no password
 <verify>
 <protocol crlf="yes">
 USER user
-PASS 
+PASS%spc%
 PWD
 EPSV
 TYPE I
index 79b370bc1816f2267e9c6a8d001a56e348f719b1..71de31772dd717b981067e02cd1bc75f5275abcb 100644 (file)
@@ -47,8 +47,8 @@ Usage: curl [options...] <url>
 
 This is not the full help; this menu is split into categories.
 Use "--help category" to get an overview of all categories, which are:
-auth, connection, curl, deprecated, dns, file, ftp, global, http, imap, ldap, 
-output, pop3, post, proxy, scp, sftp, smtp, ssh, telnet, tftp, timeout, tls, 
+auth, connection, curl, deprecated, dns, file, ftp, global, http, imap, ldap,%spc%
+output, pop3, post, proxy, scp, sftp, smtp, ssh, telnet, tftp, timeout, tls,%spc%
 upload, verbose.
 Use "--help all" to list all options
 Use "--help [option]" to view documentation for a given option
index 5659277ce3c15509f6a907a17548838511a199fb..3b8823644167d53ad2db8e8aee0571930b91fc7f 100644 (file)
@@ -27,7 +27,7 @@ h2 example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 0
 # a comment
 h2 foo.example.com 443 h3 shiny.example.com 8443 "20291231 23:30:00" 0 0
   h1 example.com 443 h3 shiny.example.com 8443 "20121231 00:00:01" 0 0
-       h3 example.com 443 h3 shiny.example.com 8443 "20131231 00:00:00" 0 0
+%tab%h3 example.com 443 h3 shiny.example.com 8443 "20131231 00:00:00" 0 0
     # also a comment
 bad example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 0
 rubbish
index b36ef3597d1d476188940ff53e9bddead9e2af0c..ea126a3be7572797037cf86451898c93c5718b8f 100644 (file)
@@ -68,7 +68,7 @@ curlx_str_singlespace
 3: ("b") 5, line 0
 4: ("\") 5, line 0
 5: (" ") 0, line 1
-6: ("  ") 5, line 0
+6: ("%tab%") 5, line 0
 7: ("
 ") 5, line 0
 8: ("") 5, line 0
index 97a37d85cfd522e168b48cc56a9462df0ba43056..c8c0a19b77fc1e254f25c410b1c8956d9b3547be 100644 (file)
@@ -46,7 +46,7 @@ request MOOO
 <protocol crlf="yes">
 MOOO /that.site.com/%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
-User-Agent: agent007 license to drill  
+User-Agent: agent007 license to drill%tab%
 Accept: */*
 
 </protocol>
index 43fa70e726f77b6fc8b3eb22168fff36a884e7d7..2fca25112904d46a1abf1d8be612bdd456fb42d5 100644 (file)
@@ -19,7 +19,7 @@ Content-Length: 3
 OK
 </data>
 <data1>
-HTTP/1.1 200 OK 
+HTTP/1.1 200 OK%spc%
 Connection: close
 Content-Length: 15
 Content-Range: bytes 50-
@@ -32,7 +32,7 @@ HTTP/1.1 301 OK swsbounce
 Location: /%TESTNUMBER
 Content-Length: 3
 
-HTTP/1.1 200 OK 
+HTTP/1.1 200 OK%spc%
 Connection: close
 Content-Length: 15
 Content-Range: bytes 50-
index 6ca4b66e1733157fbeafdd2ab7a680dd1c880f99..d3cd0f2b2c14254d7a8d62dbea2fb46e9b2a9675 100644 (file)
@@ -16,7 +16,7 @@ Content-Length: 3
 OK
 </data>
 <data1>
-HTTP/1.1 200 OK 
+HTTP/1.1 200 OK%spc%
 Connection: close
 Content-Length: 15
 
@@ -28,7 +28,7 @@ HTTP/1.1 301 OK swsbounce
 Location: /%TESTNUMBER
 Content-Length: 3
 
-HTTP/1.1 200 OK 
+HTTP/1.1 200 OK%spc%
 Connection: close
 Content-Length: 15
 
index f4c6dd1a1a6bc349f105cbc85b349a41e5519113..d15bf1d5b60ff67b72b148422abd9c1c58353810 100644 (file)
@@ -10,10 +10,10 @@ curl_easy_header
 <data nocheck="yes">
 HTTP/1.1 200 OK
 Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server:       test with trailing space     
+Server:       test with trailing space%repeat[5 x  ]%
 Content-Type: text/html
 Fold: is
- folding a     
+ folding a%repeat[5 x  ]%
    line
 Content-Length: 0
 Set-Cookie: onecookie=data;
@@ -59,8 +59,8 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 - Set-Cookie == secondcookie=2data; (1/3)
 - Set-Cookie == cookie3=data3; (2/3)
  Fold == is folding a line
- Blank == 
- Blank2 == 
+ Blank ==%spc%
+ Blank2 ==%spc%
 </stdout>
 </verify>
 </testcase>
index fe3f1de3917ced17b1776ea135ea9d808f21d4e9..9ef4b3b1e4b645977f6aac884b88a2d35df3149e 100644 (file)
@@ -11,7 +11,7 @@ CONNECT
 <data nocheck="yes">
 HTTP/1.1 200 OK
 Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server:       test with trailing space     
+Server:       test with trailing space%repeat[5 x  ]%
 Content-Type: text/html
 Content-Length: 0
 Set-Cookie: onecookie=data;
index 9079800990462e14e7973ab92039c41b6f4ce2cc..7729ff80e6fd8811688f4d8e7fdcc7f85d2d908d 100644 (file)
@@ -15,7 +15,7 @@ Server: maybe different
 
 HTTP/1.1 200 OK
 Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server:       test with trailing space     
+Server:       test with trailing space%repeat[5 x  ]%
 Content-Type: text/html
 Content-Length: 0
 Set-Cookie: onecookie=data;
index ad0920d4ae7684757b188761779d8a80f903e403..a5c1673c79395f215ccad422db251341796e6cfa 100644 (file)
@@ -10,7 +10,7 @@ curl_easy_header
 <data nocheck="yes">
 HTTP/1.1 302 OK
 Date: Thu, 01 Nov 2001 14:49:00 GMT
-Server:       test with trailing space     
+Server:       test with trailing space%repeat[5 x  ]%
 Content-Type: text/html
 Content-Length: 0
 Set-Cookie: onecookie=data;
index 86fa147adcf0b4c641e1ebcaf9be5efa27174f15..1b30965f609c30d58c7b12da7225c369f821e72d 100644 (file)
@@ -11,7 +11,7 @@ CONNECT
 <data nocheck="yes">
 HTTP/1.1 200 OK
 Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server:       test with trailing space     
+Server:       test with trailing space%repeat[5 x  ]%
 Content-Type: text/html
 Content-Length: 0
 Set-Cookie: onecookie=data;
index 20854e16bad89400bdabf0f8012518fd6ba7e8f9..35ca1672bd868c8d5a9ca7b5b197606e457bf295 100644 (file)
@@ -10,7 +10,7 @@ curl_easy_header
 <data nocheck="yes">
 HTTP/1.1 302 OK
 Date: Thu, 01 Nov 2001 14:49:00 GMT
-Server:       test with trailing space     
+Server:       test with trailing space%repeat[5 x  ]%
 Content-Type: text/html
 Content-Length: 0
 Set-Cookie: onecookie=data;
index f159e4d51cd845af588be8a2ca4fae358e71ff54..49e28c14aafce177cd6f0bdead1c473be26eb119 100644 (file)
@@ -10,7 +10,7 @@ curl_easy_nextheader
 <data nocheck="yes">
 HTTP/1.1 302 OK
 Date: Thu, 01 Nov 2001 14:49:00 GMT
-Server:       test with trailing space     
+Server:       test with trailing space%repeat[5 x  ]%
 Content-Type: text/html
 Content-Length: 0
 Set-Cookie: onecookie=data;
index 2266529bbe360199535443c6c54f0ec7ccd1f7a0..be23a9d6284151432e411edb61a2dc1e3b3160f9 100644 (file)
@@ -66,7 +66,7 @@ Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/ple/exam/xxx4_request, S
 X-Xxx-Date: 19700101T000000Z
 test3: 1234
 test2:
-test_space: t  s  m       end    
+test_space: t%tab%s  m%tab%   end%repeat[4 x  ]%
 tesMixCase: MixCase
 
 </protocol>
index 239a11eccb2f03fbb81203fa10fd3238eac9c3ec..23aa849444a634ba9dc82792a8a4040abee9948f 100644 (file)
@@ -64,7 +64,7 @@ GET /aws_sigv4/testapi/test HTTP/1.1
 Host: exam.ple.com:9000
 Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/ple/exam/xxx4_request, SignedHeaders=content-type;host;x-xxx-content-sha256;x-xxx-date, Signature=25b4cac711ea8f65010c485d3778885f5f3870d0b8ff0b3ab58a8d7eeab991ff
 X-Xxx-Date: 19700101T000000Z
-X-Xxx-Content-Sha256:  arbitrary 
+X-Xxx-Content-Sha256: %tab%arbitrary%spc%
 
 </protocol>
 </verify>
index 117b5a7ebfede80e0a66d6dd4b5816670508a56c..0b3a7d524e4370f9c1cbe33fef350403f9b321fc 100644 (file)
@@ -66,7 +66,7 @@ Connection: Upgrade
 %hex[%8a%808321]hex%
 </protocol>
 <stdout mode="text">
-68 65 6c 6c 6f 
+68 65 6c 6c 6f%spc%
 RECFLAGS: 1
 </stdout>
 <limits>
index 0f7bd541dfac838f8adeb5ecd70633d0b9fc2074..c6bbdb0f2b5c1700839803a77ac761545bdd316a 100644 (file)
@@ -24,7 +24,7 @@ Funny-head: yesyes
 </data>
 <data2 nocheck="yes">
 HTTP/1.1 200 OK swsclose
-       Access-Control-Allow-Origin: *
+%tab%Access-Control-Allow-Origin: *
 Connection: Keep-Alive
 Content-Type: text/html; charset=utf-8
 Date: Wed, 10 May 2023 14:58:08 GMT
index 9d53f68b96c5ff4d92de2c2fcb94254120cb0e84..cb68a11e213faf6fbcb4570024fd0bfc10ba5ce0 100644 (file)
@@ -50,7 +50,7 @@ HTTP/2 GET over HTTPS
 # Verify data after the test has been "shot"
 <verify>
 <stdout crlf="yes">
-HTTP/2 200 
+HTTP/2 200%spc%
 date: Tue, 09 Nov 2010 14:49:00 GMT
 content-length: 6
 content-type: text/html
index 5901866265cbbf991b0c2ae09c9174c2daeba8d6..dec03cd51cebc52ab00132ed8e1dea58c90883a7 100644 (file)
@@ -51,7 +51,7 @@ HTTP/2 GET using %{header_json}
 # Verify data after the test has been "shot"
 <verify>
 <stdout crlf="yes">
-HTTP/2 200 
+HTTP/2 200%spc%
 date: Tue, 09 Nov 2010 14:49:00 GMT
 content-length: 6
 content-type: text/html
index bc6cc41ad28d5378d7e4f012000505ad72b10599..a6db9233efcd2dd0bc747050040e8a92093ecd5e 100644 (file)
@@ -49,7 +49,7 @@ HTTP/2 over HTTPS with -f
 # Verify data after the test has been "shot"
 <verify>
 <stdout crlf="yes">
-HTTP/2 404 
+HTTP/2 404%spc%
 date: Tue, 09 Nov 2010 14:49:00 GMT
 content-length: 6
 content-type: text/html
index 8bcb5e0c62f920bd4408404ab8da85b84a89717e..ad6f0b7e1adf76254f399471a7551197d8545e23 100644 (file)
@@ -58,7 +58,7 @@ Accept: */*
 
 </protocol>
 <stdout crlf="yes">
-HTTP/3 200 
+HTTP/3 200%spc%
 date: Tue, 09 Nov 2010 14:49:00 GMT
 last-modified: Tue, 13 Jun 2000 12:10:00 GMT
 etag: "21025-dc7-39462498"
index f95486ce0f978a3da20db19798cd781a0d7996f9..28a1f973b506abf3030c102781209d5a92cb2f60 100644 (file)
@@ -50,7 +50,7 @@ HTTP/3 header-api
 # Verify data after the test has been "shot"
 <verify>
 <stdout crlf="yes">
-HTTP/3 200 
+HTTP/3 200%spc%
 date: Tue, 09 Nov 2010 14:49:00 GMT
 content-length: 6
 content-type: text/html
index 9777b878b9668c2ba1ff06bac01085f28a3f0024..e15e97e6e02b393e020e476f2ed062346c57c732 100644 (file)
@@ -29,7 +29,7 @@ Reject using -T and -d at once
 2
 </errorcode>
 <stderr mode="text">
-Warning: You can only select one HTTP request method! You asked for both PUT 
+Warning: You can only select one HTTP request method! You asked for both PUT%spc%
 Warning: (-T, --upload-file) and POST (-d, --data).
 </stderr>
 </verify>
index 06012cca862ba51c939b5931f0535873f33cdfc6..4f57f8dd628cbd22c8a5ddd6dd25a50bd8ed4b9f 100644 (file)
@@ -44,7 +44,7 @@ User-Agent: curl/%VERSION
 extra-header: here
 Accept: replaced
 X-Custom-Header:
-X-Test: foo; 
+X-Test: foo;%spc%
 X-Test2: foo;
 
 GET /%TESTNUMBER HTTP/1.1
@@ -53,7 +53,7 @@ User-Agent: curl/%VERSION
 extra-header: here
 Accept: replaced
 X-Custom-Header:
-X-Test: foo; 
+X-Test: foo;%spc%
 X-Test2: foo;
 
 </protocol>
index 2c79c1f8f16de5edb13ddaff2c4a3a94a79111db..b9483e6ba006111372d499c57903e84435f57b1e 100644 (file)
@@ -21,7 +21,7 @@ referrer-policy: strict-origin-when-cross-origin
 access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS
 access-control-max-age: 1728000
 access-control-allow-headers: Authorization, Content-Type, AuthorizationOauth, X-EARLY-ACCESS
-access-control-expose-headers: 
+access-control-expose-headers:%spc%
 vary: Accept
 etag: W/"2678f9ab2ba550d164e7cc014aefd31e"
 cache-control: max-age=0, private, must-revalidate
index 198e67d2a3e00cdc4375c4cbb86b20e978365512..d1f1ba261ce546bcc1dafb4f6136ccef37d30d48 100644 (file)
@@ -56,7 +56,7 @@ Content-Type: application/x-www-form-urlencoded
 arg
 </protocol>
 <stderr mode="text">
-Warning: %LOGDIR/config:1: warning: 'data' uses unquoted whitespace. This may 
+Warning: %LOGDIR/config:1: warning: 'data' uses unquoted whitespace. This may%spc%
 Warning: cause side-effects. Consider double quotes.
 </stderr>
 </verify>
index 30d88b973d905d8264be09ff62776f4da3cdffe4..d426503fe7e40a1949d8285cafc892bac2c1f9ed 100644 (file)
@@ -65,7 +65,7 @@ www.loser.com FALSE   /       FALSE   2139150993      UID     99
 domain..tld    FALSE   /       FALSE   2139150993      mooo    indeed
 #HttpOnly_domain..tld  FALSE   /want   FALSE   2139150993      mooo2   indeed2
 %endif
-domain..tld    FALSE   /want   FALSE   0       empty   
+domain..tld    FALSE   /want   FALSE   0       empty%tab%
 </file>
 <features>
 cookies
@@ -88,18 +88,18 @@ Cookie: empty=; mooo2=indeed2; mooo=indeed
 # This file was generated by libcurl! Edit at your own risk.
 
 domain..tld    FALSE   /want/  FALSE   0       simplyhuge      %repeat[3998 x z]%
-domain..tld    FALSE   /       FALSE   0       justaname       
+domain..tld    FALSE   /       FALSE   0       justaname%tab%
 domain..tld    FALSE   /       FALSE   0       ASPSESSIONIDQGGQQSJJ    GKNBDIFAAOFDPDAIEAKDIBKE
 domain..tld    FALSE   /       FALSE   0       ckySession      temporary
 domain..tld    FALSE   /       FALSE   %days[400]      ckyPersistent   permanent
 %if large-time
-domain..tld    FALSE   /want   FALSE   0       empty   
+domain..tld    FALSE   /want   FALSE   0       empty%tab%
 #HttpOnly_domain..tld  FALSE   /want   FALSE   22139150993     mooo2   indeed2
 domain..tld    FALSE   /       FALSE   22139150993     mooo    indeed
 www.loser.com  FALSE   /       FALSE   22139150993     UID     99
 www.fake.come  FALSE   /       FALSE   22147483647     cookiecliente   si
 %else
-domain..tld    FALSE   /want   FALSE   0       empty   
+domain..tld    FALSE   /want   FALSE   0       empty%tab%
 #HttpOnly_domain..tld  FALSE   /want   FALSE   2139150993      mooo2   indeed2
 domain..tld    FALSE   /       FALSE   2139150993      mooo    indeed
 www.loser.com  FALSE   /       FALSE   2139150993      UID     99
index 478e52a32cb6348c3e3c902a7219cf0e3d9fa018..c0be2d624e285b8b3b7e34740ee017b119983a0f 100644 (file)
@@ -11,7 +11,7 @@ followlocation
 <data>
 HTTP/1.1 302 This is a weirdo text message swsclose
 Connection: close
-Location: 
+Location:%spc%
 
 This server reply is for testing
 </data>
index d3360096b93db579a3fa3487a096e96f43ac17cb..a28d6321e2c3b58af1888b175a691554cfb2f579 100644 (file)
@@ -12,7 +12,7 @@ HTTP GET
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose
 Funny-head: yesyes
-Content-Type: text/html; charset=ISO-8859-4   
+Content-Type: text/html; charset=ISO-8859-4%repeat[3 x  ]%
 
 </data>
 </reply>
index 6ccb1ce37f32480e7880fc4cd3cff8323e5bfc72..4211b4e6d204059af1a77d2d9ed1519e16a8fb01 100644 (file)
@@ -13,7 +13,7 @@ HTTP/1.0 200 OK swsclose
 Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
-hej 
+hej
 </data>
 </reply>
 
index 61e57fce4ab49ed4cd3030d1d285f2d192fc4af1..141e92a9e6a9817cf2c637a42b4ee960ea1132e8 100644 (file)
@@ -11,9 +11,9 @@ OPTIONS
 # Server-side
 <reply>
 <data>
-RTSP/1.0 786          
+RTSP/1.0 786%repeat[10 x  ]%
 
-RTSP/          
+RTSP/%repeat[10 x  ]%
 </data>
 <datacheck>
 </datacheck>
index 773d741e3fee0f19ff0395734d420cba9ef8451a..189bf95d81a8c41dfb99653007e88bcdd5fdce85 100644 (file)
@@ -16,7 +16,7 @@ Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
 Accept-Ranges: bytes
-Content-Length: 6     
+Content-Length: 6%repeat[5 x  ]%
 Connection: close
 Content-Type: text/html
 Funny-head: yesyes
index a7656e4781c3a9e7d1f0aa2da11c3fe4c66eeb35..b3630b50585238f3d79493e7aaa91fd655fb7465 100644 (file)
@@ -36,7 +36,7 @@ machine %HOSTIP login username password%hex[%00]hex% hello
 <verify>
 <protocol crlf="yes">
 USER username
-PASS 
+PASS%spc%
 PWD
 EPSV
 TYPE I
index ad68a0f4e19e14b4c8eb196910c53263747e74a6..3a3e16e08775c12451517732c345e04716d23506 100644 (file)
@@ -36,7 +36,7 @@ machine %HOSTIP login username "password"%hex[%00]hex% hello
 <verify>
 <protocol crlf="yes">
 USER username
-PASS 
+PASS%spc%
 PWD
 EPSV
 TYPE I
index 3477d5bb57f882c4a6ca5e1f3df1ade32e503a2e..92f031ded34358e0bab3f0aa1ac5b539351acef8 100644 (file)
@@ -147,6 +147,9 @@ sub subbase64 {
         $$thing =~ s/%%DAYS%%/%alternatives[$d,$d2]/;
     }
 
+    $$thing =~ s/%spc%/ /g;   # space
+    $$thing =~ s/%tab%/\t/g;  # horizontal tab
+
     # include a file
     $$thing =~ s/%include ([^%]*)%[\n\r]+/includefile($1)/ge;
 }