Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1419042
  • 博文数量: 129
  • 博客积分: 1449
  • 博客等级: 上尉
  • 技术积分: 3048
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-24 18:36
文章分类

全部博文(129)

文章存档

2015年(3)

2014年(20)

2013年(65)

2012年(41)

分类: LINUX

2012-12-13 09:15:17

/etc/init.d/uhttpd stop
opkg install /xutest/uhttpd_31_ar71xx.ipk
opkg install /xutest/uhttpd_xu1_ar71xx.ipk
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start

【Receive from 192.168.1.1 : 47881】:
uhttpd mainloop-->

#192.168.1.1/xutest/web-cgi.html
【Receive from 192.168.1.1 : 58907】:
uh_http_header_parse-->buffer = GET /xutest/web-cgi.html HTTP/1.1
Host: 192.168.1.1
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive

, buflen = 318

【Receive from 192.168.1.1 : 60250】:
uh_http_header_parse: OK, method = 0, url = /xutest/web-cgi.html

【Receive from 192.168.1.1 : 49669】:
uh_dispatch_request--> req: 0, headers = , url = /xutest/web-cgi.html, pin:phys = /www/xutest/web-cgi.html, name = /xutest/web-cgi.html, 

【Receive from 192.168.1.1 : 59322】:
uh_file_request: name = /www/xutest/web-cgi.html, len = 4096, buf =

【Receive from 192.168.1.1 : 50858】:
uh_file_request: name = /www/xutest/web-cgi.html, len = 8, buf = 
head>

uh_http_header_parse-->buffer = GET /Route?NET=0&SSID=linux&KEY=&WIP1=192&WIP2=168&WIP3=144&WIP4=010&MASK1=255&MASK2=255&MASK3=255&MASK4=000&GW1=192&GW2=168&GW3=001&GW4=001&DNS1=202&DNS2=114&DNS3=134&DNS4=133&WMAC0=00&WMAC1=DF&WMAC2=24&WMAC3=6C&WMAC4=74&WMAC5=96&OK=%B1%A3%B4%E6 HTTP/1.1
Host: 192.168.1.1
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer:

, buflen = 565

uh_http_header_parse-->headers = , url = /Route?NET=0&SSID=linux&KEY=&WIP1=192&WIP2=168&WIP3=144&WIP4=010&MASK1=255&MASK2=255&MASK3=255&MASK4=000&GW1=192&GW2=168&GW3=001&GW4=001&DNS1=202&DNS2=114&DNS3=134&DNS4=133&WMAC0=00&WMAC1=DF&WMAC2=24&WMAC3=6C&WMAC4=74&WMAC5=96&OK=%B1%A3%B4%E6
-------------------------------------------------------------------------------

#
【Receive from 192.168.1.1 : 35491】:
uh_http_header_parse-->buffer = GET /cgi-bin/luci HTTP/1.1
Host: 192.168.1.1
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive

, buflen = 311

【Receive from 192.168.1.1 : 38159】:
uh_http_header_parse: OK, method = 0, url = /cgi-bin/luci

【Receive from 192.168.1.1 : 33252】:
uh_dispatch_request--> req: 0, headers = , url = /cgi-bin/luci, pin:phys = /www/cgi-bin/luci, name = /cgi-bin/luci, 

???? 错误, 无后续的相关文件调用, uhttpd.c 中 屏蔽此下面2行即OK.
//strncpy(pcStr, buffer, 18);
//DEBUGP("uh_http_header_parse-->buffer = %s, buflen = %d\n", pcStr, buflen);

--------------------------------------------------------------------------------------------------------
-- 增加tab, 必须定义 target 才显示出, 加在 page.order  = 60后面的处理之后(最后1行的page.leaf = true)
page = node("admin", "network", "xutest")
page.target = template("xutest/web-cgi")
page.title  = _("xutest-lua")
page.order  = 70

【Receive from 192.168.1.1 : 35880】:
uh_http_header_parse: OK, method = 0, url = /cgi-bin/luci/;stok=156ddbb482f4106b9efb6f2d15d72601/admin/network/xutest/
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 36028】:
uh_dispatch_request--> req: 0, headers = , url = /cgi-bin/luci/;stok=156ddbb482f4106b9efb6f2d15d72601/admin/network/xutest/, status = 200, pin:phys = /www/cgi-bin/luci, name = /cgi-bin/luci
 File:uhttpd.c, Line:444

【Receive from 192.168.1.1 : 40229】:
uh_http_header_parse: OK, method = 0, url = /favicon.ico
 File:uhttpd.c, Line:354


--- 192.168.1.1, 调用 xhr.js, cbi.js. 自启动: /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -
uh_http_header_parse: OK, method = 0, url = /
uh_dispatch_request--> req: 0, headers = , url = /, pin:phys = /www/index.html, name = /index.html,
uh_http_header_parse: OK, method = 0, url = /cgi-bin/luci
uh_dispatch_request--> req: 0, headers = , url = /cgi-bin/luci, pin:phys = /www/cgi-bin/luci, name = /cgi-bin/luci,

uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = @charset "utf-8";
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = -color: #444444;
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = ton-up {background
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 3585, buf = ing: 3px;}.cbi-va
uh_file_request: name = /www/luci-static/openwrt.org/ie7.css, len = 823, buf = #tabmenu { line-hei
uh_file_request: name = /www/luci-static/resources/xhr.js, len = 4096, buf = /* * xhr.js - XMLHt
uh_file_request: name = /www/luci-static/resources/xhr.js, len = 516, buf = if (XHR._r && !XHR._
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = @charset "utf-8";@
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = -color: #444444;}
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = ton-up {background
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 3585, buf = ing: 3px;}.cbi-va
uh_file_request: name = /www/luci-static/openwrt.org/ie7.css, len = 823, buf = #tabmenu { line-hei
uh_file_request: name = /www/luci-static/resources/xhr.js, len = 4096, buf = /* * xhr.js - XMLHt
uh_file_request: name = /www/luci-static/resources/xhr.js, len = 516, buf = if (XHR._r && !XHR._
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = /* LuCI - Lua Confi
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = his);if (!isNaN(m
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf =  {obj.parentNode.
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = ynlist_keypress);
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = cbi_t[sid][tid].t
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = e.rows.length - 1;
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 1182, buf = ; case 'q':
uh_file_request: name = /www/luci-static/resources/icons/ethernet.png, len = 814, buf = 塒NG
uh_file_request: name = /www/luci-static/resources/icons/ethernet.png, len = 814, buf = 塒NG
uh_file_request: name = /www/luci-static/resources/icons/ethernet.png, len = 814, buf = 塒NG

/;stok=100a519678700c2f55a61bbe5bd2403c/admin/network/wireless/
uh_file_request: name = /www/luci-static/resources/icons/loading.gif, len = 1787, buf = GIF89a
uh_file_request: name = /www/luci-static/resources/icons/wifi_big_disabled.png, len = 2853, buf = 塒NG
uh_file_request: name = /www/luci-static/resources/icons/wifi_big.png, len = 2865, buf = 塒NG

-------------------------------------------------------------------
#F5, 刷新页面, 原官方页面, 重新调用luci的 配套文件. 

【Receive from 192.168.1.1 : 39536】:
uh_http_header_parse: OK, method = 0, url = /cgi-bin/luci/;stok=156ddbb482f4106b9efb6f2d15d72601/admin/network/diagnostics/
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 58384】:
uh_dispatch_request--> req: 0, headers = , url = /cgi-bin/luci/;stok=156ddbb482f4106b9efb6f2d15d72601/admin/network/diagnostics/, status = 200, pin:phys = /www/cgi-bin/luci, name = /cgi-bin/luci
 File:uhttpd.c, Line:444

【Receive from 192.168.1.1 : 37024】:
uh_http_header_parse: OK, method = 0, url = /luci-static/openwrt.org/cascade.css
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 43886】:
uh_dispatch_request--> req: 0, headers = , url = /luci-static/openwrt.org/cascade.css, status = 200, pin:phys = /www/luci-static/openwrt.org/cascade.css, name = /luci-static/openwrt.org/cascade.css
 File:uhttpd.c, Line:444

【Receive from 192.168.1.1 : 45553】:
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = @charset "utf-8";

@
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 57961】:
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = -color: #444444;
}


 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 42988】:
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 4096, buf = ton-up {
background
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 33424】:
uh_file_request: name = /www/luci-static/openwrt.org/cascade.css, len = 3585, buf = ing: 3px;
}

.cbi-va
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 40942】:
uh_http_header_parse: OK, method = 0, url = /luci-static/openwrt.org/ie7.css
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 43598】:
uh_dispatch_request--> req: 0, headers = , url = /luci-static/openwrt.org/ie7.css, status = 200, pin:phys = /www/luci-static/openwrt.org/ie7.css, name = /luci-static/openwrt.org/ie7.css
 File:uhttpd.c, Line:444

【Receive from 192.168.1.1 : 34392】:
uh_file_request: name = /www/luci-static/openwrt.org/ie7.css, len = 823, buf = #tabmenu {
line-hei
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 47485】:
uh_http_header_parse: OK, method = 0, url = /luci-static/resources/xhr.js
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 54478】:
uh_dispatch_request--> req: 0, headers = , url = /luci-static/resources/xhr.js, status = 200, pin:phys = /www/luci-static/resources/xhr.js, name = /luci-static/resources/xhr.js
 File:uhttpd.c, Line:444

【Receive from 192.168.1.1 : 35701】:
uh_file_request: name = /www/luci-static/resources/xhr.js, len = 4096, buf = /*
 * xhr.js - XMLHt
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 55022】:
uh_file_request: name = /www/luci-static/resources/xhr.js, len = 516, buf = if (XHR._r && !XHR._
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 37017】:
uh_http_header_parse: OK, method = 0, url = /luci-static/resources/cbi.js
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 47509】:
uh_dispatch_request--> req: 0, headers = , url = /luci-static/resources/cbi.js, status = 200, pin:phys = /www/luci-static/resources/cbi.js, name = /luci-static/resources/cbi.js
 File:uhttpd.c, Line:444

【Receive from 192.168.1.1 : 36779】:
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = /*
LuCI - Lua Confi
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 46371】:
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = his);
if (!isNaN(m
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 58557】:
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf =  {
obj.parentNode.
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 37223】:
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = ynlist_keypress);

 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 35090】:
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = cbi_t[sid][tid].t
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 40005】:
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 4096, buf = e.rows.length - 1;


 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 51242】:
uh_file_request: name = /www/luci-static/resources/cbi.js, len = 1182, buf = ;

case 'q':
 File:uhttpd-file.c, Line:377

【Receive from 192.168.1.1 : 41861】:
uh_http_header_parse: OK, method = 0, url = /luci-static/openwrt.org/tabbg.png
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 53821】:
uh_dispatch_request--> req: 0, headers = , url = /luci-static/openwrt.org/tabbg.png, status = 200, pin:phys = /www/luci-static/openwrt.org/tabbg.png, name = /luci-static/openwrt.org/tabbg.png
 File:uhttpd.c, Line:444

【Receive from 192.168.1.1 : 55157】:
uh_http_header_parse: OK, method = 0, url = /luci-static/resources/cbi/apply.gif
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 40661】:
uh_dispatch_request--> req: 0, headers = , url = /luci-static/resources/cbi/apply.gif, status = 200, pin:phys = /www/luci-static/resources/cbi/apply.gif, name = /luci-static/resources/cbi/apply.gif
 File:uhttpd.c, Line:444

#刷新页面,  luci跳转出来的自己的 /xutest/web-cgi.htm, 未安装luci中文包, 因此不能显示中文
#但从IE中 192.168.1.1/xutest/web-cgi.html, 可显中文, 此未经过luci而直接和HTTP服务器通讯 
uh_http_header_parse: OK, method = 0, url = /cgi-bin/luci/;stok=08a70be0172cda82f916785dc98da4d8/admin/network/xutest/
 File:uhttpd.c, Line:354

【Receive from 192.168.1.1 : 60846】:
uh_dispatch_request--> req: 0, headers = , url = /cgi-bin/luci/;stok=08a70be0172cda82f916785dc98da4d8/admin/network/xutest/, status = 200, pin:phys = /www/cgi-bin/luci, name = /cgi-bin/luci
 File:uhttpd.c, Line:444

--------- 192.168.1.1/xutest/web-cgi.html
【Receive from 192.168.1.1 : 48209】:
uh_http_header_parse: OK, method = 0, url = /xutest/config.cgi?NET=0&SSID=linux&KEY=&WIP1=192&WIP2=168&WIP3=144&WIP4=010&MASK1=255&MASK2=255&MASK3=255&MASK4=000&GW1=192&GW2=168&GW3=001&GW4=001&DNS1=202&DNS2=114&DNS3=134&DNS4=133&WMAC0=00&WMAC1=DF&WMAC2=24&WMAC3=6C&WMAC4=74&WMAC5=96&OK=%B1%A3%B4%E6, version = HTTP/1.1
 File:uhttpd.c, Line:351

【Receive from 192.168.1.1 : 59176】:
uh_path_lookup: docroot = /www, url = /xutest/config.cgi?NET=0&SSID=linux&KEY=&WIP1=192&WIP2=168&WIP3=144&WIP4=010&MASK1=255&MASK2=255&MASK3=255&MASK4=000&GW1=192&GW2=168&GW3=001&GW4=001&DNS1=202&DNS2=114&DNS3=134&DNS4=133&WMAC0=00&WMAC1=DF&WMAC2=24&WMAC3=6C&WMAC4=74&WMAC5=96&OK=%B1%A3%B4%E6
 File:uhttpd-utils.c, Line:521

【Receive from 192.168.1.1 : 42217】:
Have CGI: pathptr = ?NET=0&SSID=linux&KEY=&WIP1=192&WIP2=168&WIP3=144&WIP4=010&MASK1=255&MASK2=255&MASK3=255&MASK4=000&GW1=192&GW2=168&GW3=001&GW4=001&DNS1=202&DNS2=114&DNS3=134&DNS4=133&WMAC0=00&WMAC1=DF&WMAC2=24&WMAC3=6C&WMAC4=74&WMAC5=96&OK=%B1%A3%B4%E6, p.query = NET=0&SSID=linux&KEY=&WIP1=192&WIP2=168&WIP3=144&WIP4=010&MASK1=255&MASK2=255&MASK3=255&MASK4=000&GW1=192&GW2=168&GW3=001&GW4=001&DNS1=202&DNS2=114&DNS3=134&DNS4=133&WMAC0=00&WMAC1=DF&WMAC2=24&WMAC3=6C&WMAC4=74&WMAC5=96&OK=%B1%A3%B4%E6
 File:uhttpd-utils.c, Line:526


阅读(2990) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~