Sorry that was for response header. Here is the code I use:
void __fastcall httpServerClientClass::HTTPClientBeforeHeaderSend(TObject
*Sender,
const
AnsiString Method,
TStrings
*Headers)
{
/* From RFC2616
| request-header = Accept ; Section
14.1
| Accept-Charset ; Section 14.2
| Accept-Encoding ; Section 14.3
| Accept-Language ; Section 14.4
| Authorization ; Section 14.8
| Expect ; Section 14.20
| From ; Section 14.22
| Host ; Section 14.23
| If-Match ; Section 14.24
| If-Modified-Since ; Section 14.25
| If-None-Match ; Section 14.26
| If-Range ; Section 14.27
| If-Unmodified-Since ; Section 14.28
| Max-Forwards ; Section 14.31
| Proxy-Authorization ; Section 14.34
| Range ; Section 14.35
| Referer ; Section 14.36
| TE ; Section 14.39
| User-Agent ; Section 14.43
*/
// here headers contains all the headers as a string list
}
Best Regards,
SZ
----- Original Message -----
From: "Me" <[EMAIL PROTECTED]>
To: "ICS support mailing" <[email protected]>
Sent: Friday, December 09, 2005 9:51 AM
Subject: Re: [twsocket] File download
This one is always empty :(
---- Wiadomość Oryginalna ----
Od: Fastream Technologies <[EMAIL PROTECTED]>
Do: ICS support mailing <[email protected]>
Data: Fri, 9 Dec 2005 09:25:18 +0200
Temat: Re: [twsocket] File download
> Use Client->LastResponse.
>
> Regards,
>
> SZ
>
> ----- Original Message -----
> From: "Me" <[EMAIL PROTECTED]>
> To: "ICS support mailing" <[email protected]>
> Sent: Friday, December 09, 2005 8:37 AM
> Subject: Re: [twsocket] File download
>
>
> Ok. But... i really have no idea how do i get a header... in
> OnHeaderxxxx events there is no such a variable as Data or Buffer
or
> any... Searched the google but found nothing... how do i get
header
> data into stream/string so i could parse it?
>
> ---- Wiadomość Oryginalna ----
> Od: Fastream Technologies <[EMAIL PROTECTED]>
> Do: ICS support mailing <[email protected]>
> Data: Thu, 8 Dec 2005 22:07:15 +0200
> Temat: Re: [twsocket] File download
>
> > You need to parse the header on OnHeaderEnd. First store it in a
> class
> > variable in OnHeaderData. Notice that this event is called each
> time a
> > header line comes.
> >
>
> >> Sounds cool but... if the file is being downloaded from forum..
.
> >> i wouldlike to recive its name and save under the name given by
> >> server... any idea how?
> >>
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be