boa 用shell脚本编写cgi 访问时终端出现cgi_header: unable to find LFLF
来源:互联网 发布:网络协议测试 编辑:程序博客网 时间:2024/05/12 11:30
我的开发板是EPC287
我用shell脚本编写的cgi 运行后
浏览器显示的错误是
502 Bad GatewayThe CGI was not CGI/1.1 compliant。
终端显示的是
cgi_header: unable to find LFLF
但是用c语言编写的cgi却可以
找个一天终于找到了原因
还是shell的格式错了
附上调试成功的源码
#!/bin/bashPATH=/bin:/sbin:/usr/bin:/usr/sbinecho -e "Content-type: text/html \n\n"echo "<html>"echo "<head>"echo "<title>重启系统</title>"echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"echo "</head>"echo "<body>"echo "<center>"echo "<h3>重启系统</h3>"echo "</center>"echo "<hr>" echo "<center>" echo "<br><br>" echo "<form action=\"/cgi-bin/doreboot.cgi\" method=POST>" echo "<table>" echo "<tr>" echo "<td><input type=\"hidden\" name=\"time\" value=\"1\" ></td>" echo "<td><input type=\"submit\" value="立即重启" ></td>" echo "</tr>" echo "</table>" echo "</form>" echo "</center>"echo "</body>"echo "</html>"都是因为
echo -e "Content-type: text/html \n\n"少了一个 -e
0 0
- boa 用shell脚本编写cgi 访问时终端出现cgi_header: unable to find LFLF
- boa 服务器:cgi_header: unable to find LFLF
- cgi_header: unable to find LFLF
- cgi_header: unable to find LFLF
- boa 服务器 错误 cgi_header: unable to find LFLF错误的一种可能
- boa 服务器 错误 cgi_header: unable to find LFLF错误的一种可能
- 使用shell脚本编写cgi
- shell编写简单的CGI脚本
- 安装lxml时出现 Unable to find vcvarsall.bat
- Python3.4 用 pip 安装lxml时出现 “Unable to find vcvarsall.bat ”
- Python用pip安装lxml时出现 “Unable to find vcvarsall.bat ”?
- Python3.X 用 pip 安装lxml时出现 “Unable to find vcvarsall.bat ”
- python 编写 cgi 脚本
- shell写cgi脚本
- pwntools 解决安装terminator后 unable to find a shell
- 编写Korn Shell脚本在终端上打印输出图案
- JSP页面运行时出现 Unable to find a javac compiler 原因和解决方法
- spring3+struts2+JPA配置时出现 Unable to find file 警告,求解答。
- mysql sql长度限制解决
- 级联训练器训练生成.xml文件后,检测
- 自学-Shiro的权限管理-12
- 反射机制
- 上学期学长期末题目
- boa 用shell脚本编写cgi 访问时终端出现cgi_header: unable to find LFLF
- Android 运行时权限 Runtime Permissions
- 出现PNG文件错误的解决方案AAPT err(Facade for 1773557322): libpng error: Not a PNG file
- 日志输出框架Log4j使用
- js小记
- android Constant
- [Java并发包学习八]深度剖析ConcurrentHashMap
- Mybatis学习之路--类别名&数据源&事务管理器&映射器
- header()还有setCookie()前面有空格或者输出时,php会出现警告