Hello,

I've  noticed  that HTTP server (OverbyteIcsHttpSrv) is not processing
PUT requests correctly. PUT requests can have data attached (just like
POST) but this data never makes it to the program because OnPostedData
is never called.

The patch below fixes the problem.

Best regards,
Primo┼ż

--- 
C:/Users/gabr/AppData/Local/Temp/OverbyteIcsHttpSrv.pas-rev14711.svn000.tmp.pas 
    tor sep 30 12:00:00 2014
+++ 
C:/Users/gabr/AppData/Local/Temp/OverbyteIcsHttpSrv.pas-rev14712.svn000.tmp.pas 
    sre okt  1 16:33:59 2014
@@ -2790,7 +2790,7 @@ begin
         if FRequestContentLength > 0 then     { Only if we have data  } { 
V7.30 }
              FState := hcPostedData
         { With a GET method, we _never_ have any document        10/02/2004 }
-        else if FMethod <> 'POST' then                            {10/02/2004 
Bjornar}
+        else if (FMethod <> 'POST') and (FMethod <> 'PUT') then   {10/02/2004 
Bjornar} 
             FState := hcSendData;         // V8.01 was hcRequest;
         { We will process request before receiving data because application }
         { has to setup things to be able to receive posted data             }
@@ -3673,7 +3673,7 @@ begin
 {$ENDIF}
     if FMethod = 'GET' then
         ProcessGet
-    else if FMethod = 'POST' then
+    else if (FMethod = 'POST') or (FMethod = 'PUT') then
         ProcessPost
     else if FMethod = 'HEAD' then
         ProcessHead

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to