Annotation of parser3/tests/223-curl.html, revision 1.1

1.1     ! moko        1: @main[]
        !             2: $hHeader[
        !             3:        $.[my-name][^taint[as-is][ЗнА^#0A^#0AчЕ&н"И:е%]]
        !             4:        $.[^#0A^taint[as-is][^#0Aфыв]][зна^#0Aчение]
        !             5: ]
        !             6: 
        !             7: $hForm[$hHeader]
        !             8: 
        !             9: ^do[POST in ^$response:charset (UTF-8) w/o file;;$hForm]
        !            10: 
        !            11: ^do[POST in UTF-8 w/o file with own User-Agent and ommiting charset declaration;UTF-8;$hForm;Мой-^taint[as-is][Странный]-User-Agent](true)
        !            12: 
        !            13: ^do[POST in WINDOWS-1251 w/o file;WINDOWS-1251;$hForm]
        !            14: 
        !            15: ^do[POST in ^$response:charset (UTF-8) with file in UTF-8;;
        !            16:        ^hash::create[$hForm]
        !            17:        $.file[^file::load[binary;223_utf8.txt]]
        !            18: ]
        !            19: 
        !            20: ^do[POST in WINDOWS-1251 with file in UTF-8;WINDOWS-1251;
        !            21:        ^hash::create[$hForm]
        !            22:        $.file[^file::load[binary;223_utf8.txt;фай^#0Aл.html]]
        !            23: ]
        !            24: 
        !            25: ^do[POST in WINDOWS-1251 with file in WINDOWS-1251;WINDOWS-1251;
        !            26:        ^hash::create[$hForm]
        !            27:        $.file[^file::load[binary;223_win1251.txt]]
        !            28: ]
        !            29: 
        !            30: ^do[Binary file post;WINDOWS-1251;
        !            31:        $file[^file::load[binary;103mark.gif]]
        !            32:        $.file[$file] $.file_1[$file] $.file_2[$file] $.file_3[$file] $.file_4[$file]
        !            33: ]
        !            34: 
        !            35: @do[sTitle;sCharset;hForm;sUserAgent;bOmmitPostCharset][f;text;t;post]
        !            36: <h2>$sTitle</h2>
        !            37: $f[^curl:load[
        !            38:        $.url[http://www.parser.ru/_/tests/223.pl]
        !            39:        $.timeout(5)
        !            40: 
        !            41:        $.httppost[$hForm]
        !            42:        $.httpheader[
        !            43:                ^hash::create[$hHeader]
        !            44:                ^if(def $sUserAgent){
        !            45:                        $.user-agent[$sUserAgent]
        !            46:                }
        !            47:        ]
        !            48: 
        !            49:        ^if(def $sCharset){
        !            50:                $.charset[$sCharset]
        !            51:        }
        !            52: ]]
        !            53: 
        !            54: #<pre>$f.text</pre>
        !            55: 
        !            56: $text[^taint[as-is][$f.text]]
        !            57: # replace boundary by fixed string
        !            58: $text[^text.match[(-{10,12})-*[0-9a-fA-F]+(--)?][g]{${match.1}boundary-value$match.2}]
        !            59: # cut off the post's body is any
        !            60: $text[^text.match[POST:(.*)<EOF>][]{$post[$match.1]}]
        !            61: 
        !            62: # create table with http headers
        !            63: $t[^table::create[nameless]{^taint[as-is][^text.replace[^table::create{a       b
        !            64:  =     ^taint[^#09]
        !            65: ^taint[^#0A]   ^taint[^#0A]}]]}]
        !            66: #$t[^t.select(!$h.[$t.0])]
        !            67: ^t.sort{$t.0}
        !            68: 
        !            69: # print all
        !            70: <h3>Headers</h3>
        !            71: <pre>^t.menu{$t.0      : $t.1}[^#0A]</pre>
        !            72: 
        !            73: <h3>Body</h3>
        !            74: <pre>^taint[as-is][$post]</pre>
        !            75: <hr />

E-mail: