Re: [twsocket] httpcli v6 bad request

2007-04-24 Thread Arno Garrels
DZ-Jay wrote: The alternative would be to give the user access to the URL when automatic redirections are in place, via a new event. For this purpose I suggest we trigger the OnHeaderData event at a slightly different place and make property LastResponse writeable. However, Francois had

Re: [twsocket] httpcli v6 bad request

2007-04-23 Thread DZ-Jay
On Apr 23, 2007, at 14:52, Arno Garrels wrote: What needs to be changed is the fact that component users currently cannot correct a badly formed (Location) header line. If I use the THttpCli just to connect to my own servers I don't need the overhead of any smart check because I can be

Re: [twsocket] httpcli v6 bad request

2007-04-22 Thread Francois PIETTE
- 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

Re: [twsocket] httpcli v6 bad request

2007-04-21 Thread Francois PIETTE
Francois, Then there are situations that your previous argument will fail: Consider an application using HttpCli that does not automatically encode URLs in the URL property. Users will complain that If I enter address with a space in IE it works, but your software is broken!. If your

Re: [twsocket] httpcli v6 bad request

2007-04-21 Thread Arno Garrels
Francois PIETTE wrote: If you think -- like me -- that it is the responsibility of the application developer to properly encode URLs, and not the component, then the solution for those applications that require the IE-like behaviour is for the developer to call UrlEncode himself at the

Re: [twsocket] httpcli v6 bad request

2007-04-21 Thread Frans van Daalen
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

Re: [twsocket] httpcli v6 bad request

2007-04-21 Thread Francois PIETTE
. 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: Saturday, April 21, 2007 1:35 PM Subject: Re: [twsocket] httpcli v6 bad request Francois

Re: [twsocket] httpcli v6 bad request

2007-04-21 Thread Arno Garrels
: [twsocket] httpcli v6 bad request Francois PIETTE wrote: If you think -- like me -- that it is the responsibility of the application developer to properly encode URLs, and not the component, then the solution for those applications that require the IE-like behaviour

Re: [twsocket] httpcli v6 bad request

2007-04-21 Thread Arno Garrels
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

Re: [twsocket] httpcli v6 bad request

2007-04-20 Thread Arno Garrels
[EMAIL PROTECTED] wrote: --- Original Message --- From: Francois PIETTE[mailto:[EMAIL PROTECTED] Sent: 4/19/2007 2:46:48 PM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] httpcli v6 bad request Agreed, so we need a FAST routine. URLEncode

Re: [twsocket] httpcli v6 bad request

2007-04-20 Thread [EMAIL PROTECTED]
Message --- From: Arno Garrels[mailto:[EMAIL PROTECTED] Sent: 4/20/2007 10:41:53 AM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] httpcli v6 bad request [EMAIL PROTECTED] wrote: --- Original Message --- From: Francois PIETTE[ mailto:[EMAIL PROTECTED

Re: [twsocket] httpcli v6 bad request

2007-04-20 Thread Francois PIETTE
to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: [EMAIL PROTECTED] To: twsocket@elists.org Sent: Thursday, April 19, 2007 10:30 PM Subject: Re: [twsocket] httpcli v6 bad request The main issue is however

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread DZ-Jay
Hello: Wouldn't it be more appropriate for the application to guarantee that the URL conforms to RFC 1738 by encoding all illegal characters (including spaces)? Common client applications (browsers) do this automatically for the user, but it is still stupid for the server to redirect

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread DZ-Jay
On Apr 18, 2007, at 15:11, Frans van Daalen wrote: I constructed a 301 page for you at www.hedaal.nl/tmp/fromhere.asp If you use IE this link will relocate you to http://www.hedaal.nl/tmp/to%20here.html If you use OverbyteIcsHttpTst it will give you a 400 Bad Request because of the

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread DZ-Jay
On Apr 18, 2007, at 15:11, Frans van Daalen wrote: Please note that the following will cause the server to include a %20 before sending the header p = http://www.hedaal.nl/tmp/to here.html response.redirect p Are you sure it is the server and not

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Frans van Daalen
- Original Message - From: DZ-Jay [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Thursday, April 19, 2007 11:44 AM Subject: Re: [twsocket] httpcli v6 bad request On Apr 18, 2007, at 15:11, Frans van Daalen wrote: Please note that the following will cause

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Frans van Daalen
Notice that replacing spaces may not suffice, as it may fail too if any other unencoded character is included; so if you want HttpCli to handle it, I would suggest rather a call to an HTML-Encode function for the URL prior to posting the response. However, I still think that this should go

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Arno Garrels
Frans van Daalen wrote: - Original Message - From: DZ-Jay [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Thursday, April 19, 2007 11:44 AM Subject: Re: [twsocket] httpcli v6 bad request On Apr 18, 2007, at 15:11, Frans van Daalen wrote: Please note

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Francois Piette
No idea, I can only see that the send header in this case will have the %20 included already. In my Ethereal dump the location-header of the 301-response already has the space, so the server simply tries to redirect to an invalid URL, do we really have to workaround such invalid URLs in

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread [EMAIL PROTECTED]
encoded by the application externally. -dZ. --- Original Message --- From: Frans van Daalen[mailto:[EMAIL PROTECTED] Sent: 4/19/2007 6:54:57 AM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] httpcli v6 bad request In my Ethereal dump the location-header

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Frans van Daalen
Frans, As I mentioned before, replacing spaces will still leave you open to other invalid characters. If you want a quick fix for your current problem, then I suggest URL-encoding the entire URL instead of just the the spaces. Its been a while since I've used HttpCli, so I'm not sure if

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Arno Garrels
[EMAIL PROTECTED] wrote: --- Original Message --- From: Arno Garrels[mailto:[EMAIL PROTECTED] Sent: 4/19/2007 6:37:09 AM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] httpcli v6 bad request No idea, I can only see that the send header in this case

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Arno Garrels
Arno Garrels wrote: [EMAIL PROTECTED] wrote: --- Original Message --- From: Arno Garrels[mailto:[EMAIL PROTECTED] Sent: 4/19/2007 6:37:09 AM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] httpcli v6 bad request No idea, I can only see that the send

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Francois PIETTE
Agreed, so we need a FAST routine. URLEncode currently isn't smart enough to encode a complete URL, and it is slow (result := result + ..) Next question is how smart should such a routine act? Should it check for a valid URL in general or shall it just check for valid encoding? Should it

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread Frans van Daalen
my 2 cents on this : If you feed Thttpcli.url with a invalid url no urldecode is executed. To keep consistency in behavior I would not just do an automatic urldecode on a relocate. The main issue is however that with the followrelocate set it will generate an error while a browser will not.

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread [EMAIL PROTECTED]
--- Original Message --- From: Francois PIETTE[mailto:[EMAIL PROTECTED] Sent: 4/19/2007 2:46:48 PM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] httpcli v6 bad request Agreed, so we need a FAST routine. URLEncode currently isn't smart enough

Re: [twsocket] httpcli v6 bad request

2007-04-19 Thread [EMAIL PROTECTED]
it alone, give it one with funky characters and it will encoded it). -dZ. --- Original Message --- From: Frans van Daalen[mailto:[EMAIL PROTECTED] Sent: 4/19/2007 3:58:57 PM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] httpcli v6 bad request my 2 cents

Re: [twsocket] httpcli v6 bad request

2007-04-18 Thread Francois PIETTE
[EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, April 16, 2007 7:29 PM Subject: Re: [twsocket] httpcli v6 bad request arggg...found it! The location url contains a space. I'm now trying to solve this. Using the OnLocationChange to adjust the url doesn't work because

Re: [twsocket] httpcli v6 bad request

2007-04-18 Thread Frans van Daalen
(httpclient.fpath,' ','%20',[rfreplaceall]); in a onLocationChange event Frans - Original Message - From: Francois PIETTE [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, April 18, 2007 2:38 PM Subject: Re: [twsocket] httpcli v6 bad request Hello Frans, I'm back

Re: [twsocket] httpcli v6 bad request

2007-04-18 Thread Frans van Daalen
://www.hedaal.nl/tmp/to here.html response.redirect p Frans - Original Message - From: Frans van Daalen [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, April 18, 2007 6:49 PM Subject: Re: [twsocket] httpcli v6 bad request Francois, The website

Re: [twsocket] httpcli v6 bad request

2007-04-16 Thread Frans van Daalen
That appears correct, the THttpCli changes a POST to a GET request when automatically redirecting. RFC1945 however say that this is wrong: That's true. We found the same thing while building an interface to one server. Note, however, the major browsers all change the POST to a GET. The

Re: [twsocket] httpcli v6 bad request

2007-04-16 Thread Frans van Daalen
arggg...found it! The location url contains a space. I'm now trying to solve this. Using the OnLocationChange to adjust the url doesn't work because of --- THttpCli.StartRelocation . . . if Assigned(FOnLocationChange) then FOnLocationChange(Self); SaveLoc

Re: [twsocket] httpcli v6 bad request

2007-04-07 Thread Arno Garrels
DZ-Jay wrote: [..] If I understand your problem, what is happening is this: You submit a Post request, the server responds with 302, the HttpCli automatically submits a Get request to the new location, but the server rejected it, ignored it, or processed it incorrectly because it was

Re: [twsocket] httpcli v6 bad request

2007-04-07 Thread Steve Endicott
At 12:24 AM 4/7/2007, you wrote: That appears correct, the THttpCli changes a POST to a GET request when automatically redirecting. RFC1945 however say that this is wrong: That's true. We found the same thing while building an interface to one server. Note, however, the major browsers all

Re: [twsocket] httpcli v6 bad request

2007-04-07 Thread Francois PIETTE
That appears correct, the THttpCli changes a POST to a GET request when automatically redirecting. RFC1945 however say that this is wrong: That's true. We found the same thing while building an interface to one server. Note, however, the major browsers all change the POST to a GET. The

Re: [twsocket] httpcli v6 bad request

2007-04-06 Thread DZ-Jay
On Apr 5, 2007, at 13:38, Frans van Daalen wrote: The first postasync generate 302 from the server. As follow is set the httpcli will also do a get for the relocation. What do you mean that it will do a Get for the relocation? A 302 relocation response just means that you have to request

[twsocket] httpcli v6 bad request

2007-04-05 Thread Frans van Daalen
Hi all, Something i'm trying to solve for some time now I have http.postasync call that returns a h1Bad Request/h1 Using a sniffer however I see no such respons from the server, in fact I can only see the expected response! (302) Anyone with a hint where to start looking? -- To unsubscribe

Re: [twsocket] httpcli v6 bad request

2007-04-05 Thread Francois PIETTE
: Thursday, April 05, 2007 6:11 PM Subject: [twsocket] httpcli v6 bad request Hi all, Something i'm trying to solve for some time now I have http.postasync call that returns a h1Bad Request/h1 Using a sniffer however I see no such respons from the server, in fact I can only see

Re: [twsocket] httpcli v6 bad request

2007-04-05 Thread Frans van Daalen
somewhere/somehow? Kind regards, Frans - Original Message - From: Francois PIETTE [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Thursday, April 05, 2007 6:44 PM Subject: Re: [twsocket] httpcli v6 bad request Maybe some security product which filter your requests