亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? httpprot.pas

?? 包含常用Internet協議TCP,UDP、HTTP、FTP、Telnet等
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Author:       Fran鏾is PIETTE
Creation:     November 23, 1997
Version:      1.26
Description:  THttpCli is an implementation for the HTTP protocol
              RFC 1945 (V1.0), RFC 2068 (V1.1)
Credit:       This component was based on a freeware from by Andreas
              Hoerstemeier and used with his permission.
              andy@hoerstemeier.de http://www.westend.de/~hoerstemeier
EMail:        http://users.swing.be/francois.piette  francois.piette@swing.be
              http://www.rtfm.be/fpiette             francois.piette@rtfm.be
              francois.piette@pophost.eunet.be
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1997-2000 by Fran鏾is PIETTE
              Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56
              <francois.piette@pophost.eunet.be>

              This software is provided 'as-is', without any express or
              implied warranty.  In no event will the author be held liable
              for any  damages arising from the use of this software.

              Permission is granted to anyone to use this software for any
              purpose, including commercial applications, and to alter it
              and redistribute it freely, subject to the following
              restrictions:

              1. The origin of this software must not be misrepresented,
                 you must not claim that you wrote the original software.
                 If you use this software in a product, an acknowledgment
                 in the product documentation would be appreciated but is
                 not required.

              2. Altered source versions must be plainly marked as such, and
                 must not be misrepresented as being the original software.

              3. This notice may not be removed or altered from any source
                 distribution.

              4. You must register this software by sending a picture postcard
                 to the author. Use a nice stamp and mention your name, street
                 address, EMail address and any comment you like to say.

Quick Reference:
HTTP component can retrieve documents or files using HTTP protocol; that is
connect to a HTTP server also known as a webserver. It can also trigger a
CGI/ISAPI/NSAPI script and post data using either GET or POST method.
Syntax of an URL: protocol://[user[:password]@]server[:port]/path
Path can include data: question mark followed by URL encoded data.
HTTP component is either asynchonous (non-blocking) or synchonous (blocking).
Highest performance is when using asynchonous operation. This is the
recommended way to use HTTP component.
To request several URL simultaneously, use asynchronous operation and as much
HTTP components as you wants to request URLs. All requests will be executed
simultaneously without using multi-threading and without blocking your app.
Methods:
    GetASync    Asynchronous, non-blocking Get
                Retrieve document or file specified by URL, without blocking.
                OnRequestDone event trigered when finished. Use HTTP GET
                method (data contained in URL)
    PostASync   Asynchronous, non-blocking Post
                Retrieve document or file specified by URL, without blocking.
                OnRequestDone event trigered when finished. Use HTTP POST
                method (data contained in request stream)
    HeadASync   Asynchronous, non-blocking Head
                Retrieve document or file header specified by URL, without
                blocking. OnRequestDone event trigered when finished. Use HTTP
                HEAD method.
    Get         Synchronous, blocking Get. Same as GetAsync, but blocks until
                finished.
    Post        Synchronous, blocking Post. Same as PostAsync, but blocks until
                finished.
    Head        Synchronous, blocking Head. Same as HeadAsync, but blocks until
                finished.
    Abort       Immediately close communication.

Updates:
11/29/97 RcvdStream and SendStream properties moved to public section
11/30/97 Document name bug corrected
12/02/97 Removed bug occuring with terminating slash in docname
12/03/97 Added properties RcvdCount and SentCount to easily add a progress
         bar feature (On receive, the ContentLength is initialized with the
         value from the header. Update the progress bar in the OnDocData event,
         or the OnSendData event).
         Added the OnSendBegin, OnSendData and OnSendEnd events.
12/07/97 Corrected Head function to work as expected. Thanks to
         R. Barry Jones <rbjones@therightside.demon.co.uk
29/12/97 V0.96 Added ModifiedSince property as followinf proposition made by
         Aw Kong Koy" <infomap@tm.net.my>.
30/12/97 V0.97 Added a Cookie property to send cookies
11/01/98 V0.98 Added WSocket read-only property which enable to access the
         socket component used internally. For example to close it to abort
         a connection.
13/01/98 V0.99 Added MultiThreaaded property to tell the component that it is
         working in a thread and should take care of it.
15/01/98 V1.00 Completely revised internal working to make it work properly
         with winsock 2. The TimeOut property is gone.
         Changed OnAnswerLine event to OnHeaderData to be more consistent.
         Replaced AnswserLine property by readonly LastResponse property.
         Added OnRequestDone event. Added GetAsync, PostAsync, HeadAsync
         asynchronous, non-blocking methods. Added Abort procedure.
16/01/98 V1.01 Corrected a bug which let some data be lost when receiving
         (thanks to  Fulvio J. Castelli <fulvio@rocketship.com>)
         Added test for HTTP/1.1 response in header.
31/01/98 V1.02 Added an intermediate message posting for the OnRequestDone
         event. Thanks to Ed Hochman <ed@mbhsys.com> for his help.
         Added an intermediate PostMessage to set the component to ready state.
04/02/98 V1.03 Added some code to better handle DocName (truncating at the
         first question mark).
05/02/98 V1.04 Deferred login after a relocation, using WM_HTTP_LOGIN message.
         Added workarounf to support faulty webservers which sent only a single
         LF in header lines. Submitted by Alwin Hoogerdijk <alwin@lostboys.nl>
15/03/98 V1.05 Enlarge buffers from 2048 to 8192 bytes (not for D1)
01/04/98 V1.06 Adapted for BCB V3
13/04/98 V1.07 Made RcvdHeader property readonly and cleared the content at the
         start of a request.
         Protected Abort method from calling when component is ready.
         Ignore any exception triggered by CancelDnsLookup in Abort method.
14/04/98 V1.08 Corrected a relocation bug occuring with relative path
26/04/98 V1.09 Added OnLocationChange event
30/04/98 V1.10 Added ProxyUsername and ProxyPassword. Suggested by
         Myers, Mike <MikeMy@crt.com>.
26/05/98 V1.11 Corrected relocation problem when used with ASP webpages
09/07/98 V1.12 Adapted for Delphi 4
         Checked argument length in SendCommand
19/09/98 V1.13 Added support for HTML document without header
         Added OnSessionConnected event, httpConnected state and
         httpDnsLookupDone state.
         Corrected a problem with automatic relocation. The relocation
         message was included in data, resulting in wrong document data.
         Added two new events: OnRequestHeaderBegin and OnRequestHeaderEnd.
         They replace the OnHeaderBegin and OnHeaderEnd events that where
         called for both request header (to web server) and response
         header (from web server)
22/11/98 V1.14 Added a Location property than gives the new location in
         case of page relocation. Suggested by Jon Robertson <touri@pobox.com>
21/12/98 V1.15 Set ContentLength equal to -1 at start of command.
31/01/99 V1.16 Added HostName property
01/02/99 V1.17 Port was lost in DoRequestAsync when using a proxy.
         Thanks to David Wright <wrightd@gamespy.com> for his help.
         Report Dns lookup error and session connect error in OnrequestDOne
         event handler as suggested by Jack Olivera <jack@token.nl>.
14/03/99 V1.18 Added OnCookie event.
16/03/99 V1.19 Added Accept property.
               Added a default value to Agent property.
               Changed OnCookie event signature (not fully implemented yet !).
07/05/99 V1.20 Added code to support Content Ranges by Jon Robertson
               <touri@pobox.com>.
24/07/99 V1.21 Yet another change in relocation code.
Aug 20, 1999  V1.22 Changed conditional compilation so that default is same
              as latest compiler (currently Delphi 4, Bcb 4). Should be ok for
              Delphi 5. Added Sleep(0) in sync wait loop to reduce CPU usage.
              Added DnsResult property as suggested by Heedong Lim
              <hdlim@dcenlp.chungbuk.ac.kr>. This property is accessible from
              OnStateChange when state is httpDnsLookupDone.
              Triggered OnDocData after writing to the stream.
Sep 25, 1999  V1.23 Yet another change in relocation code when using proxy
              Francois Demers <fdemers@videotron.ca> found that some webserver
              do not insert a space after colon in header line. Corrected
              code to handle it correctly.
              Cleared ContentType before issuing request.
Oct 02, 1999  V1.24 added AcceptRanges property. Thanks to Werner Lehmann
              <wl@bwl.uni-kiel.de>
Oct 30, 1999  V1.25 change parameter in OnCommand event from const to var to
              allow changing header line, including deleting or adding before
              or after a given line sent by the component.
Nov 26, 1999  V1.26 Yet another relocation fix !


 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit HttpProt;

interface

{$B-}           { Enable partial boolean evaluation   }
{$T-}           { Untyped pointers                    }
{$X+}           { Enable extended syntax              }
{$IFNDEF VER80} { Not for Delphi 1                    }
    {$H+}       { Use long strings                    }
    {$J+}       { Allow typed constant to be modified }
{$ENDIF}
{$IFDEF VER110} { C++ Builder V3.0                    }
    {$ObjExportAll On}
{$ENDIF}
{$IFDEF VER125} { C++ Builder V4.0                    }
    {$ObjExportAll On}
{$ENDIF}

uses
    WinProcs, WinTypes, Messages, SysUtils, Classes, Forms, WSocket;

const
    HttpCliVersion     = 126;
    CopyRight : String = ' THttpCli (c) 1997-2000 F. Piette V1.26 ';
    DefaultProxyPort   = '80';
{$IFDEF VER80}
    { Delphi 1 has a 255 characters string limitation }
    HTTP_RCV_BUF_SIZE = 255;
    HTTP_SND_BUF_SIZE = 8193;
{$ELSE}
    HTTP_RCV_BUF_SIZE = 8193;
    HTTP_SND_BUF_SIZE = 8193;
{$ENDIF}
    WM_HTTP_REQUEST_DONE = WM_USER + 1;
    WM_HTTP_SET_READY    = WM_USER + 2;
    WM_HTTP_LOGIN        = WM_USER + 3;
    httperrNoError  = 0;
    httperrBusy     = 1;
    httperrNoData   = 2;
    httperrAborted  = 3;
    httperrOverflow = 4;

type
    EHttpException = class(Exception)
        ErrorCode : Word;
        constructor Create(const Msg : String; ErrCode : Word);
    end;

    THttpEncoding    = (encUUEncode, encBase64, encMime);
    THttpRequest     = (httpAbort, httpGET, httpPOST, httpHEAD);
    THttpState       = (httpReady,         httpNotConnected, httpConnected,
                        httpDnsLookup,     httpDnsLookupDone,
                        httpWaitingHeader, httpWaitingBody,  httpAborting);

    TOnCommand       = procedure (Sender : TObject;
                                  var S: String) of object;
    TDocDataEvent    = procedure (Sender : TObject;
                                  Buffer : Pointer;
                                  Len    : Integer) of object;
    TCookieRcvdEvent = procedure (Sender       : TObject;
                                  const Data   : String;
                                  var   Accept : Boolean) of object;
    THttpRequestDone = procedure (Sender : TObject;
                                  RqType : THttpRequest;
                                  Error  : Word) of object;

    THttpCli = class(TComponent)
    protected
        FWSocket          : TWSocket;
        FWindowHandle     : HWND;
        FMultiThreaded    : Boolean;
        FState            : THttpState;
        FHostName         : String;
        FTargetHost       : String;
        FPort             : String;
        FProxy            : String;
        FProxyPort        : String;
        FUsername         : String;
        FPassword         : String;
        FProxyUsername    : String;
        FProxyPassword    : String;
        FLocation         : String;
        FConnected        : Boolean;
        FDnsResult        : String;
        FSendBuffer       : array [0..HTTP_SND_BUF_SIZE - 1] of char;
        FRequestType      : THttpRequest;
        FReceiveBuffer    : array [0..HTTP_RCV_BUF_SIZE - 1] of char;
        FReceiveLen       : Integer;
        FLastResponse     : String;
        FHeaderLineCount  : Integer;
        FBodyLineCount    : Integer;
        FAllowedToSend    : Boolean;
        FURL              : String;
        FPath             : String;
        FDocName          : String;
        FSender           : String;
        FReference        : String;
        FAgent            : String;
        FAccept           : String;
        FModifiedSince    : TDateTime;       { Warning ! Use GMT date/Time }
        FNoCache          : Boolean;
        FStatusCode       : Integer;
        FReasonPhrase     : String;
        FContentLength    : LongInt;
        FContentType      : String;
        FDoAuthor         : TStringList;
        FContentPost      : String;
        FContentRangeBegin: String;   {JMR!! Added this line!!!}
        FContentRangeEnd  : String;   {JMR!! Added this line!!!}
        FAcceptRanges     : String;
        FCookie           : String;
        FLocationFlag     : Boolean;
        FRcvdHeader       : TStrings;
        FRcvdStream       : TStream;   { If assigned, will received the answer }
        FRcvdCount        : LongInt;   { Number of received bytes for the body }
        FSentCount        : LongInt;
        FSendStream       : TStream;   { Contains the data to send }
        FReqStream        : TMemoryStream;
        FRequestDoneError : Integer;
        FNext             : procedure of object;
        FOnStateChange    : TNotifyEvent;
        FOnSessionConnected   : TNotifyEvent;
        FOnRequestHeaderBegin : TNotifyEvent;
        FOnRequestHeaderEnd   : TNotifyEvent;
        FOnHeaderBegin    : TNotifyEvent;
        FOnHeaderEnd      : TNotifyEvent;
        FOnHeaderData     : TNotifyEvent;
        FOnDocBegin       : TNotifyEvent;
        FOnDocEnd         : TNotifyEvent;
        FOnDocData        : TDocDataEvent;
        FOnSendBegin      : TNotifyEvent;
        FOnSendEnd        : TNotifyEvent;
        FOnSendData       : TDocDataEvent;
        FOnTrace          : TNotifyEvent;
        FOnCommand        : TOnCommand;
        FOnCookie         : TCookieRcvdEvent;
        FOnDataAvailable  : TDataAvailable;
        FOnRequestDone    : THttpRequestDone;
        FOnLocationChange : TNotifyEvent;

        procedure SendRequest(const method,Version: String);
        procedure GetHeaderLineNext;
        procedure GetBodyLineNext;
        procedure SendCommand(const Cmd : String); virtual;
        procedure Login; virtual;
        procedure Logout; virtual;
        procedure SocketDNSLookupDone(Sender: TObject; Error: Word);
        procedure SocketSessionClosed(Sender: TObject; Error: Word);
        procedure SocketSessionConnected(Sender : TObject; Error : Word);
        procedure SocketDataSent(Sender : TObject; Error : Word);
        procedure SocketDataAvailable(Sender: TObject; Error: Word);
        procedure LocationSessionClosed(Sender: TObject; Error: Word); virtual;
        procedure DoRequestAsync(Rq : THttpRequest);
        procedure DoRequestSync(Rq : THttpRequest);
        procedure SetMultiThreaded(newValue : Boolean);
        procedure StateChange(NewState : THttpState);
        procedure TriggerStateChange;
        procedure TriggerCookie(const Data : String;
                                var   bAccept : Boolean); virtual;
        procedure TriggerSessionConnected; virtual;
        procedure TriggerRequestHeaderBegin; virtual;
        procedure TriggerRequestHeaderEnd; virtual;
        procedure TriggerHeaderBegin; virtual;
        procedure TriggerHeaderEnd; virtual;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久www成人免费毛片麻豆| 久久精品99国产精品| 丝袜脚交一区二区| 成年人午夜久久久| 日韩三级高清在线| 亚洲精品五月天| 国产精品资源网站| 555夜色666亚洲国产免| 夜夜嗨av一区二区三区中文字幕 | 久久99国产精品麻豆| 91久久精品一区二区二区| 国产日韩v精品一区二区| 蜜臀久久99精品久久久画质超高清| 91美女福利视频| 亚洲国产精品99久久久久久久久 | 久久嫩草精品久久久久| 天天综合网 天天综合色| 91浏览器打开| 国产精品欧美一区喷水| 国产夫妻精品视频| 久久久精品一品道一区| 美女www一区二区| 欧美一级欧美三级在线观看| 亚洲综合另类小说| 91豆麻精品91久久久久久| 国产精品久久久久毛片软件| 国产福利精品导航| 国产午夜亚洲精品午夜鲁丝片| 蜜桃av一区二区| 精品久久久久av影院| 男女性色大片免费观看一区二区 | 国产精品自在欧美一区| 久久综合九色综合欧美98| 久久国产精品99久久久久久老狼| 91.麻豆视频| 免费人成黄页网站在线一区二区| 欧美精品免费视频| 人人精品人人爱| 日韩精品在线网站| 国内精品伊人久久久久影院对白| 日韩精品一区二区三区在线| 国产一区二区在线影院| 久久久午夜精品| 成人激情图片网| 亚洲一线二线三线视频| 91.com在线观看| 国产麻豆精品theporn| 国产精品人妖ts系列视频| 91原创在线视频| 日韩黄色在线观看| 欧美成人精品3d动漫h| 福利一区二区在线| 亚洲一级二级三级| 日韩亚洲欧美综合| 成人伦理片在线| 亚洲国产日韩在线一区模特| 337p亚洲精品色噜噜| 国产精品亚洲а∨天堂免在线| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 蜜桃av噜噜一区二区三区小说| 久久久电影一区二区三区| 色8久久人人97超碰香蕉987| 麻豆精品在线看| 专区另类欧美日韩| 日韩视频免费观看高清在线视频| 国产电影一区二区三区| 亚洲天堂久久久久久久| 欧美一区二区美女| 99在线精品视频| 裸体歌舞表演一区二区| 亚洲女同女同女同女同女同69| 欧美一区二区大片| 91麻豆精品视频| 韩国精品免费视频| 亚洲国产日日夜夜| 国产精品二区一区二区aⅴ污介绍| 欧美精选午夜久久久乱码6080| 成人午夜电影网站| 美女一区二区在线观看| 中文字幕日韩一区| 久久久久久久久久电影| 欧美精三区欧美精三区| 91影视在线播放| 国产精品中文字幕日韩精品| 日韩影院免费视频| 亚洲午夜电影网| 国产欧美日韩精品一区| 欧美成人伊人久久综合网| 色爱区综合激月婷婷| youjizz久久| 国产精品一区二区三区四区| 美女精品一区二区| 日韩精品久久久久久| 亚洲午夜激情网站| 亚洲激情第一区| 国产精品乱码妇女bbbb| 久久久精品tv| 久久综合狠狠综合久久综合88| 日韩一区二区三区精品视频| 欧美性生活影院| 欧美在线免费视屏| 色婷婷久久久久swag精品| av一二三不卡影片| 大胆亚洲人体视频| 成人高清免费观看| av一二三不卡影片| 99精品桃花视频在线观看| 99国产一区二区三精品乱码| 成人av电影免费观看| 91丝袜美腿高跟国产极品老师| 国产成人午夜电影网| 国产成人免费在线视频| 国产成人日日夜夜| 成人免费毛片片v| av中文字幕不卡| 99re亚洲国产精品| 在线精品视频小说1| 欧美日韩一区二区电影| 欧美美女一区二区三区| 在线综合+亚洲+欧美中文字幕| 正在播放亚洲一区| 精品福利一二区| 国产色一区二区| 亚洲图片另类小说| 一区二区三区中文在线观看| 亚洲午夜一二三区视频| 日韩电影在线观看一区| 国产在线视视频有精品| 福利一区在线观看| 色哟哟在线观看一区二区三区| 91国产免费看| 日韩一区二区在线看| 日本一区二区三区高清不卡| 国产精品女人毛片| 一区二区三区日韩精品视频| 丝袜a∨在线一区二区三区不卡| 久久国产精品99精品国产| 国产1区2区3区精品美女| 日本黄色一区二区| 91精品国产91热久久久做人人| 精品久久久久一区二区国产| 国产精品美女久久久久久久久久久| 亚洲美女精品一区| 久久精品国产99国产| 97超碰欧美中文字幕| 欧美一区二区在线不卡| 亚洲国产高清在线| 偷窥国产亚洲免费视频| 国产揄拍国内精品对白| 色婷婷久久久综合中文字幕| 日韩欧美一二三四区| 中文字幕五月欧美| 乱中年女人伦av一区二区| 91蝌蚪porny| 精品久久国产字幕高潮| 亚洲男人天堂av| 久久99国产精品久久99| 日本福利一区二区| 久久久久九九视频| 午夜电影一区二区三区| 成人手机在线视频| 91精品国产综合久久蜜臀| 中文字幕字幕中文在线中不卡视频| 日韩电影免费在线看| 91小视频在线免费看| 26uuu欧美| 亚洲v中文字幕| 99精品欧美一区二区蜜桃免费 | 欧美最猛性xxxxx直播| 日本一区二区三区四区| 毛片基地黄久久久久久天堂| 日本高清不卡在线观看| 国产女人aaa级久久久级 | 欧美电影免费观看高清完整版在线| 国产精品进线69影院| 国产呦萝稀缺另类资源| 51午夜精品国产| 亚洲午夜三级在线| 97久久超碰国产精品| 国产亚洲精品aa| 国产一区二区三区久久悠悠色av| 在线播放日韩导航| 亚洲国产精品一区二区久久恐怖片| 成人免费看片app下载| 久久综合九色综合97婷婷| 蜜桃视频一区二区三区 | 欧美亚洲丝袜传媒另类| 国产精品不卡一区| 大胆亚洲人体视频| 国产日韩欧美a| 国产乱码精品一区二区三区av| 91精品国产色综合久久ai换脸 | 日韩av电影天堂| 欧美日韩黄视频| 亚洲午夜免费福利视频| 欧美男人的天堂一二区| 日韩专区欧美专区| 欧美一区二区三区免费观看视频| 无码av免费一区二区三区试看| 欧美日韩精品三区|