File:  [parser3project] / parser3 / tests / 195.html
Revision 1.3: download - revision graph
Sun May 26 18:37:22 2024 UTC (2 years, 1 month ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, HEAD
tests updated as single quote now escaped with ' in HTML tainting mode (related to feature #1241)

@main[]
$response:charset[UTF-8]
$request:charset[UTF-8]
$response:content-type[
	$.value[text/html]
	$.charset[$response:charset]
]

$fWIN-1251[^file::load[binary;195_windows1251.txt]]
$fUTF-8[^file::load[binary;195_utf8.txt]]

^do[Load remote file in WIN-1251 with uploading file in UTF-8;post;multipart/form-data;
	$.charset[windows-1251]
	$.title[Проверка]
	$.file[$fUTF-8]
]

^do[Load remote file in UTF-8 with uploading file in WIN-1251;POST;multipart/form-data;
	$.charset[UTF-8]
	$.title[Проверка]
	$.file[$fWIN-1251]
]

^do[Load remote file with uploading file, correct enctype and method GET;get;multipart/form-data;
	$.charset[UTF-8]
	$.title[Проверка]
	$.file[$fWIN-1251]
]

^do[Load remote file with uploading file and method GET;get;;
	$.charset[UTF-8]
	$.title[Проверка]
	$.file[$fWIN-1251]
]

^do[Load remote file with uploading file without enctype;POST;;
	$.charset[UTF-8]
	$.title[Проверка]
	$.file[$fWIN-1251]
]

^do[Load remote file with uploading file and inappropriate enctype;POST;application/x-www-form-urlencoded;
	$.charset[UTF-8]
	$.title[Проверка]
	$.file[$fWIN-1251]
]

^do[Load remote file with uploading file and invalid enctype;POST;invalid-enctype;
	$.charset[UTF-8]
	$.title[Проверка]
	$.file[$fWIN-1251]
]




@do[sTitle;sMethod;sEnctype;hData][sTarget;f]
$sTarget[http://www.parser.ru/_/tests/195.html]
<hr />
<h2>$sTitle</h2>
<p>^try-catch-comment{
	$f[^file::load[text;$sTarget;
		$.timeout(10)
		$.charset[$hData.charset]
		$.form[$hData]
		^if(def $sMethod){
			$.method[$sMethod]
		}
		^if(def $sEnctype){
			$.enctype[$sEnctype]
		}
	]]
	^taint[as-is;$f.text]
}</p>

E-mail: