Chinaunix

标题: 帮个忙,关于LWP发送的HTTP请求头中的TE头,能不能显式声明不使用这个特性 [打印本页]

作者: Namelessxp    时间: 2006-11-16 21:58
标题: 帮个忙,关于LWP发送的HTTP请求头中的TE头,能不能显式声明不使用这个特性
能不能禁用掉,它好像在请求头里面加一些服务器可能不认识的东西

ethereal抓包发现,它发送的HTTP头里面有下面这些东西

  1. Connection: close, TE
  2. TE:xxxx
  3. ...
复制代码


GG搜不到足够的信息

只搜到下面这些

  1. LWP::Conn::HTTP beginning to support the TE header.

  2. I believe the 'TE' header is added by LWP (the Perl library that WebInject uses for HTTP transport).

  3. 这个是Net::HTTP模块的,用起来比LWP麻烦多了,实在不想用
  4. $s->send_te
  5.     Get/set the a value indicating if the request will be sent with a "TE" header to indicate the transfer encodings that the server can chose to use. If the Compress::Zlib module is installed then this will annouce that this client accept both the deflate and gzip encodings.
复制代码

作者: Namelessxp    时间: 2006-11-17 12:40
结贴,找到了,呵呵
作者: flw    时间: 2006-11-17 14:17
原帖由 Namelessxp 于 2006-11-17 12:40 发表
结贴,找到了,呵呵

分享一下?
作者: alexru    时间: 2006-11-17 17:41
原帖由 flw 于 2006-11-17 14:17 发表

分享一下?

9494
作者: Namelessxp    时间: 2006-11-17 17:42
换IO::Socket模块用了,对返回数据的要求不高,这个层次的模块足够了

Net::HTTP里面可以设置,new的时候把 'SendTE'=>0 送进去,
者用实例化后的send_te方法设置

LWP实在找不到设置的方法,我能想到的唯一的办法是,注释掉Net/HTTP/Methods.pm里面的相应语句,呵呵,放弃它了




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2