Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: tcp-closed-det…
Fetching contributors…

Cannot retrieve contributors at this time

file 122 lines (80 sloc) 5.581 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
==========================================================================================================
MISULTIN - An Erlang library for building fast lightweight HTTP servers.
<http://code.google.com/p/misultin/>

>-|-|-(°>


INSTALL INSTRUCTIONS
==========================================================================================================

1. Compile

Run the appropriate script:

    * OSX | Linux users: make
    * Windows users: make.bat. Note that Erlang bin directory (by default, C:\Program Files\erl5.7.2\bin\) must be in your path for the script to work.

This script will compile the .erl files in the Misultin src directory and save the compiled files into the ebin directory.

2. (Optional) Copy Misultin files

This optional step will allow Misultin to be called from modules running from any directory on your file system.

Locate the directory where Erlang is installed on your system. Under OSX and Linux, it should be something similar to /usr/local/lib/erlang/ or /usr/lib/erlang/. Under Windows, Erlang is installed by default in something similar to C:\Program Files\erl5.7.2\ (version changes may apply).

Browse into the lib directory under this Erlang root and copy the root misultin-0.x directory into this directory. You should now have Misultin under something similar to:

    * OSX | Linux users: /usr/local/lib/erlang/lib/misultin-0.x/
    * Windows users: C:\Program Files\erl5.7.2\lib\misultin-0.x\

3. Test

If you did proceed with step 2, CD to the Misultin examples directory and start an Erlang shell.

If you did not proceed with step 2, copy the file misultin_hello_world.erl from the Misultin examples directory to the directory where the .beam files compiled in step 1 are located, then CD to this directory and start an Erlang shell.

In the shell, compile and run misultin_hello_world by issuing:

(one@rob.loc)1>c(misultin_hello_world).
{ok,misultin_hello_world}
(one@rob.loc)2>misultin_hello_world:start(8080).
{ok,<0.50.0>}

Open your favourite browser and point it to http://localhost:8080/, you should read "Hello World." printed on your page.

You may now stop the misultin_hello_world HTTP server:

(one@rob.loc)3>misultin_hello_world:stop().

4. Congratulations!

You're ready to go.

>-|-|-(°>


DOCUMENTATION
==========================================================================================================

API Documentation is available online on the Misultin's wiki: http://code.google.com/p/misultin/wiki/


CHANGELOG
==========================================================================================================

0.6.2: - refactored to considerably improve sending of static files
       - minor bug corrections

0.6.1: - added support to websocket protocol hixie draft 76 [thanks to sergio veiga]
       - added support to multiple websocket draft protocols [for backwards compatibility]
       - added ws_autoexit option which allows to get an event on websocket controlling processes [issue track #15, suggestion of esente]
       - added headers also in misultin websockets [thanks to jlirochon]
       - made it basho's rebar friendly [thanks to mrinalwadhwa]

0.6: - added HTTP compression option
       - refactoring of the main server loop, so that it is now isolated from the HTTP functionality
       - removed unnecessary compilation warnings
       - replaced proplists:get_value with much faster utility function

0.5: - added SSL support
       - refactoring of the acceptor loop

0.4: - added preliminary websocket support

0.3.4: - added Req support to return the socket handling the request
       - bug correction on Content-Length: 0 header causing timeout on POST requests [issue track #12,
         thanks to gdamjan]

0.3.3: - added echoing of the Connection header [issue track #7, thanks to thijsterlouw]
       - bug correction on acceptor respawning [issue track #10, thanks to thijsterlouw]

0.3.2: - optimized error handling [issue track #5, thanks to Max Lapshin]

0.3.1: - added flow control using inet options {active, once} [issue track #4, thanks to Max Lapshin]
       - added support to standard http headers response
       - added http 400 bad request error in socket handling
       - bug correction: removed erroneous sending of response timeout on listening open connections
       - added stream_support optimization option

0.3: - reengineering of the listener process, using active instead of passive mode in request parsing,
         except for BODY where passive is still used [thanks to Lev Walkin]
       - added better support for request timeout

0.2.2: - added .app file [thanks to Essien Ita Essien]
       - simplified get_options [thanks to Essien Ita Essien]
       - added ip address option [thanks to Essien Ita Essien]
       - added ipv6 support
       - added recv_timeout option
       - bug correction: requests peer address and port are now not reset on open connections multiple
         requests

0.2.1: - added support for Content-Type that specifies charset in POST data [thanks to Tuncer Ayaz]
       - added support for iolist in misultin_req:ok/1,2 and misultin_req:respond/2,3
       - code optimized taking out unnecessary binary conversion and lists:flatten [thanks to Feng Yu]

0.2: - added trap exit for acceptor failure
       - added backlog option
       - added fallback if no connection header is present [issue track #1, thanks to Ciconia]
       - added limit for parsing headers to avoid malicious attacks [thanks to Mazen Harake]
       - minor bug corrections

0.1: - initial release.
Something went wrong with that request. Please try again.