W3C home > Mailing lists > Public > www-validator@w3.org > December 2010

Re: Correct value of parameter uploaded_file

From: Ville Skyttä <ville.skytta@iki.fi>
Date: Mon, 6 Dec 2010 11:14:20 +0200
To: www-validator@w3.org
Message-Id: <201012061114.20549.ville.skytta@iki.fi>
On Monday 06 December 2010, Mehmet Erdal ÖZKINACI wrote:
> I get html result whether I add output=soap12 or not.

Not sure if this helps, but:

> My function is
> 
>         private void ValidateFile(string urlOfTool, string fileToValidate)
>         {
>             string boundary = "----------------------------" + DateTime.Now.Ticks.ToString("x");
> 
>             string data = "--" + boundary + "\r\n";
>             //data += "Content-Disposition: form-data; name=\"output\"\r\n";

I think you need to add another \r\n here.

>             //data += "soap12" + "\r\n";
>             //data += "--" + boundary + "\r\n";
>             data += "Content-Disposition: form-data; name=\"uploaded_file\"; filename=\"" + fileToValidate + "\"\r\n";
>             data += "Content-Type: text/html\r\n";

And here.

>             byte[] dataByte = System.Text.Encoding.UTF8.GetBytes(data);
[...]
Received on Monday, 6 December 2010 09:14:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:45 GMT