此問題遵循an earlier one。用意外的URL編碼解析POST請求
下面是一些代碼能重現問題:
POST:
str = "accountRequest=<NewUser>" & vbLf & _
"Hello" & vbTab & "World" & vbLf & _
"</NewUser>"
Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
objHTTP.open "POST", "service.asp", False
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.send str
response.Write(objHTTP.responseText)
Set objHTTP = Nothing
service.asp:
function w (str)
response.Write(str & "<br>")
end function
str = request.Form("accountRequest")
w(str)
w("Tabs: "& InStr(str,vbTab))
w("Lines: "& InStr(str,vbLf))
輸出:
HelloWorld
Tabs: 0
Lines: 0
任何人都可以請幫助?
您是否從Windows機器發佈到Linux機器? – 2012-02-23 06:38:30
它似乎是一臺Linux機器的Windows機器 – greener 2012-02-23 08:33:58