Recent

Author Topic: LHTTPServerComponent: react on different request  (Read 4593 times)

Niri

  • New member
  • *
  • Posts: 8
LHTTPServerComponent: react on different request
« on: July 16, 2011, 01:44:27 pm »
Hi,

when my lnet based http server is called i send an xml document. But i would like to send different documents for different request, exactly as a web server serves different files if you call him with http://server/file1.xml or http://server/file2.html.

My problem is i dont know how to figure out how the server was called. The event handler for the accept method has access to the socket used, but the socket doesnt seem to have a method or property that would show me something like the original query string used by the client. I have played around with the sockets getMessage method, but with no result.

Thanks for any hint to solve the problem.

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
Re: LHTTPServerComponent: react on different request
« Reply #1 on: July 25, 2011, 10:23:30 pm »
Answer from author of lNet's HTTP code:
<neli> he should register a uri handler
<neli> the lwebserver unit has an example

 

TinyPortal © 2005-2018