Article View: borland.public.cppbuilder.internet.web
Article #1081Re: How to show the Headers (OnBeforeNavigate2)
From: Enrique
Date: Tue, 04 Oct 2005 09:30
Date: Tue, 04 Oct 2005 09:30
41 lines
2464 bytes
2464 bytes
If I put my own Headers in the Navigate method, then I can see it in in the
OnBeforeNavigate event (only "MY" header...):
I did something like this:
....
AnsiString Referer = "www.something.com";
TVariant Headers = {"Referer: " + Referer + "\n\r"};
CppWebBrowser1->Navigate(WideString(Edit1->Text), TNoParam(), NULL, NULL,
&Headers);
....
I don't know, the TCppWebBrowser does not send it's "own" headers?
please, i need help with this.
"Enrique" <enridp@yahoo.com.ar> escribi๏ฟฝ en el mensaje
news:43424801@newsgroups.borland.com...
> I need to see the headers that CppWebBrowser sends, and discovered that
the
> TVariant 'Headers' can simply be assigned to a string and the real problem
> seems to be that no headers are actually sent to the OnBeforeNavigate2
> event; the string is empty. So let me rephrase my question: Is there a way
> to capture or view the headers sent in each http request made by the
> TCppWebBrowser?
>
>
> this is what i do:
>
> void __fastcall TForm1::CppWebBrowser1BeforeNavigate2(TObject *Sender,
> LPDISPATCH pDisp, TVariant *URL, TVariant *Flags,
> TVariant *TargetFrameName, TVariant *PostData, TVariant *Headers,
> TOLEBOOL *Cancel)
> {
> AnsiString TheHeaders = *Headers;
> Memo1->Lines->Add(TheHeaders);
> }
>
> but it only prints an endline in the Memo.
> I hope somebody can help me.
>
> enrique.
>
>
Technical Details
Message-ID:
<43424b44@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43424801@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,f1e443378e29aebd X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII Reply-To: "Enrique" <enridp@yahoo.com.ar> From: "Enrique" <enridp@yahoo.com.ar> Newsgroups: borland.public.cppbuilder.internet.web References: <43424801@newsgroups.borland.com> Subject: Re: How to show the Headers (OnBeforeNavigate2) Date: Tue, 4 Oct 2005 06:30:51 -0300 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 200.43.99.132 Message-ID: <43424b44@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1128418116 200.43.99.132 (4 Oct 2005 02:28:36 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail