[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Perl: setting content-type in continuation
- From: "Leonard den Ottolander" <leonardjo hetnet nl>
- To: redhat-list redhat com
- Subject: Perl: setting content-type in continuation
- Date: Thu, 30 Aug 2001 18:00:35 +0200
Hi all,
I am working on a meta search engine for books. I do have a small problem
with one of the search sites I am querying. It seems the search script on this
site is testing the http headers. With LWP:UserAgent I can create http
requests, but the content-type is being set in the first packet instead of in
the continuation. Here are extracts of four dumped packets to illustrate this.
The browser (Netscape 4.76) generates the following header (only partially
included):
request:
Connection: Keep-Alive\r\n
User-Agent: Mozilla/4.76 [en] (Win98; U)\r\n
Host: www.biblioroom.com\r\n
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/*\r\n
Accept-Encoding: gzip\r\n
Accept-Language: en\r\n
Accept-Charset: iso-8859-1,*,utf-8\r\n
continuation:
Hypertext Transfer Protocol
Content-type: application/x-www-form-urlencoded\r\n
Content-length: 153\r\n
\r\n
Data (153 bytes)
0 5744 5f42 5554 544f 4e5f 434c 4943 4b5f WD_BUTTON_CLICK_
But perl creates the following:
request:
User-Agent: Mozilla/4.76 [en] (Win98; U)\r\n # I faked the user agent
Content-Length: 153\r\n
Content-Type: application/x-www-form-urlencoded\r\n
\r\n
continuation:
Hypertext Transfer Protocol
Data (153 bytes)
0 5744 5f42 5554 544f 4e5f 434c 4943 4b5f WD_BUTTON_CLICK_
Is there a way to make perl set the content-type and -length in the
continuation packet instead of in the initial packet?
Thanks,
Bye,
Leonard.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]