[转] 韩寒 - 我只是在猜想
作者:airwin 发布时间:January 26, 2010 分类:唠叨
ShineWoo...Begin Here...
作者:airwin 发布时间:January 25, 2010 分类:LNMP
SSH隧道软件,配合vps翻墙用,很好使
直接下载链接:
unicode版本
MyEnTunnel v3.4.2 (Non-Unicode)
查看 详情
作者:airwin 发布时间:January 15, 2010 分类:前端
在jQuery的4岁生日之时,jQuery开发团队很高兴地发布最新的jQuery1.4版本!其他的代码演示、测试、文档的更新也会陆续进行更新发 布。对于jQuery发烧友来说,jQuery1.4的发布也是一个大新闻!下面是来自于jQuery的官方网站翻译(英语高手请勿拍砖!): 在jQuery的4岁生日之时,jQuery开发团队很高兴地发布最新的jQuery1.4版本!其他的代码演示、测试、文档的更新也会陆续进行更新发布。
此外,谷歌已经提供了jQuery1.4副本,jquery团队上传到了Google服务器托管服务中。这jQuery1.4的版本是自动minified和gzip 的,地址为:
http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js
作者:airwin 发布时间:January 15, 2010 分类:LNMP
windows平台, nginx + php-fastcgi 模式
PHP Version 5.2.10
cURL Information libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3
测试代码
|
|
这些代码耗时竟然2秒多
同样的操作用socket方式操作则正常,在毫秒级别
调试发现原因在这句
|
|
|
|
看 手册 上的介绍
CURLOPT_POSTFIELDS:
The full data to post in a HTTP "POST" operation. To post a file, prepend a filename with @ and use the full path. This can either be passed as a urlencoded string like 'para1=val1¶2=val2&...' or as an array with the field name as key and field data as value. If value is an array, the Content-Type header will be set to multipart/form-data.
然后我用socket模拟发送multipart/form-data头,但是并无延时现象,看来是php / curl 的问题, 查看php5.2.12的changelog, 并没有类似这个问题的bug.
暂时没有时间去研究源码, 结论就是
作者:airwin 发布时间:January 8, 2010 分类:LNMP
php无论使用curl,还是socket,向本地的虚拟主机某php post数据时,无论php输出什么,这个post的请求总是会以超时结束, 但是经检查该php确实已经收到post过来的数据写入数据库, 这个问题只出现在本地向本地post的情况, 本地向外网域名操作正常,立刻就能返回。不知道这是否是我本地的问题, 还是curl的问题。记录一下