Changeset 98 for trunk/Packages/CoolWeb/WebServer/UHTTPServerTCP.pas
- Timestamp:
- Oct 2, 2012, 12:24:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CoolWeb/WebServer/UHTTPServerTCP.pas
r96 r98 42 42 HandlerData: THTTPHandlerData; 43 43 I: Integer; 44 ContentLength: Integer; 44 45 begin 45 46 with TTCPClientThread(Sender), Socket do begin … … 81 82 Inc(LineIndex); 82 83 until Line = ''; 84 85 if Request.Method = 'POST' then begin 86 ContentLength := StrToInt(Request.Headers.Values['Content-Length']); 87 SetLength(Line, ContentLength); 88 RecvBufferEx(PByte(Line), ContentLength, 1000); 89 Request.Post.Parse(Line); 90 end; 83 91 finally 84 92 LineParts.Free; 85 93 end; 94 95 86 96 87 97 // Process cookies … … 95 105 Response.Content.Clear; 96 106 Response.Headers.Add('Content-Type', 'text/html'); 107 108 97 109 98 110 if Assigned(OnRequest) then OnRequest(HandlerData)
Note:
See TracChangeset
for help on using the changeset viewer.