couchdb-mochiweb.git
11 years agoMerge branch 'master' into rebarify-15688
Bob Ippolito [Fri, 12 Nov 2010 02:23:46 +0000 (10:23 +0800)] 
Merge branch 'master' into rebarify-15688

11 years agobump version to 1.4.1 1.4.1
Bob Ippolito [Fri, 12 Nov 2010 02:21:08 +0000 (10:21 +0800)] 
bump version to 1.4.1

11 years agoincrease time for cmd_port_test_spool to allow for slower machines
Bob Ippolito [Fri, 12 Nov 2010 01:56:02 +0000 (09:56 +0800)] 
increase time for cmd_port_test_spool to allow for slower machines

11 years agoIf we're going to hide rebar from the user for make app we might as well use slightly...
David Reid [Thu, 11 Nov 2010 18:17:05 +0000 (10:17 -0800)] 
If we're going to hide rebar from the user for make app we might as well use slightly better variable name.

11 years agoMerge branch 'master' into rebarify-15688
David Reid [Thu, 11 Nov 2010 18:11:11 +0000 (10:11 -0800)] 
Merge branch 'master' into rebarify-15688

Conflicts:
.gitignore
README
support/include.mk
support/make_app.escript

11 years agoBetter rebar templating support. Including makefile target, readme docs and doesn...
David Reid [Thu, 11 Nov 2010 18:08:00 +0000 (10:08 -0800)] 
Better rebar templating support.  Including makefile target, readme docs and doesn't require you to make your own toplevel directory.

11 years agoMerge branch 'pu'
Bob Ippolito [Thu, 11 Nov 2010 09:02:02 +0000 (17:02 +0800)] 
Merge branch 'pu'

11 years agoMerge branch 'accepts_content_type' into pu
Bob Ippolito [Thu, 11 Nov 2010 09:00:26 +0000 (17:00 +0800)] 
Merge branch 'accepts_content_type' into pu

11 years ago5 minute default idle timeout
Adam Kocoloski [Tue, 26 Oct 2010 03:25:00 +0000 (11:25 +0800)] 
5 minute default idle timeout

11 years agoMerge branch 'pu'
Bob Ippolito [Wed, 10 Nov 2010 16:17:34 +0000 (00:17 +0800)] 
Merge branch 'pu'

11 years agoMerge branch 'master' into pu
Bob Ippolito [Wed, 10 Nov 2010 16:15:35 +0000 (00:15 +0800)] 
Merge branch 'master' into pu

11 years agoCorrected comment and added more tests to mochiweb_util:parse_qvalues_test/0.
Filipe David Manana [Mon, 8 Nov 2010 15:33:42 +0000 (23:33 +0800)] 
Corrected comment and added more tests to mochiweb_util:parse_qvalues_test/0.

11 years agoAdded mochiweb_request:accept_content_type/1 function.
Filipe David Manana [Mon, 8 Nov 2010 14:26:10 +0000 (22:26 +0800)] 
Added mochiweb_request:accept_content_type/1 function.
This function allows a caller to know if a request accepts a given media type.
Examples:

      1) For a missing "Accept" header:
         accepts_content_type("application/json") -> true

      2) For an "Accept" header with value "text/plain, application/*":
         accepts_content_type("application/json") -> true

      3) For an "Accept" header with value "text/plain, */*; q=0.0":
         accepts_content_type("application/json") -> false

      4) For an "Accept" header with value "text/plain; q=0.5, */*; q=0.1":
         accepts_content_type("application/json") -> true

      5) For an "Accept" header with value "text/*; q=0.0, */*":
         accepts_content_type("text/plain") -> false

11 years agoedoc cleanup
Bob Ippolito [Wed, 10 Nov 2010 16:06:09 +0000 (00:06 +0800)] 
edoc cleanup

11 years agoMerge branch 'pu'
Bob Ippolito [Wed, 10 Nov 2010 15:38:44 +0000 (23:38 +0800)] 
Merge branch 'pu'

11 years agoMerge branch 'master' into pu
Bob Ippolito [Wed, 10 Nov 2010 15:37:58 +0000 (23:37 +0800)] 
Merge branch 'master' into pu

11 years agoFix for error in parsing particular incorrect singletons.
Jeroen Koops [Wed, 20 Oct 2010 08:34:17 +0000 (16:34 +0800)] 
Fix for error in parsing particular incorrect singletons.

When the HTML parser attempts to parse tags that should be
singletons but are not, AND they have content, an exception
occurs:

  1> mochiweb_html:parse("<html><input><input>x</input></input></html>").
  ** exception error: no case clause matching
                     {[],[{<<"input">>,[],[<<"x">>]},{<<"input">>,[],[]}]}
       in function  mochiweb_html:destack/2
       in call from mochiweb_html:tree/2
       in call from mochiweb_html:parse_tokens/1

This patch provides a fix.

11 years agoMerge branch 'master' of github.com:mochi/mochiweb
Dmitry Demeshchuk [Tue, 9 Nov 2010 04:09:48 +0000 (07:09 +0300)] 
Merge branch 'master' of github.com:mochi/mochiweb

11 years agoCorrected comment and added more tests to mochiweb_util:parse_qvalues_test/0.
Filipe David Manana [Mon, 8 Nov 2010 15:33:42 +0000 (15:33 +0000)] 
Corrected comment and added more tests to mochiweb_util:parse_qvalues_test/0.

11 years agoAdded mochiweb_request:accept_content_type/1 function.
Filipe David Manana [Mon, 8 Nov 2010 14:26:10 +0000 (14:26 +0000)] 
Added mochiweb_request:accept_content_type/1 function.
This function allows a caller to know if a request accepts a given media type.
Examples:

      1) For a missing "Accept" header:
         accepts_content_type("application/json") -> true

      2) For an "Accept" header with value "text/plain, application/*":
         accepts_content_type("application/json") -> true

      3) For an "Accept" header with value "text/plain, */*; q=0.0":
         accepts_content_type("application/json") -> false

      4) For an "Accept" header with value "text/plain; q=0.5, */*; q=0.1":
         accepts_content_type("application/json") -> true

      5) For an "Accept" header with value "text/*; q=0.0, */*":
         accepts_content_type("text/plain") -> false

11 years ago{active, false} -> {active, once}
Dmitry Demeshchuk [Tue, 2 Nov 2010 12:08:09 +0000 (15:08 +0300)] 
{active, false} -> {active, once}

Small refactoring

11 years agorun userdefined profile_fun for accept timing, handle state upgrade, document and...
Emad El-Haraty [Mon, 1 Nov 2010 22:18:59 +0000 (15:18 -0700)] 
run userdefined profile_fun for accept timing, handle state upgrade, document and test.

11 years agothis is going to be a lot of data, so we need to make sure our network and scribe...
Emad El-Haraty [Mon, 1 Nov 2010 18:02:40 +0000 (11:02 -0700)] 
this is going to be a lot of data, so we need to make sure our network and scribe can handle this

11 years agoMerge branch 'master' into pu
Bob Ippolito [Wed, 20 Oct 2010 06:10:27 +0000 (14:10 +0800)] 
Merge branch 'master' into pu

11 years agoFix for parsing broken processing instructions.
Jeroen Koops [Fri, 15 Oct 2010 14:14:20 +0000 (22:14 +0800)] 
Fix for parsing broken processing instructions.

Some HTML contains broken processing instructions, such as this one
encountered in the wild: `<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />`.

The parser crashes on this since it only accepts `?>` (or end-of-file) as
the end of a processing instruction. This patch fixes it by also
allowing `>` or `/>` to end a processing instruction.

11 years agoLots of work on using rebar templates for creating new projects. New projects will...
David Reid [Mon, 18 Oct 2010 20:31:27 +0000 (13:31 -0700)] 
Lots of work on using rebar templates for creating new projects.  New projects will use rebar and automatically include mochiweb as a dep.

11 years agoUse rebar to build and test mochiweb
David Reid [Wed, 13 Oct 2010 16:09:14 +0000 (09:09 -0700)] 
Use rebar to build and test mochiweb

11 years agoMerge branch 'pu'
Bob Ippolito [Wed, 13 Oct 2010 12:04:27 +0000 (20:04 +0800)] 
Merge branch 'pu'

11 years agoFix for bug when parsing attributes without a name
Jeroen Koops [Wed, 13 Oct 2010 10:08:15 +0000 (18:08 +0800)] 
Fix for bug when parsing attributes without a name

There is a bug when parsing HTML tags with attributes wihout a name --
either because the author forgot to include the attribute's name (it
happens!) or because they forgot the whitespace between the tagname
and the attribute-name:

<body ="black">
or
<liclass="first">

Parsing this would cause an exit with a function-clause error.

This patch fixes it in such a way that at least the parse succeeds,
although the parsed attribute-names and values are probably not what was
intended by the HTML author.

11 years agoMerge branch 'pu'
Bob Ippolito [Tue, 12 Oct 2010 09:20:08 +0000 (17:20 +0800)] 
Merge branch 'pu'

11 years agofix vsn in pu
Bob Ippolito [Tue, 12 Oct 2010 09:18:51 +0000 (17:18 +0800)] 
fix vsn in pu

11 years agoMerge branch 'pu'
Bob Ippolito [Tue, 12 Oct 2010 09:17:31 +0000 (17:17 +0800)] 
Merge branch 'pu'

11 years agopass _ instead of empty string for make_app argument http://github.com/mochi/mochiweb...
Bob Ippolito [Tue, 12 Oct 2010 09:17:13 +0000 (17:17 +0800)] 
pass _ instead of empty string for make_app argument github.com/mochi/mochiweb/issues#issue/17

11 years agotag 1.4.0 1.4.0
Bob Ippolito [Tue, 12 Oct 2010 01:46:09 +0000 (09:46 +0800)] 
tag 1.4.0

11 years agoMerge branch 'master' into pu
Bob Ippolito [Tue, 12 Oct 2010 01:41:22 +0000 (09:41 +0800)] 
Merge branch 'master' into pu

11 years agoFixes a bug when parsing an unquoted attribute value starting with a slash.
unknown [Mon, 11 Oct 2010 09:26:51 +0000 (17:26 +0800)] 
Fixes a bug when parsing an unquoted attribute value starting with a slash.

For example, parsing <img src=/images/icon.png> would exit with a
** exception error: bad argument
     in function  iolist_to_binary/1
             called as iolist_to_binary({data,"/",false})

The error was introduced by commit d064e459da7665d8dd7a.

11 years agoclear ?SAVE_BODY_LENGTH http://github.com/mochi/mochiweb/issues#issue/16
Bob Ippolito [Tue, 12 Oct 2010 01:38:34 +0000 (09:38 +0800)] 
clear ?SAVE_BODY_LENGTH github.com/mochi/mochiweb/issues#issue/16

11 years agoMerge branch 'pu'
Bob Ippolito [Fri, 8 Oct 2010 08:07:56 +0000 (16:07 +0800)] 
Merge branch 'pu'

11 years agotest for http://github.com/mochi/mochiweb/pull/13
Bob Ippolito [Fri, 8 Oct 2010 08:06:56 +0000 (16:06 +0800)] 
test for http://github.com/mochi/mochiweb/pull/13

11 years agoThis is a fix for mochiweb_html:parse/1 getting in an infinite loop when encountering...
unknown [Mon, 4 Oct 2010 11:51:10 +0000 (19:51 +0800)] 
This is a fix for mochiweb_html:parse/1 getting in an infinite loop when encountering some sorts of invalid HTML.

12 years agoMerge branch 'pu'
Bob Ippolito [Wed, 29 Sep 2010 15:23:20 +0000 (23:23 +0800)] 
Merge branch 'pu'

12 years agoFix ambiguity when calling of overridden auto-imported BIF error/1
Peter Lemenkov [Wed, 29 Sep 2010 14:47:27 +0000 (22:47 +0800)] 
Fix ambiguity when calling of overridden auto-imported BIF error/1
on R14B.

See also compilation log:

http://koji.fedoraproject.org/koji/getfile?taskID=2496796&name=build.log

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
12 years agointeger-only frexp path, fix for github issue 10
Bob Ippolito [Tue, 21 Sep 2010 07:13:06 +0000 (15:13 +0800)] 
integer-only frexp path, fix for github issue 10

12 years agoMerge branch 'pu'
Bob Ippolito [Mon, 20 Sep 2010 10:14:24 +0000 (18:14 +0800)] 
Merge branch 'pu'

12 years agoSecure fdsrv invocation.
Peter Lemenkov [Sun, 19 Sep 2010 13:41:53 +0000 (21:41 +0800)] 
Secure fdsrv invocation.

In most setups seen by me so far fd_server isn't available so in
this rare sutuation when mochiweb will call fdsrv it will die.
This patch prevents it from sudden death.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
12 years agoMerge branch 'pu'
Bob Ippolito [Sun, 19 Sep 2010 02:06:23 +0000 (11:06 +0900)] 
Merge branch 'pu'

12 years agosupport get_modules request in socket_server, since we have a dynamic modules request...
Richard Jones [Wed, 8 Sep 2010 09:07:23 +0000 (17:07 +0800)] 
support get_modules request in socket_server, since we have a dynamic modules request (needed by release_manager)

12 years agoMerge branch 'pu'
Bob Ippolito [Fri, 17 Sep 2010 02:10:30 +0000 (11:10 +0900)] 
Merge branch 'pu'

12 years agotail call on timeout
Bob Ippolito [Fri, 17 Sep 2010 02:10:18 +0000 (11:10 +0900)] 
tail call on timeout

12 years agoMerge branch 'pu'
Bob Ippolito [Sun, 5 Sep 2010 13:25:30 +0000 (21:25 +0800)] 
Merge branch 'pu'

12 years agoremove redundant call to norm().
jlo [Mon, 30 Aug 2010 09:52:52 +0000 (17:52 +0800)] 
remove redundant call to norm().
more tests and improved test code coverage.

12 years agoMake tokenizer case insensitive. Output tokens in lowercase.
jclopes [Wed, 25 Aug 2010 16:27:06 +0000 (00:27 +0800)] 
Make tokenizer case insensitive. Output tokens in lowercase.
Added new test case.

12 years agovalidate input strings containing escape characters
Adam Kocoloski [Tue, 31 Aug 2010 04:35:47 +0000 (12:35 +0800)] 
validate input strings containing escape characters

12 years agoMerge branch 'pu'
Bob Ippolito [Mon, 23 Aug 2010 13:02:21 +0000 (21:02 +0800)] 
Merge branch 'pu'

12 years agoUse constants instead of hard-coded values.
Filipe David Manana [Fri, 20 Aug 2010 19:24:46 +0000 (03:24 +0800)] 
Use constants instead of hard-coded values.

12 years agoFix improper conversion from int to string (should be string to int)
Peter Lemenkov [Tue, 17 Aug 2010 10:02:17 +0000 (18:02 +0800)] 
Fix improper conversion from int to string (should be string to int)

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
12 years agonotes about compatibility
Bob Ippolito [Sat, 14 Aug 2010 13:56:50 +0000 (21:56 +0800)] 
notes about compatibility

12 years agoMerge branch 'pu'
Bob Ippolito [Sat, 24 Jul 2010 14:53:33 +0000 (07:53 -0700)] 
Merge branch 'pu'

12 years agofix implementation of http://code.google.com/p/mochiweb/issues/detail?id=73
Bob Ippolito [Sat, 24 Jul 2010 14:53:14 +0000 (07:53 -0700)] 
fix implementation of code.google.com/p/mochiweb/issues/detail?id=73

12 years agoMerge branch 'pu'
Bob Ippolito [Fri, 23 Jul 2010 22:56:08 +0000 (15:56 -0700)] 
Merge branch 'pu'

12 years agoMerge branch 'html-71' into pu
Bob Ippolito [Fri, 23 Jul 2010 22:55:27 +0000 (15:55 -0700)] 
Merge branch 'html-71' into pu

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=71
Bob Ippolito [Fri, 23 Jul 2010 22:54:53 +0000 (15:54 -0700)] 
code.google.com/p/mochiweb/issues/detail?id=71

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=73
Bob Ippolito [Fri, 23 Jul 2010 21:53:46 +0000 (14:53 -0700)] 
code.google.com/p/mochiweb/issues/detail?id=73

12 years agoMake start-dev.sh work on BSD systems
Silas Silva [Sat, 17 Jul 2010 20:27:42 +0000 (04:27 +0800)] 
Make start-dev.sh work on BSD systems

In BSD, GNU make is normally named gmake.  In start-dev.sh, check if we
are in a BSD system set call gmake instead of make if the system is BSD.

12 years agoadd _test to gitignore
Bob Ippolito [Mon, 12 Jul 2010 17:53:31 +0000 (10:53 -0700)] 
add _test to gitignore

12 years agotest and fix for json encoding of large integers
Chris Anderson [Sun, 11 Jul 2010 15:49:18 +0000 (23:49 +0800)] 
test and fix for json encoding of large integers

12 years agoFix for Erlang/OTP R14A
Peter Lemenkov [Mon, 12 Jul 2010 10:12:18 +0000 (18:12 +0800)] 
Fix for Erlang/OTP R14A

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
12 years agoMerge branch 'master' of ssh://git.mochimedia.net//data/git/mochi/mochiweb
David Reid [Fri, 2 Jul 2010 16:50:03 +0000 (09:50 -0700)] 
Merge branch 'master' of ssh://git.mochimedia.net//data/git/mochi/mochiweb

12 years agoHandle enotconn when doing Req:get(peer)
David Reid [Fri, 2 Jul 2010 16:48:30 +0000 (09:48 -0700)] 
Handle enotconn when doing Req:get(peer)

12 years agohttp://github.com/mochi/mochiweb/issues#issue/1
Bob Ippolito [Tue, 22 Jun 2010 15:25:36 +0000 (08:25 -0700)] 
http://github.com/mochi/mochiweb/issues#issue/1

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=76
Bob Ippolito [Wed, 9 Jun 2010 16:16:53 +0000 (09:16 -0700)] 
code.google.com/p/mochiweb/issues/detail?id=76

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=75
Bob Ippolito [Wed, 9 Jun 2010 15:31:12 +0000 (08:31 -0700)] 
code.google.com/p/mochiweb/issues/detail?id=75

12 years ago.gitignore and Makefile fix
Bob Ippolito [Mon, 7 Jun 2010 18:32:12 +0000 (11:32 -0700)] 
.gitignore and Makefile fix

12 years agomochilogfile2 module
Bob Ippolito [Mon, 7 Jun 2010 18:30:09 +0000 (11:30 -0700)] 
mochilogfile2 module

12 years agore #13527 cmd_status should clean up port
Bob Ippolito [Fri, 21 May 2010 23:04:55 +0000 (23:04 +0000)] 
re #13527 cmd_status should clean up port

12 years agoadd back binary support to mochiweb_util:join/2
Bob Ippolito [Tue, 18 May 2010 01:00:51 +0000 (01:00 +0000)] 
add back binary support to mochiweb_util:join/2

12 years agochange nodelay default to false
Bob Ippolito [Mon, 17 May 2010 16:53:26 +0000 (16:53 +0000)] 
change nodelay default to false

12 years agosvn merge https://mochiweb.googlecode.com/svn/branches/acceptor-11334 .
Bob Ippolito [Fri, 14 May 2010 21:50:44 +0000 (21:50 +0000)] 
svn merge https://mochiweb.googlecode.com/svn/branches/acceptor-11334 .

12 years agoreload_modules/1
Bob Ippolito [Mon, 10 May 2010 22:12:52 +0000 (22:12 +0000)] 
reload_modules/1

12 years agoreloader:all_changed/0 reloader:is_changed/1
Bob Ippolito [Mon, 10 May 2010 20:50:23 +0000 (20:50 +0000)] 
reloader:all_changed/0 reloader:is_changed/1

12 years agoset vsn to 1.3
Bob Ippolito [Fri, 7 May 2010 21:47:27 +0000 (21:47 +0000)] 
set vsn to 1.3

12 years agouse mochiweb.app.src for rebar tip compatibility
Bob Ippolito [Fri, 7 May 2010 21:06:00 +0000 (21:06 +0000)] 
use mochiweb.app.src for rebar tip compatibility

12 years agore #13095
Bob Ippolito [Thu, 29 Apr 2010 21:29:03 +0000 (21:29 +0000)] 
re #13095

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=70
Bob Ippolito [Thu, 22 Apr 2010 01:50:34 +0000 (01:50 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=70

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=69 (minor modification to patch)
Bob Ippolito [Mon, 12 Apr 2010 04:33:33 +0000 (04:33 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=69 (minor modification to patch)

12 years agoadd crypto and inets to the application list
Bob Ippolito [Sat, 3 Apr 2010 18:38:31 +0000 (18:38 +0000)] 
add crypto and inets to the application list

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=19
Bob Ippolito [Tue, 30 Mar 2010 20:30:54 +0000 (20:30 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=19

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=68
Bob Ippolito [Tue, 30 Mar 2010 20:27:37 +0000 (20:27 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=68

12 years agonew mochiglobal module to exploit sharing
Bob Ippolito [Sun, 28 Mar 2010 04:21:42 +0000 (04:21 +0000)] 
new mochiglobal module to exploit sharing

12 years agomore utf8 functionality
Bob Ippolito [Sat, 27 Mar 2010 19:00:42 +0000 (19:00 +0000)] 
more utf8 functionality

12 years agomore coverage, new mochiutf8:codepoint_to_bytes/1
Bob Ippolito [Sat, 27 Mar 2010 03:00:50 +0000 (03:00 +0000)] 
more coverage, new mochiutf8:codepoint_to_bytes/1

12 years agomore coverage for mochiweb_html
Bob Ippolito [Thu, 25 Mar 2010 18:13:28 +0000 (18:13 +0000)] 
more coverage for mochiweb_html

12 years agomore coverage for mochiweb_multipart
Bob Ippolito [Thu, 25 Mar 2010 17:32:50 +0000 (17:32 +0000)] 
more coverage for mochiweb_multipart

12 years agomore refactoring, new mochitemp module for creating and removing temporary directories
Bob Ippolito [Thu, 25 Mar 2010 05:45:53 +0000 (05:45 +0000)] 
more refactoring, new mochitemp module for creating and removing temporary directories

12 years agoadd mochilists module and a few more tests
Bob Ippolito [Wed, 24 Mar 2010 20:32:12 +0000 (20:32 +0000)] 
add mochilists module and a few more tests

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=67
Bob Ippolito [Mon, 22 Mar 2010 11:04:33 +0000 (11:04 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=67

12 years agosanitize UTF-8
Bob Ippolito [Sat, 13 Mar 2010 19:34:55 +0000 (19:34 +0000)] 
sanitize UTF-8

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=66
Bob Ippolito [Fri, 26 Feb 2010 21:35:42 +0000 (21:35 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=66

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=65
Bob Ippolito [Fri, 26 Feb 2010 21:31:18 +0000 (21:31 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=65

12 years agohttp://code.google.com/p/mochiweb/issues/detail?id=64
Bob Ippolito [Fri, 19 Feb 2010 04:14:16 +0000 (04:14 +0000)] 
code.google.com/p/mochiweb/issues/detail?id=64