> Or we simply make property LastResponse writeable which > won't even require a change of event OnHeaderData.
Much better since it would probably not break anything. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Arno Garrels" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Sunday, April 22, 2007 11:41 AM Subject: Re: [twsocket] httpcli v6 "bad request" > The easiest workaround is to trigger event OnHeaderData in > GetHeaderLineNext right before FLastResponse is added to > FRcvdHeader. OnHeaderData could get a new var parameter, > that is filled with FLastResponse. > Or we simply make property LastResponse writeable which > won't even require a change of event OnHeaderData. > > This would allow modification of any headerline before > the component takes any action. > > 1) > > procedure THttpTestForm.HttpCli1HeaderData( > Sender : TObject; > var HdrLine : String); > begin > if Pos('Location: ', hdrLine) = 1 then > hdrLine := Change(hdrLine); > end; > > 2) > > procedure THttpTestForm.HttpCli1HeaderData( > Sender : TObject); > begin > if Pos('Location: ', THttpCli(Sender).LastResponse) = 1 then > THttpCli(Sender).LastResponse := > Change(THttpCli(Sender).LastResponse); > end; > > > Arno Garrels wrote: >> Frans van Daalen wrote: >>> From: "Arno Garrels" >>>> >>>> Instead the component should provide access to parts of a URL, >>>> either by var-parameters in event OnLocationChange >>> >>> As said before the OnLocationChange is to late. That event is >>> triggered just before the relocate will execute. All properties of >>> the thttpcli are then already set. Therefor my proposal for a new >>> event >>> >>> ----------------- >>> 2) A new event OnRelocationRecieved(data : String; Accept : Boolean) >>> to be called around line 2675 (procedure getheaderlinenext) >>> ----------------- >> >> I don't see any reason why we need three different relocation events, >> most likely the same can be achieved with one single event. >> >> -- >> Arno Garrels [TeamICS] >> http://www.overbyte.be/eng/overbyte/teamics.html > -- > 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