Ignore:
Timestamp:
Oct 2, 2012, 12:24:00 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Přihlašování, odhlašování, registrace a nastavení profilu uživatele.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CoolWeb/WebServer/UHTTPServerTCP.pas

    r96 r98  
    4242  HandlerData: THTTPHandlerData;
    4343  I: Integer;
     44  ContentLength: Integer;
    4445begin
    4546  with TTCPClientThread(Sender), Socket do begin
     
    8182          Inc(LineIndex);
    8283        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;
    8391      finally
    8492        LineParts.Free;
    8593      end;
     94
     95
    8696
    8797    // Process cookies
     
    95105    Response.Content.Clear;
    96106    Response.Headers.Add('Content-Type', 'text/html');
     107
     108
    97109
    98110    if Assigned(OnRequest) then OnRequest(HandlerData)
Note: See TracChangeset for help on using the changeset viewer.