Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/ExternalBoardPlugInMain.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.15.2.2 by h677, Sat Jun 11 05:47:47 2005 UTC revision 1.19 by h677, Sun Feb 18 08:09:21 2007 UTC
# Line 5  interface Line 5  interface
5  uses  uses
6          Windows, Classes, SysUtils, Menus,          Windows, Classes, SysUtils, Menus,
7          IdHTTP, IdComponent, IdGlobal, IdException,          IdHTTP, IdComponent, IdGlobal, IdException,
8          AbonUnit;          AbonUnit, IdAntiFreezeBase;
9    
10  type  type
11    
# Line 82  var Line 82  var
82    
83  implementation  implementation
84    
85  uses ExternalBoardManager, ExternalThreadItem, GikoSystem, BoardGroup, Giko;  uses ExternalBoardManager, ExternalThreadItem, GikoSystem, BoardGroup, Giko,
86        ReplaceDataModule;
87    
88  // *************************************************************************  // *************************************************************************
89  // 戻り値が PChar である API のメモリを確保する  // 戻り値が PChar である API のメモリを確保する
# Line 242  const Line 243  const
243          LIVEDOOR_URL = 'http://jbbs.livedoor.jp/';          LIVEDOOR_URL = 'http://jbbs.livedoor.jp/';
244  begin  begin
245    
246    
247          {$IFDEF DEBUG}          {$IFDEF DEBUG}
248          Writeln('ExternalBoardManager.InternalDownload');          Writeln('ExternalBoardManager.InternalDownload');
249          {$ENDIF}          {$ENDIF}
# Line 267  begin Line 269  begin
269                                  {$IFDEF DEBUG}                                  {$IFDEF DEBUG}
270                                  Writeln('URL: ' + inURL);                                  Writeln('URL: ' + inURL);
271                                  {$ENDIF}                                  {$ENDIF}
272                    //AntiFreezeをDL時のみ有効にすることで、ココでのチェック不要
273                                  socket.Get( inURL, resStream );                                  socket.Get( inURL, resStream );
274                                  {$IFDEF DEBUG}                                  {$IFDEF DEBUG}
275                                  Writeln('取得で例外なし');                                  Writeln('取得で例外なし');
276                                  {$ENDIF}                                  {$ENDIF}
   
277                                  content                 := GikoSys.GzipDecompress( resStream, socket.Response.ContentEncoding );                                  content                 := GikoSys.GzipDecompress( resStream, socket.Response.ContentEncoding );
278                    // 置換する
279                    if GikoSys.Setting.ReplaceDat then begin
280                        content := ReplaceDM.Replace(content);
281                    end;
282    
283                                  ioModified      := socket.Response.LastModified;                                  ioModified      := socket.Response.LastModified;
284    
285                                  Result := socket.ResponseCode;                                  Result := socket.ResponseCode;
286                                  if (Length( content ) = 0) and (Result = 206) then                                  if (Length( content ) = 0) and (Result = 206) then
287                                          Result := 304;                                          Result := 304;
288                  //したらばJBBSはヘッダにエラー情報が載るらしいので、ここでチェック                                  //したらばJBBSはヘッダにエラー情報が載るらしいので、ここでチェック
289                                  if ( AnsiPos(LIVEDOOR_URL, inURL) > 0 ) and (Result = 200) then begin                                  if ( AnsiPos(LIVEDOOR_URL, inURL) > 0 ) and (Result = 200) then begin
290                                          if( AnsiPos('STORAGE IN', socket.Response.RawHeaders.Text) > 0 ) then begin                                          if( AnsiPos('STORAGE IN', socket.Response.RawHeaders.Text) > 0 ) then begin
291                                                  Result := 302;                                                  Result := 302;

Legend:
Removed from v.1.15.2.2  
changed lines
  Added in v.1.19

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26