<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>《山寨货也是要更新的》的评论</title>
	<atom:link href="http://www.yulei666.com/2010/08/javatweet-update.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yulei666.com/2010/08/javatweet-update.html</link>
	<description>鱼雷导弹自己的基地</description>
	<lastBuildDate>Tue, 09 Jan 2018 13:23:34 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>作者：Kcry</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-669</link>
		<dc:creator><![CDATA[Kcry]]></dc:creator>
		<pubDate>Thu, 14 Oct 2010 11:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-669</guid>
		<description><![CDATA[C:\Program Files\Java\jdk1.6.0_22
D:\Program Files\Google\appengine-java-sdk-1.3.7

AppCfgWrapper-0.2.2

 上传成功后 两种登录方式都500 错误。。


 怎样解决？



Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.]]></description>
		<content:encoded><![CDATA[<p>C:\Program Files\Java\jdk1.6.0_22<br />
D:\Program Files\Google\appengine-java-sdk-1.3.7</p>
<p>AppCfgWrapper-0.2.2</p>
<p> 上传成功后 两种登录方式都500 错误。。</p>
<p> 怎样解决？</p>
<p>Error: Server Error<br />
The server encountered an error and could not complete your request.<br />
If the problem persists, please report your problem and mention this error message and the query that caused it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：mickey</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-645</link>
		<dc:creator><![CDATA[mickey]]></dc:creator>
		<pubDate>Fri, 03 Sep 2010 01:45:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-645</guid>
		<description><![CDATA[&lt;blockquote cite=&quot;#commentbody-644&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-644&quot; rel=&quot;nofollow&quot;&gt;jiechic &lt;/a&gt; :&lt;/strong&gt;9月1号以后，不支持baseurl的api了，什么时候更新oauth的api？&lt;/blockquote&gt;

用GTAP 4.0 哈]]></description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-644"><p>
<strong><a href="#comment-644" rel="nofollow">jiechic </a> :</strong>9月1号以后，不支持baseurl的api了，什么时候更新oauth的api？</p></blockquote>
<p>用GTAP 4.0 哈</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：jiechic</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-644</link>
		<dc:creator><![CDATA[jiechic]]></dc:creator>
		<pubDate>Wed, 01 Sep 2010 05:45:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-644</guid>
		<description><![CDATA[9月1号以后，不支持baseurl的api了，什么时候更新oauth的api？]]></description>
		<content:encoded><![CDATA[<p>9月1号以后，不支持baseurl的api了，什么时候更新oauth的api？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：YuLei666</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-642</link>
		<dc:creator><![CDATA[YuLei666]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 13:14:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-642</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-639&quot; rel=&quot;nofollow&quot;&gt;@msino  &lt;/a&gt; 
这个。。。multipart/form-data格式上传文件的http报文结构不是这样的。。。。
你可以看看这个 http://hi.baidu.com/pingfanren_lcs/blog/item/558ac4fc8da21c8eb801a00b.html 里面有个post报文格式的例子，你构造一下就行了。而且如果是上传头像的话，参数就那一个文件，没其他的参数了。]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-639" rel="nofollow">@msino  </a><br />
这个。。。multipart/form-data格式上传文件的http报文结构不是这样的。。。。<br />
你可以看看这个 <a href="http://hi.baidu.com/pingfanren_lcs/blog/item/558ac4fc8da21c8eb801a00b.html" rel="nofollow">http://hi.baidu.com/pingfanren_lcs/blog/item/558ac4fc8da21c8eb801a00b.html</a> 里面有个post报文格式的例子，你构造一下就行了。而且如果是上传头像的话，参数就那一个文件，没其他的参数了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：msino</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-641</link>
		<dc:creator><![CDATA[msino]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 12:40:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-641</guid>
		<description><![CDATA[【input type=&quot;file&quot; name=&quot;file&quot; /】]]></description>
		<content:encoded><![CDATA[<p>【input type=&#8221;file&#8221; name=&#8221;file&#8221; /】</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：msino</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-640</link>
		<dc:creator><![CDATA[msino]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 12:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-640</guid>
		<description><![CDATA[sb.append(“file=” + new String(image));
这句有点疑惑，因为上传要求图片的数据保存在name为file传递，类似
]]></description>
		<content:encoded><![CDATA[<p>sb.append(“file=” + new String(image));<br />
这句有点疑惑，因为上传要求图片的数据保存在name为file传递，类似</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：msino</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-639</link>
		<dc:creator><![CDATA[msino]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 11:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-639</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-638&quot; rel=&quot;nofollow&quot;&gt;@YuLei666 &lt;/a&gt; 
后面的构造httppost报文图像发出这个问题困惑好几天了，贴上代码请教
HTTPRequest uploadRequest = new HTTPRequest(&quot;http://localhost/upload&quot;, HTTPMethod.POST);
byte[] image = img.getImageData();
StringBuffer sb = new StringBuffer(1024);
Iterator keys = params.keys();// 请求参数
while (keys.hasNext()) {
	String key = (String) keys.next();
	String value = params.getString(key);
	sb.append(key + &quot;=&quot; + value + &quot;&amp;&quot;);
}
sb.append(&quot;file=&quot; + new String(image));
uploadRequest.addHeader(new HTTPHeader(&quot;Connection&quot;, &quot;Keep-Alive&quot;));
uploadRequest.addHeader(new HTTPHeader(&quot;Content-Length&quot;, String.valueOf(sb.length())));
uploadRequest.setPayload(sb.toString().getBytes());
HTTPResponse response = urlFetch.fetch(uploadRequest);
System.out.println(&quot;code :&quot; + response.getResponseCode());

我按上面的写，最后返回的response code 总是400]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-638" rel="nofollow">@YuLei666 </a><br />
后面的构造httppost报文图像发出这个问题困惑好几天了，贴上代码请教<br />
HTTPRequest uploadRequest = new HTTPRequest(&#8220;http://localhost/upload&#8221;, HTTPMethod.POST);<br />
byte[] image = img.getImageData();<br />
StringBuffer sb = new StringBuffer(1024);<br />
Iterator keys = params.keys();// 请求参数<br />
while (keys.hasNext()) {<br />
	String key = (String) keys.next();<br />
	String value = params.getString(key);<br />
	sb.append(key + &#8220;=&#8221; + value + &#8220;&amp;&#8221;);<br />
}<br />
sb.append(&#8220;file=&#8221; + new String(image));<br />
uploadRequest.addHeader(new HTTPHeader(&#8220;Connection&#8221;, &#8220;Keep-Alive&#8221;));<br />
uploadRequest.addHeader(new HTTPHeader(&#8220;Content-Length&#8221;, String.valueOf(sb.length())));<br />
uploadRequest.setPayload(sb.toString().getBytes());<br />
HTTPResponse response = urlFetch.fetch(uploadRequest);<br />
System.out.println(&#8220;code :&#8221; + response.getResponseCode());</p>
<p>我按上面的写，最后返回的response code 总是400</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：YuLei666</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-638</link>
		<dc:creator><![CDATA[YuLei666]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 10:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-638</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-637&quot; rel=&quot;nofollow&quot;&gt;@msino  &lt;/a&gt; 
那就需要从http报文中解析出文件，这个可以用GAE的Blob接口，然后调用GAE的Image接口进行图像处理，然后构造httppost报文将图像发出。]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-637" rel="nofollow">@msino  </a><br />
那就需要从http报文中解析出文件，这个可以用GAE的Blob接口，然后调用GAE的Image接口进行图像处理，然后构造httppost报文将图像发出。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：msino</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-637</link>
		<dc:creator><![CDATA[msino]]></dc:creator>
		<pubDate>Sun, 29 Aug 2010 06:09:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-637</guid>
		<description><![CDATA[高手，有个疑问请教下：
如果我想对表单提交的图片进行缩放后在上传
byte[] buf = new byte[req.getContentLength()]; 
req.getInputStream().read(buf);
那这种写法就不能满足需求了吧，高手知道怎么处理吗]]></description>
		<content:encoded><![CDATA[<p>高手，有个疑问请教下：<br />
如果我想对表单提交的图片进行缩放后在上传<br />
byte[] buf = new byte[req.getContentLength()];<br />
req.getInputStream().read(buf);<br />
那这种写法就不能满足需求了吧，高手知道怎么处理吗</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：darkkgg</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-636</link>
		<dc:creator><![CDATA[darkkgg]]></dc:creator>
		<pubDate>Fri, 27 Aug 2010 01:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-636</guid>
		<description><![CDATA[可以了 但是不能发推 报401错误...]]></description>
		<content:encoded><![CDATA[<p>可以了 但是不能发推 报401错误&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：darkkgg</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-635</link>
		<dc:creator><![CDATA[darkkgg]]></dc:creator>
		<pubDate>Thu, 26 Aug 2010 09:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-635</guid>
		<description><![CDATA[哥们不行哦 oauth跟oauthproxy都无法登录...]]></description>
		<content:encoded><![CDATA[<p>哥们不行哦 oauth跟oauthproxy都无法登录&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：fieldmouse</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-633</link>
		<dc:creator><![CDATA[fieldmouse]]></dc:creator>
		<pubDate>Mon, 23 Aug 2010 06:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-633</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-630&quot; rel=&quot;nofollow&quot;&gt;@YuLei666  &lt;/a&gt; 
我也不行，两个方法我都试过了]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-630" rel="nofollow">@YuLei666  </a><br />
我也不行，两个方法我都试过了</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：WindyWinter</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-632</link>
		<dc:creator><![CDATA[WindyWinter]]></dc:creator>
		<pubDate>Sun, 22 Aug 2010 15:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-632</guid>
		<description><![CDATA[原来javatweet是你搞得……]]></description>
		<content:encoded><![CDATA[<p>原来javatweet是你搞得……</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：kendisk</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-631</link>
		<dc:creator><![CDATA[kendisk]]></dc:creator>
		<pubDate>Fri, 20 Aug 2010 20:41:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-631</guid>
		<description><![CDATA[準備升級了哈。剛剛發現博客是有IPV6地址的。2607：f2f8 哈/。]]></description>
		<content:encoded><![CDATA[<p>準備升級了哈。剛剛發現博客是有IPV6地址的。2607：f2f8 哈/。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：YuLei666</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-630</link>
		<dc:creator><![CDATA[YuLei666]]></dc:creator>
		<pubDate>Fri, 20 Aug 2010 13:58:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-630</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-629&quot; rel=&quot;nofollow&quot;&gt;@blambin  &lt;/a&gt; 上传后需要等一段时间，GAE切换版本需要时间。而且我自己搭建的时候，没有出现过这个问题啊。可以尝试清空一下cookie，或者访问一下/logout。]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-629" rel="nofollow">@blambin  </a> 上传后需要等一段时间，GAE切换版本需要时间。而且我自己搭建的时候，没有出现过这个问题啊。可以尝试清空一下cookie，或者访问一下/logout。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：blambin</title>
		<link>http://www.yulei666.com/2010/08/javatweet-update.html/comment-page-1#comment-629</link>
		<dc:creator><![CDATA[blambin]]></dc:creator>
		<pubDate>Fri, 20 Aug 2010 13:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.yulei666.com/2010/08/javatweet-update.html#comment-629</guid>
		<description><![CDATA[不知道上传过后还是不是５００服务器错误。。。]]></description>
		<content:encoded><![CDATA[<p>不知道上传过后还是不是５００服务器错误。。。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
