, 정말 같은 POST 요청을 사용했습니다 :C# HttpWebReqest - POST 내용을 이스케이프 처리합니까?
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://" + this.server + "/log.php");
wr.Method = "POST";
wr.ContentType = "application/x-www-form-urlencoded";
string paramString = "v=" + this.version + "&m=" + this.message;
wr.ContentLength = paramString.Length;
StreamWriter stOut = new StreamWriter(wr.GetRequestStream(), System.Text.Encoding.ASCII);
stOut.Write(paramString);
stOut.Close();
내 문제가 어디에 this.message
것 지금은 상황에있어 것입니다 "&"및 "="을 포함하여 개행, 탭 및 특수 문자를 포함 할 가능성이 큽니다. 이 콘텐츠를 벗어나야합니까? 그렇다면 어떻게?
을 사용합니다. UrlEncode는 내가 필요한 것 : http://msdn.microsoft.com/en-us/library/4fkewx0t.aspx 감사. –
Crud. 이것은 작동하지 않습니다. .Net 2.0 방법이 필요합니다. –
1.0 이후되었습니다. –