最近在把一套网页操作的接口从原来Android5.0上移植到Android7.0上. 客户端连接验证的时候主页显示异常 502 Bad Gateway The CGI was not CGI/1.1 compliant 从板子的串口上看到log显示为 [02/Jan/1970:17:13:49 +0000] cgi_header: unable to find LFLF 这部分log为boa里面打印出来的,跟踪源码在cgi_header.c关键函数如下 45 /* TODO: 46 We sti…
最近接触Laravel框架ajax跨域请求的过程中遇到一些问题,在这里做下总结. 一开始发起ajax请求一直报500错误,搜索相关资料后发现Laravel要允许跨域请求可以加入Cors中间件,代码如下: <?php namespace App\Http\Middleware; use Closure; use Response; class Cors { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $…
ajax跨域请求,目前已用几种方法实现: 1)用原生js的xhr对象实现. var url="http://freegeoip.net/json/"; //创建xhr对象 function createCORSXhr(url,method){ var xhr=new XMLHttpRequest(); …