Google's Founder Page 96年在就做爬虫上网求助...

Larry Page提问关于Java Web Robot的HTTP头User-Agent字段设置方法,希望能够在不重写HTTP部分代码的情况下更改User-Agent字符串。

BBS看到的关于Google创始人很早的发帖, 提问...

显然没人天生啥都会, 好好学就行, 学会了就ok了...

不过现在这社会混日子 不懂装懂的人蛮多, 而且此类人还喜欢搞小圈子, 啊哈哈 彼此互相做托

https://groups.google.com/forum/#!topic/comp.lang.java/aSPAJO05LIU

Lawrence Page Show activity Best Reply 1/7/96
Other recipients:
I have a web robot which is a Java app. I need to be able to set the
User-Agent field in the HTTP header in order to be a good net citizen (so
people know who is accessing their server). Anyone have any ideas?

Right now, Java sends a request that includes something like:

User-Agent: Java/1.0beta2

I'd rather not rewrite all the HTTP stuff myself. I tried just searching
in the JDK for the Java/1.0beta2 figuring I could just change the string,
but I couldn't find it. Perhaps it is stored as a unicode string?

An easy method of setting the User-Agent field should probably be added to
Java, so people can properly identify their programs.

Thanks, Larry Page

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值