🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
6 messages
6 total messages Started by zetsoft Sat, 06 Jan 2007 16:04
Tidhttp & HTTP Headers
#1488
Author: zetsoft
Date: Sat, 06 Jan 2007 16:04
19 lines
1183 bytes
Hello.
I use your Components.
Exactly Tidhttp.

But there is such a problem:

On the server which I work with were the Headers were completely taking  
off.
Now my program gives a lot of errors now and doesn`t work.
What can I do with this problem and make Tidhttp work without Headers.
Thank you very much.

Component version: Indy9
IDE: BDS2006 BuilderC++

--
sorry for my english.
Regards. Cheater
Re: Tidhttp & HTTP Headers
#1498
Author: Remy Lebeau (TeamB)
Date: Tue, 09 Jan 2007 19:11
16 lines
1276 bytes
<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
Re: Tidhttp & HTTP Headers
#1501
Author: 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
Re: Tidhttp & HTTP Headers
#1504
Author: Remy Lebeau (TeamB)
Date: Wed, 10 Jan 2007 05:40
21 lines
1702 bytes
"Cheater" <zetsoft@mail.ru> wrote in message
news:45a46f39@newsgroups.borland.com...

> Code:

You did not answer any of my questions.  You said "the Headers were
completely taking off."  Taken off of what exactly?  Where?  You also
said that you were getting "a lot of errors", but you still have not
said what the errors actually are.  Just saying that something isn't
working does not say anything useful about the problem you are having.
What are you trying to do in the first place?  What do you expect to
happen?  What is actually happening instead?

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

And the actual problem is ...?


Gambit
Re: Tidhttp & HTTP Headers
#1512
Author: Cheater
Date: Thu, 11 Jan 2007 02:10
21 lines
1761 bytes
Sorry. Probably, i had ask wrong question.


so. Admin of my web-server has disabled HTTP-Headers.

now, i can't receive html-page from server. but can post into it.

as I had already written, error always return a first line of html-page, 
look like
  "<body>bla-bla<html>...".
Error doesn't have any error-code. Only html...
Application doesn't work correctly - information don't load into Stream.

and so, how i can receive information with disabled headers?
how i can load receiving into TMemoryStream?

Thank, and sorry.



Cheater
Re: Tidhttp & HTTP Headers
#1513
Author: Remy Lebeau (TeamB)
Date: Thu, 11 Jan 2007 03:12
45 lines
2333 bytes
"Cheater" <zetsoft@mail.ru> wrote in message
news:45a59c72@newsgroups.borland.com...

> Admin of my web-server has disabled HTTP-Headers.

They can't do that.  Without headers, HTTP doesn't work at all.
Headers tell HTTP what to do, and what is being transmitted in both
directions.  I think you are confused about what they actually did on
the server.  You need to find out EXACTLY what is really happening..

> now, i can't receive html-page from server.

I seriously doubt that.  HTTP is fairly useless if it can't retreive
data.

> as I had already written, error always return a first line of
html-page,
> look like
>   "<body>bla-bla<html>...".

That is not what I asked you.  Besides, the mere fact that you are
getting that much proves that HTTP headers are not disabled, otherwise
you wouldn't be able to get that data at all.

> Error doesn't have any error-code. Only html...

There is always a code available.

> Application doesn't work correctly

Again, that does not say ANYTHING about the problem you are having.
You need to be VERY specific.

> how i can receive information with disabled headers?

There is no such thing as disabled headers in HTTP.

> how i can load receiving into TMemoryStream?

You already know the answer to that, because your earlier code snippet
is doing it.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads