﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-我心飞扬-文章分类-Fun</title><link>http://www.cnitblog.com/thinke365/category/8455.html</link><description /><language>zh-cn</language><lastBuildDate>Sun, 02 Oct 2011 04:47:43 GMT</lastBuildDate><pubDate>Sun, 02 Oct 2011 04:47:43 GMT</pubDate><ttl>60</ttl><item><title>Http模拟登陆</title><link>http://www.cnitblog.com/thinke365/articles/61761.html</link><dc:creator>Monicax</dc:creator><author>Monicax</author><pubDate>Sun, 11 Oct 2009 03:51:00 GMT</pubDate><guid>http://www.cnitblog.com/thinke365/articles/61761.html</guid><wfw:comment>http://www.cnitblog.com/thinke365/comments/61761.html</wfw:comment><comments>http://www.cnitblog.com/thinke365/articles/61761.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/thinke365/comments/commentRss/61761.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/thinke365/services/trackbacks/61761.html</trackback:ping><description><![CDATA[1、之前的模拟登陆问题很快都搞定了，这次的模拟登陆却是大费周折。通过Firebug没有看到传入的参数，很是奇怪。Post参数是空的，后面有一个奇异的302 Found。 <span style="COLOR: red">HTTP 302</span>表示的是跳转。对比后，知道检测是否登入成功，看得是 Request Response 里的 Location就行了。<br>用Python搞了很久，不行。<br>用Loadrunner，通过里面一个 header data字节数可以判断是否登入成功。但是使用web_submit_data，并没有接口获得这些数据。<br>(可以用C编程，变量定义在Action第一行。。。)<br>最后用Java搞定，使用了 httpclient包，是commons提供的。<br><br>
<img src ="http://www.cnitblog.com/thinke365/aggbug/61761.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/thinke365/" target="_blank">Monicax</a> 2009-10-11 11:51 <a href="http://www.cnitblog.com/thinke365/articles/61761.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>