作者ffrr (冰色太阳)
看板java
标题Re: [问题] 请问怎麽写出最精简的file upload?
时间Sun Nov 30 03:49:35 2008
不好意思 我问的没有很清楚
我是想实作一个CLASS 可以发送 像下面的资讯给HTTP的网路空间
例子
http://tinyurl.com/637k9q
POST register.jsp HTTP/1.1
Host: hi/iq
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2)
Gecko/20021126
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en-us, en;q=0.50
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
Content-Type: multipart/form-data;
boundary=---------------------------29772313742745
Content-Length: 452
-----------------------------29772313742745
Content-Disposition: form-data; name="name"
J.Doe
-----------------------------29772313742745
Content-Disposition: form-data; name="email"
[email protected]
-----------------------------29772313742745
Content-Disposition: form-data; name="file-upload"; filename="test.txt"
Content-Type: text/plain
test data with some high ascii: ¿Como estás?
-----------------------------29772313742745--
--
I've become so numb I can't feel you there
I've become so tired so much more aware Linkin Park - Numb
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.123.133.53
1F:推 sukulu:看来我似乎误会你的意思了@@ 11/30 04:05
2F:推 pply:就用socket传一段HTTP上传档案格式的资料到server就行了 11/30 04:45
3F:→ ffrr:请问2楼有范例可以参考吗? 11/30 10:57