Re: [twsocket] Setting additional Header fields depending on the mimetype in th

2011-12-14 Thread Angus Robertson - Magenta Systems Ltd
 The implementation should be delegated to a handling class which 
 could be replaced easily by the developper.

Yes, it will be a new class in the OverbyteIcsMimeUtils unit. 

Angus

--
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


Re: [twsocket] Setting additional Header fields depending onthe mimetype in th

2011-12-14 Thread Arno Garrels
François Piette wrote:
 I'm just about to change to HttpServer MIME handling again, to use a
 look-up list read from the Windows classes registry or a text file)
 when the server starts, to replace the current hard coded MIME list.
 It will be editable by the application. 
 
 The implementation should be delegated to a handling class which
 could be replaced easily by the developper. It see a mechanism based
 on metaclass just like ClientClass property use.

Or maybe an interface. 

-- 
Arno Garrels  


--
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


Re: [twsocket] Setting additional Header fields depending on themimetype in th

2011-12-14 Thread Arno Garrels
RTT wrote:
 On 13-12-2011 19:21, Arno Garrels wrote:
 We don't want to open and load a text file each
  time a new type is found.
 True, that would be dog-slow.
 
 For the generality of the HTTP server applications, other than the 10
 or 15 most common MIME types (that should always be in the list) and
 the 
 ones that are application specific (application adds these to the
 list), all the rest are exotic ones, only requested once in a while,
 if even. Reading these from the registry, of even from an external
 file, is, IMO, the best way to code it. 

Implementation in the webserver component should IMO not load from 
system/registry by default but just add currently hard coded types. 
Property MimeTypes could return an instance or interface with 
methods for everthing else including load from file, registry and
resource etc..

-- 
Arno Garrels   
--
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


Re: [twsocket] Setting additional Header fields depending onthe mimetype in th

2011-12-14 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 The implementation should be delegated to a handling class which
 could be replaced easily by the developper.
 
 Yes, it will be a new class in the OverbyteIcsMimeUtils unit.

Also handy would be a method LoadFromResource:

function TWhatEverMimeTypeClass.LoadFromResource(const AResName: string): 
Boolean;
var
  Rs : TResourceStream;
  SL : TStringList;
  I  : Integer;
begin
  try
Rs := TResourceStream.Create(hInstance, AResName, RT_RCDATA);
try
  SL := TStringList.Create;
  try
SL.LoadFromStream(Rs);
for I := 0 to SL.Count -1 do
  if IndexOfName(SL.Names[I])  0 then
Add(SL[I]);
Result := True;
  finally
SL.Free;
  end;
finally
  Rs.Free;
end;
  except
Result := False;
  end;
end;


 
 Angus
--
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


[twsocket] POP3Client

2011-12-14 Thread Alfonso Del Vecchio

Sorry for my English.
I've been using recently OVERBYTE ICS-2010 for Delphi - Intraweb Atozed - 
TMS Software.
I connect with the problems of POP3CLIENT. After setting the host (= 
pop.191.biz), port (= 110), username and password, run POP3Client.Connect.
Any command run later (POP3CLINET.User, POP3CLIENT.Pass ECTC.) Is reported 
to me the following error: POP3 Component not ready. Why?
Thanks 
--
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

Re: [twsocket] POP3Client

2011-12-14 Thread Angus Robertson - Magenta Systems Ltd
 I connect with the problems of POP3CLIENT. After setting the host 
 (= pop.191.biz), port (= 110), username and password, run 
 POP3Client.Connect.
 Any command run later (POP3CLINET.User, POP3CLIENT.Pass ECTC.) Is 
 reported to me the following error: POP3 Component not ready. Why?

You are using asynchronous commands, and not waiting for results in the
various events.  

You should instead use methods with 'Sync' appended, ie ConnectSync, then
StatSync, then ListSync, QuitSync, etc. 

Angus



--
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


Re: [twsocket] Setting additional Header fields depending onthe mimetype in th

2011-12-14 Thread François Piette
 The implementation should be delegated to a handling class which could 
 be replaced easily by the developper. It see a mechanism based on 
 metaclass just like ClientClass property use.

 Or maybe an interface. 

Technically interfaces are very good. But ICS is class based and
introducing interfaces doesn't fit well in the overall design.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



--
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