login about faq

Is there a plan to include a small web server into the lib ? I would looking for a function allowing to serve simple websites to a local browser and to use HTML, JS and UI to an else service running in background.

Any proven good alternatives ?

asked Dec 25 '16 at 09:18

ChristianVirtual's gravatar image


I would say there's no such thing as a simple web server. If Chilkat were to introduce a simple HTTP server-side class to receive HTTP requests and respond, then it would quickly prove to be inadequate. Each user would find some feature that he/she needed. Everybody would find themselves in the situation where the simple HTTP server covers 95% of the needs. But collectively, it's the vast number of features that comprise the last 5% that is the bulk of the project..

Anyway.. an easy way to receive an HTTP request is to write code using Chilkat.Socket that does the following:

  1. Accept the incoming connection.
  2. Read the "start line". Do this by reading to the first CRLF.
  3. Read the header by reading to the double-CRLF (i.e. CRLFCRLF)
  4. Load the header into a Chilkat.Mime object. This gives you easy access to all the information.
  5. Examine the Content-Length, if present, and consume the request body by reading that number of bytes.

Of course, there are all sorts of situations. What if the request is "chunked"? What about compression? What about multipart requests? Etc..


answered Dec 28 '16 at 09:37

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 25 '16 at 09:18

Seen: 1,878 times

Last updated: Dec 28 '16 at 09:37

powered by OSQA