Re: [twsocket] Support for HEAD in HTTP server component

2012-02-10 Thread Tobias Rapp
Arno Garrels wrote: > Feb 07, 2012 V7.44 Arno - The HEAD method *MUST NOT* return a message-body in > the response. Do not skip compression on HEAD requests, we > need to send the correct size. Method SendDocument > simplified and added two overloads. AnswerStreamAcceptRange > got an overload too.

Re: [twsocket] Support for HEAD in HTTP server component

2012-02-08 Thread Arno Garrels
Arno Garrels wrote: > Tobias Rapp wrote: >> Using a variable on object level seems like a better approach than my >> proposal of adding a SendType flag to dozen of functions :-) > > However the patch is buggy, sorry, **don't use it as is**, will check > in a fixed one tonight or tomorrow. Done:

Re: [twsocket] Support for HEAD in HTTP server component

2012-02-08 Thread Arno Garrels
Tobias Rapp wrote: > Using a variable on object level seems like a better approach than my > proposal of adding a SendType flag to dozen of functions :-) However the patch is buggy, sorry, **don't use it as is**, will check in a fixed one tonight or tomorrow. Found another bug in TBufferedFileStre

Re: [twsocket] Support for HEAD in HTTP server component

2012-02-07 Thread Tobias Rapp
Using a variable on object level seems like a better approach than my proposal of adding a SendType flag to dozen of functions :-) The following lines may cause problems for file streams opened in read/write mode, I guess, because it will truncate the file: > @@ -2865,6 +2881,8 @@ > if FServ

Re: [twsocket] Support for HEAD in HTTP server component

2012-02-07 Thread Arno Garrels
Tobias Rapp wrote: > Hi, > > I am currently debugging some problems in my application using the > THttpServer/THttpConnection components regarding the support for HEAD > requests. As far as I understand the specs no response body should be > returned for HEAD but it seems that THttpConnection does

Re: [twsocket] Support for HEAD in HTTP server component

2012-02-07 Thread Tobias Rapp
I wrote: > [...] As far as I understand the specs no response body should be > returned for HEAD but it seems that THttpConnection does send response > bodies in procedure ProcessPost() in case of 400/404/etc. answers. ^---^ I wanted to say ProcessHead() here. Regard

[twsocket] Support for HEAD in HTTP server component

2012-02-07 Thread Tobias Rapp
Hi, I am currently debugging some problems in my application using the THttpServer/THttpConnection components regarding the support for HEAD requests. As far as I understand the specs no response body should be returned for HEAD but it seems that THttpConnection does send response bodies in proced