一、相关信息html
1)嵌入式开发时用到了 boa 服务器,主要是对cgi 部分的需求。浏览器
2)boa 服务器已经架设好,主目录为 /var/www,cgi目录为 /var/www/cgi-bin/服务器
3)boa 服务已经开启post
二、问题描述spa
1)将 test.html 放在 /var/www 下,代码内容以下:code
<html> <body> <form action="/cgi-bin/test.cgi" method=post> <input type=submit value="call"> </form> </body> </html>
2)经过浏览器调用该网页orm
浏览器中输入: localhost/test.htmlhtm
点 call 后,出现以下提示:blog
400 Bad Request Your client has issued a malformed or illegal request.
三、问题解决开发
1)将test.html 中的 method=post 部分改成get 后问题解决。
<form action="/cgi-bin/test.cgi" method=get>
2)boa 自己是支持 post方式的,经过查看 error.log,提示 错误的数据长度,0。
是否填充一些数据再使用 post 方式就能够了,目前未作考证。