🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1079

How to show the Headers (OnBeforeNavigate2)

#1079
From: Enrique
Date: Tue, 04 Oct 2005 09:16
23 lines
1752 bytes
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: <43424801@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,f1e443378e29aebd,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Enrique" <enridp@yahoo.com.ar>
From: "Enrique" <enridp@yahoo.com.ar>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: How to show the Headers (OnBeforeNavigate2)
Date: Tue, 4 Oct 2005 06:16:55 -0300
Lines: 25
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: <43424801@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1128417281 200.43.99.132 (4 Oct 2005 02:14:41 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail