Fixes a problem with to_html for singleton tags
Merge pull request #77 from mmzeeman/master

Fix for problem with to_html rendering faulty html with singleton tags.
bump to 2.3.2, Case insensitive match for "Connection: close" (#81)
The range-header handling does not implement the following:
http://tools.ietf.org/html/rfc2616#section-14.35.1

  If the last-byte-pos value is absent, or if
  the value is greater than or equal to the current
  length of the entity-body, last-byte-pos is taken
  to be equal to one less than the current length of
  the entity-body in bytes.

Specifically, the 'greater than equal to' case.
add ability to handle combined content-length header.
Merge pull request #85 from pmundkur/fix-ranges

Fix a case in handling range headers
amended get_combined_value.
support parsing quoted string.
Fix 0-length range responses.

There were two issues:

- file:pread() returns eof in the case when the length of the
  read is 0 bytes, for any offset.  This causes badarg exceptions
  later in iolist_size when the 'eof' atom is encountered instead
  of a binary

- The range-length computation is off by 1 for 0-length ranges:
  {Skip, Skip + Length - 1, PartialBody} would result in e.g.
  {0, -1, eof}. {0, -1} is invalid HTTP according to

  http://tools.ietf.org/html/rfc2616#section-14.16

     A byte-content-range-spec with a byte-range-resp-spec whose
     last-byte-pos value is less than its first-byte-pos value,
     or whose instance-length value is less than or equal to its
     last-byte-pos value, is invalid.

This patch fixes both issues.
Avoid using regular expressions
Removed export_all
Merge pull request #88 from doubleyou/handling-combined-header

Handling combined header
Merge branch 'mochiweb' into fix-zero-length-range-response
Fix for mochiweb_acceptor crash under R15B02

The source is still unclear but R15B02 now will return and emsgsize error
if the received packet is larger than the recvbuf.  This can be tested with
the following (sorry I don't know how to integrate this sort of test into
mochiweb's tests).

-module(mochi_test).

-export([start/0,
         handle_http/1,
         test/1]).

start() ->
  application:start (inets),
  mochiweb_http:start([{port, 5678}, {loop, fun(Req) -> handle_http(Req) end}]).

handle_http(Req) ->
  Req:respond({ 200,
                [ {"Content-Type", "text/html"} ],
                [ "<html><body>Hello</body></html>" ]
              }).

test (Len) ->
  httpc:request (get, {"http://127.0.0.1:5678/",
                 [{"X-Random", [$a || _ <- lists:seq(1,Len)]}]}, [], []).

Once compiled you can run this with

erl -pa ebin -boot start_sasl

Then run with

mochi_test:start().
mochi_test:test(10000).

The result is different with R14B04 and R15B02.  With R15B02 there was
a crash in the mochiweb_acceptor.  This patch deals with that crash.
Do not allow backslashes in path (security).

On Windows, it is possible to access arbitrary files by crafting
a GET with unescaped \, like GET /..\..\..\..\..\windows\win.ini

http://www.couchbase.com/issues/browse/MB-7390
Issue 92: Do not allow backslashes in path (security).

On Windows, it is possible to access arbitrary files by crafting
a GET with unescaped \, like GET /..\..\..\..\..\windows\win.ini

Please also see ouchbase.com/issues/browse/MB-7390
Merge branch 'master' of git://github.com/melkote/mochiweb
Merge pull request #93 from melkote/master

Pull request for issue 92: Do not allow backslashes in path (windows security).
Merge pull request #91 from djnym/R15B02_mochiweb_acceptor_crash

Fix for mochiweb_acceptor crash under R15B02
prep changelog for 2.4.0