🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1501

Re: Tidhttp & HTTP Headers

#1501
From: Cheater
Date: Wed, 10 Jan 2007 04:46
59 lines
2460 bytes
Remy Lebeau (TeamB) �����:
> <zetsoft@mail.ru> wrote in message
> news:op.tlqplrqfc1j1tk@cheater.arc-net.ru...
> 
>> On the server which I work with were the Headers were completely
>> taking off.
> 
> What are you referring to exactly?  Please be more specific.
> 
>> Now my program gives a lot of errors now and doesn`t work.
> 
> Please provide more details.  What does your code actually look like?
> What error are you seeing?  Where is it occuring exactly?
> 
> 
> Gambit
> 
> 
Code:
	TIdHTTP*html= new TIdHTTP(NULL);
	TStringList*out= new TStringList;
	TStream *cstr=new  TMemoryStream() ;

	html->Request->Accept = "text/html, */*" ;
	html->Request->UserAgent="Opera/8.50 (Windows NT 5.1; U; ru)";
	html->Request->BasicAuthentication =1;
	html->AuthRetries=1;
	html->ConnectTimeout =FConnectTimeOut;
	html->ReadTimeout 	 =FReadTimeOut;
	
	if(UseProxy)
	{
			html->ProxyParams-> ProxyPassword 	= svProxy.Pass;
			html->ProxyParams-> ProxyPort       = svProxy.Port;
			html->ProxyParams-> ProxyServer		= svProxy.Server;
			html->ProxyParams-> ProxyUsername   = svProxy.UserName;
			if(svProxy.UserName!="")
				html->ProxyParams->BasicAuthentication =1;
	}
		html->Post(Url,Data,cstr);
		if(cstr->Size)
		{
			cstr->Seek(0,soFromBeginning);
			out->LoadFromStream(cstr);

	
		}



		delete html;
		delete cstr;

The error always return a first string of html-page, look like 
"<body>bla-bla<html>..."
-- 

Regards.
  - Cheater
Technical Details
Message-ID: <45a46f39@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <op.tlqplrqfc1j1tk@cheater.arc-net.ru> <45a3e89e$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,51b589af2018b4df
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII
Date: Wed, 10 Jan 2007 16:46:26 +1200
From: Cheater <zetsoft@mail.ru>
Reply-To:  zetsoft@mail.ru
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: Tidhttp & HTTP Headers
References: <op.tlqplrqfc1j1tk@cheater.arc-net.ru> <45a3e89e$1@newsgroups.borland.com>
In-Reply-To: <45a3e89e$1@newsgroups.borland.com>
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 87.118.105.235
Message-ID: <45a46f39@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1168404281 87.118.105.235 (9 Jan 2007 20:44:41 -0800)
Lines: 59
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail