Yaws

Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for dynamic-content web applications. Two separate modes of operations are supported:

Yaws is entirely written in Erlang, and furthermore it is a multithreaded webserver where one Erlang lightweight process is used to handle each client.

The main advantages of Yaws compared to other Web technologies are performance and elegance. The performance comes from the underlying Erlang system and its ability to handle concurrent processes in an efficent way. Its elegance comes from Erlang as well. Web applications don't have to be written in ugly ad hoc languages.

yaws.hyber.org

The www page for Yaws is yaws.hyber.org. The documentation, examples as well as releases can be found there, and of course, yaws.hyber.org is itself powered by Yaws.

Code is on : http://github.com/klacke/yaws

Travis test results at :https://travis-ci.org/klacke/yaws

A mailing list exists at: https://lists.sourceforge.net/lists/listinfo/erlyaws-list

A lot of excellent engineers have contributed to Yaws over the years, we keep a list of all contributors

A high resolution logo created by Tomas Selander exists at yaws.eps

News

To see all the most recent changes and activity in Yaws development, please visit the Yaws github repository.

Version yaws-2.0.2 Date: Wed Oct 7 23:51:35 2015 +0200


commit 9ec1435


Author: Klacke klacke@tail-f.com>
Date: Wed Oct 7 23:49:27 2015 +0200
Reworked the change-notes generator

commit e17953d


Author: Klacke klacke@tail-f.com>
Date: Wed Oct 7 14:04:27 2015 +0200
Prepare for 2.0.2

commit 866ce0d


Author: Kristoffer Koch kristoffer.koch@gmail.com>
Date: Sat Oct 3 15:28:07 2015 +0200
Use binary:compile_pattern for multipart messages

Remove the (elegant) bm_start and bm_find in favor of
binary:compile_pattern and binary_match to find multipart
boundaries. My simple measurements shows that this improves
performance about 33 times for multipart boundary searching.

commit 6505731


Author: Kristoffer Koch kristoffer.koch@gmail.com>
Date: Sat Oct 3 12:33:32 2015 +0200
Add multipart benchmark

commit 620c55a


Author: Klacke klacke@tail-f.com>
Date: Thu Oct 1 21:25:19 2015 +0200
Rewrote the news generator on yaws landing page

commit 331b95d


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 30 09:23:19 2015 -0400
Fix #239: return 400 for missing Host header

If the global conf variable pick_first_virthost_on_nomatch is set to
false and a request has no Host header or has multiple Host headers,
return 400 Bad Request. Add new tests for this scenario and modify the
docs where needed.

Note that pick_first_virthost_on_nomatch is true by default. The way
Yaws behaves when pick_first_virthost_on_nomatch is true is
unchanged. If you want the 400 Bad Request behavior, you must change
your configuration to set pick_first_virthost_on_nomatch to false.

commit 6e26dc0


Author: Christopher Faulet cfaulet@qualys.com>
Date: Thu Oct 1 10:36:37 2015 +0200
Fix error in yaws_log_file_h introduced by the PR #241

The pull request #241 tried to fix the commit 0d61db6. But a bug was always
here. This patch really fixes the bug and a unit test was added to be sure.

commit 6cd2801


Author: Johannes Weißl jargon@molb.org>
Date: Thu Oct 1 01:32:41 2015 +0200
Fix error in yaws_log_file_h (cf. 0d61db6)

commit 5fa0af7


Author: Klacke klacke@tail-f.com>
Date: Wed Sep 30 20:34:12 2015 +0200
JIT compile error in yapp docs. yaws file

Version yaws-2.0.1 Date: Wed Sep 30 09:34:11 2015 +0200


commit 9a527e9


Author: Klacke klacke@tail-f.com>
Date: Wed Sep 30 09:33:05 2015 +0200
Prepare for rel 2.0.1

commit d88933e


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Mon Sep 28 22:11:16 2015 +0200
Add Erlang/OTP 18.1 support in .travis.yml

commit 0d61db6


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Mon Sep 28 21:58:09 2015 +0200
Fix yaws_log_file_h module for Erlang release 18.1

In 18.1, the internal state of the error_logger_file_h module has
changed. Because yaws_log_file_h module is a wrapper around it, we must handle
all versions, pre-18.1 and post-18.1.

Fix #240

commit 76cb149


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 7 11:09:15 2015 -0400
Fix #238: use text/xml as SOAP MIME type

commit 01c5f89


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Thu Aug 27 20:11:09 2015 +0200
Fix link of the travis status image in README.md

[ci skip]

commit ab417eb


Author: Klacke klacke@tail-f.com>
Date: Thu Aug 27 12:05:12 2015 +0200
Include URL to travis

commit cc66371


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Aug 26 21:29:44 2015 +0200
Use container-based infrastructure of travis-ci

commit 4ddc61f


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Aug 26 21:29:12 2015 +0200
Add Erlang/OTP 17.4, 17.5 and 18.0 support in .travis.yml

commit 343c79d


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Aug 26 21:28:32 2015 +0200
Fix some small bugs in Makefiles

* src/Makefile.am: yaws.erl is used to generate mime_types.erl so it must be
compiled first.

* test/t12/Makefile.am: Add missing file in EXTRA_DIST

commit caf47d8


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Aug 26 21:27:27 2015 +0200
Retrieve debug env variable before creating the global config record

This is required to set cache_refresh_secs to 0 when debug is set to true and
when Yaws is started in embedded mode. Fixes #221.

commit 1530c4a


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Aug 26 10:26:01 2015 -0400
Add new test t13 for max_connections fixes

Added test/t13 rather than fitting the test into an existing test
directory because max_connections is a global setting in yaws.conf,
and so it would affect all other tests in the same directory.

commit ce6c608


Author: Andrei Neculau andrein@tail-f.com>
Date: Thu May 21 13:50:24 2015 +0200
Catch a einval badmatch triggered by yaws:setopts/3

inet/ssl:setopts would return {error, einval} when the socket is closed.
This can be noticed by setting max_connections to a low-enough level.

commit d2ad152


Author: Andrei Neculau andrein@tail-f.com>
Date: Thu May 21 13:49:53 2015 +0200
Always decrement the connection counter when a request crashes. Fixes #218.

commit 0834b57


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Aug 24 14:34:21 2015 -0400
Documentation changes

Remove obsolete note about future work in yapp intro. Update minimum
Erlang/OTP release from R8 to R14B02 and do some minor rewording of a
warning in yaws.tex.

commit 786a1b9


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Tue Mar 17 08:54:04 2015 +0100
use only size and mtime for generating etags

commit 6e029f4


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Aug 23 21:21:04 2015 -0400
Add new known warnings to known_dialyzer_warnings

commit 3cbffcf


Author: Leo Liu sdl.web@gmail.com>
Date: Fri Jul 3 09:56:04 2015 +0800
Support the SSL server option client_renegotiation

This option is new with Erlang/OTP 18.0, so it's ignored for older
versions.

commit 510d8af


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Aug 23 18:23:04 2015 -0400
Fix intermittent websocket test failure

The "too big message" test was failing intermittently due to what
looks like a race condition on which end was closing the socket
first because of the illegal message size.

commit 4046f0d


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Aug 23 18:20:19 2015 -0400
Fix yaws_vdir.erl include directive

Recent versions of rebar were correctly unhappy with a malformed
include_lib in yaws_vdir.erl. Looks like this file was missed in a
previous edit to fix this problem. Changed to a regular include
instead, matching other source files.

commit 6713aa8


Author: Yury Gargay yury.gargay@gmail.com>
Date: Wed Apr 8 17:34:54 2015 +0600
Add yaws_api:websocket_close/1,2

Add API for closing a websocket. Add underlying implementation
yaws_websockets:close/2.

Also fixed some minor typos and indentation problems in various
websockets-related example files and docs.

commit fea78ab


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Wed Mar 18 13:24:29 2015 +0100
add check for have_sendfile

commit 5fdbf40


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Tue Mar 17 08:58:12 2015 +0100
added cast to prevent solaris warnings

commit 19de530


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Aug 22 09:26:20 2015 -0400
fix typos in yaws.tex

commit e45922b


Author: Attila Gulyas toraritte@gmail.com>
Date: Fri Aug 14 16:13:40 2015 -0700
Fix typos

Fix typos in in man/yaws.conf.5, and fix 2 news headers on index page
(www/news) by removing 3 empty lines.

commit 21ab0a1


Author: PHO pho@cielonegro.org>
Date: Fri Aug 21 16:13:31 2015 +0900
Revert "Fix HTTP authentication when user-defined module is used"

This reverts commit 6cfcabd46a1db887e442130ba271d9831e4a5cd2.

After the said commit being introduced, user-defined authmod modules stopped working due to record type mismatch {badrecord,auth}. I edited the test t3 so that we can prevent this sort of error. This fixes #232.

commit 4fc604d


Author: Attila Gulyas toraritte@gmail.com>
Date: Sun Aug 16 13:30:59 2015 -0700
UTF-8 fix for www/yman.yaws and served man pages

Yaws built with autotools or rebar would crash while trying to
serve man pages if os:cmd/1 returned utf-8 encoded strings.

- www/yman.yaws
Using unicode:characters_to_binary/1 for correct encoding
Issue https://github.com/klacke/yaws/issues/212 solves
this in a similar way.

- www/TAB.inc
Changed charset to utf-8 in head> to handle splitting
long words in line boundary ("â" => "-").

As far as I know unicode:characters_to_binary(Data) wouldn't
be a problem even if the input is in latin1 because according
to the doc:
Data = latin1_chardata() | chardata() | external_chardata()

ISO-8859-1 is also compatible with UTF-8 therefore changing
the charset shouldn't be the problem either.

commit 0955833


Author: Attila Gulyas toraritte@gmail.com>
Date: Thu Aug 13 23:08:27 2015 -0700
Fix typos in www/appmod.yaws

commit 8d4e2ab


Author: Ev Bogdanov evbogdanov@yahoo.com>
Date: Sun Aug 2 21:01:35 2015 +0300
Add support for binary and unicode FCGI params

Allow names and values in FCGI extra_env parameter lists to be either
lists or binaries, and handle them properly as unicode as well. Fix
the documentation for extra_env in yaws_api.5. Change the comment
describing extra_env in yaws_api.erl to note that binaries are allowed
too.

commit 35e3fea


Author: PHO pho@cielonegro.org>
Date: Mon Aug 3 15:00:59 2015 +0900
New ssl option for yaws.conf: dhfile

A fixed 1024-bit Diffie-Hellman group can no longer be considered to
be safe (*1). Add the dhfile option (*2) to yaws.conf.

*1: https://weakdh.org/sysadmin.html
*2: http://www.erlang.org/doc/man/ssl.html

commit b08bdd5


Author: Klacke klacke@tail-f.com>
Date: Fri Jul 17 12:48:11 2015 +0200
crashmsg too silent

We should always write crash messages to the error log.

Version yaws-2.0 Date: Mon Jul 13 19:50:08 2015 +0200


commit 20585c2


Author: Klacke klacke@tail-f.com>
Date: Mon Jul 13 19:45:26 2015 +0200
Add quotes to Makefile.am when building rels

commit 89b4374


Author: Klacke klacke@tail-f.com>
Date: Mon Jul 13 19:35:50 2015 +0200
Yaws 2.0 release work

commit b601eb3


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jul 13 07:06:14 2015 -0400
Update known dialyzer warnings for Erlang 18.0 changes

commit 316b4c6


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jul 11 18:27:22 2015 -0400
Fix Yaws build for Erlang 18.0

Erlang 18.0 deprecated erlang:now/0 and this was causing compilation
errors for Yaws. Add new portability functions to the yaws module:
yaws:unique_triple() returns a unique 3-tuple of positive integers,
and yaws:get_time_tuple() returns the current time in the same 3-tuple
format as erlang:now(). Fix all Yaws modules as needed to call these
functions as appropriate instead of calling erlang:now(). Add support
to configure.ac, include.mk, and rebar.config.script such that these
portability functions are correctly conditionally compiled depending
on the Erlang erts version in use.

commit e4a8499


Author: Mike mpustovalov@gmail.com>
Date: Thu Jun 4 18:54:50 2015 +0300
fix a bug where decoding of haxe string depended upon completely irrelevant native file system encoding

commit 99407cb


Author: Christopher Faulet cfaulet@qualys.com>
Date: Thu May 7 15:48:30 2015 +0200
Update rebar.config to require Erlang/OTP R14B02 or higher to compile Yaws

The requirement was added for the autotools (see ff010694), but not for Rebar.
This was an oversight on my part.

commit d053787


Author: Klacke klacke@tail-f.com>
Date: Thu Apr 30 00:14:30 2015 +0200
Fixed broken junk image

commit 8001863


Author: Christopher Faulet cfaulet@qualys.com>
Date: Wed Apr 29 09:39:24 2015 +0200
Renew self-signed ssl certificat to use the right signature algorithm

The old certificat was signed with sha256WithRSAEncryption algorithm, which is
not supported by Erlang releases older than R15B01. So the testsuite failed on
these releases.
The new certificate is signed with sha1WithRSAEncryption.

commit f6d26c6


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Mon Apr 27 21:33:17 2015 +0200
Check support for the SSL 'log_alert' option

This fix the commit 1bf94af6 for Erlang releases older than R16B02.

commit 6cfcabd


Author: Christopher Faulet cfaulet@qualys.com>
Date: Wed Apr 22 08:52:46 2015 +0200
Fix HTTP authentication when user-defined module is used

commit fd1325a


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Apr 16 13:49:07 2015 -0400
Fix #216: handle exhtml return values from out/1

Do not crash if out/1 returns exhtml. Add a new regression test for
this bug.

commit 021fae6


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Mon Apr 13 21:16:47 2015 +0200
Adapt previous Andrei patch to do more stuff during Yaws startup

And update the testsuite accordingly.

commit 2f057c6


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Sun Mar 22 21:58:25 2015 +0100
update expires docs

commit 26a608d


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Sun Mar 22 22:46:47 2015 +0100
allow expires type/*

commit eadc686


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Wed Mar 18 13:52:48 2015 +0100
allow expires */*

commit 1075411


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Wed Dec 10 22:56:32 2014 +0100
allow expires always

commit e17574f


Author: Klacke klacke@tail-f.com>
Date: Sat Mar 21 18:45:19 2015 +0100
spelling err in man page

commit a1e0004


Author: PHO pho@cielonegro.org>
Date: Fri Mar 20 13:09:54 2015 +0900
Fix possible XSS in yaws_outmod:crashmsg/3

Stacktraces have a dump of arguments for function calls
nowadays. Without escaping HTML special characters, it is possible to
make yaws_outmod:crashmsg/3 dump strings containing something like
"/pre>script>alert('Hello, XSS!')/script>" and thus results in a
XSS vulnerability.

commit 1bf94af


Author: Klacke klacke@tail-f.com>
Date: Thu Mar 12 20:04:48 2015 +0100
Silense on tls errors

These days, internet facing servers get SSL attacks, we should be
silent there and just drop connection attempt silently

commit 8fe395d


Author: Mike mpustovalov@gmail.com>
Date: Fri Mar 6 16:31:23 2015 +0300
fix external logger_mod module tried to init before ebin_dir is added to path

commit b2b50f6


Author: Milton Inostroza milinostroza@groupon.com>
Date: Fri Feb 13 18:10:07 2015 -0600
displays message when failing to parse it

commit 4f014b4


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Feb 12 20:46:41 2015 -0500
Add more documentation for arg_rewrite_mod

Add documentation for arg_rewrite_mod to the yaws.conf man page and
yaws.pdf, especially noting the use of the #rewrite_response{} record
for replying from a rewrite function.

commit bfc2bb0


Author: Klacke cwikstro@cisco.com>
Date: Sun Feb 8 14:33:54 2015 -0800
Updated authbind/privbind docs

commit cefd5bc


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Feb 3 16:31:02 2015 -0500
Fix SSL socket handling for dispatchmods

Fixed the code for invoking a dispatchmod to no longer assume the
socket is a non-SSL socket.

commit 1887597


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jan 31 04:26:04 2015 -0500
Make rebar account for 32-/64-bit builds

In rebar.config, use the rebar ERLANG_ARCH environment variable to
determine appropriate compiler/linker flags to match the 32- or 64-bit
build of the Erlang runtime in use.

commit d31e948


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jan 19 11:24:41 2015 -0500
Add yaws as a dep in node rebar.config template

commit 80903ff


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jan 19 11:18:59 2015 -0500
Ignore emacs backup files in .gitignore

commit c36e326


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jan 17 20:22:48 2015 -0500
For rebar, make ibrowse a dep only for Yaws dev mode

For rebar builds, rather than treating ibrowse as a normal dependency even
though it's used only for testing, make rebar.config.script check for the
existence of a .rebar/YAWS_DEV_MODE file and only if present, add ibrowse
as a dependency. This allows projects that use Yaws as a rebar dependency
to avoid having to pull in ibrowse.

(Credit goes to Seth Falcon for this idea; he added something like this to
the Basho webmachine project for a test-only dependency there, and I
borrowed his idea for Yaws.)

commit 5d755a6


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jan 4 18:38:02 2015 -0500
dialyzer changes

Remove no_debug_info from rebar.config to support dialyzer.

Fix known_dialyzer_warnings to compensate for latest source changes.

commit f54fe07


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Dec 18 14:35:43 2014 +0100
Renew self-signed ssl certificat

commit e1d9d8e


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Dec 18 11:53:45 2014 +0100
Add Erlang/OTP 17.3 support in .travis.yml

commit 06b3cb9


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Dec 18 11:46:22 2014 +0100
Add Andrei Neculau in the contributors (and sort them by name)

commit 9eed1d9


Author: Andrei Neculau andrei.neculau@gmail.com>
Date: Fri Dec 12 23:18:31 2014 +0100
Rework how SSL protocol_version is handled

* Don't ignore SSL protocol_version in embedded mode

* Stop setting global default SSL protocol_version

* Warning that R16B01 is required to SSL protocol_version
After testing R14B02+ with `application:set_env(ssl, protocol_version, X)`
and passing `versions` to `ssl:listen`, it looks like only R16B01+ follows
the settings.

References:
- https://travis-ci.org/capflam/otp-ssl-test/builds/44369449
- http://erlang.org/pipermail/erlang-questions/2014-October/081388.html
- https://github.com/klacke/yaws/pull/192

Fix pull request #193

commit ff01069


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Dec 16 16:06:00 2014 +0100
Require Erlang/OTP R14B02 or higher to compile Yaws

commit 5f867c9


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Sat Dec 13 09:20:14 2014 +0100
Use default notification policy for travis

commit 9b41c2a


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Dec 10 10:28:05 2014 +0100
Fix commit adb3c360

commit f4e71c2


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Dec 9 17:16:24 2014 +0100
Show report.log if yaws is not started during a test

commit ebcc532


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Dec 9 17:01:11 2014 +0100
Do not test Yaws anymore on R14B02 on Travis platform

It seems that we hit the bug OTP-9214 on Travis. This has worked in the
past. But now, for an unknown reason, the testsuite fails on R14B02 because of
this bug.

commit 2c77a45


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Dec 9 16:49:52 2014 +0100
Do not use hostname to generate default yaws configuration

Fix issue #191

commit 564a83d


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Dec 9 16:41:23 2014 +0100
Fix regular-install script by using $(logdir) variable

commit adb3c36


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Dec 9 16:28:33 2014 +0100
Properly handle Yaws installation if a previous version already exists

From version 1.99, /usr/lib/yaws is a symlink on
/usr/lib/erlang/lib/yaws-{VSN}. In previous versions, this was a directory. So
we must remove this directory to create the symlink at the right place.

Because this directory can contain user data, we rename it instead of removing
it.

commit ae830a2


Author: Craig Everett zxq9@zxq9.com>
Date: Wed Dec 3 10:39:41 2014 +0900
Update build instructions

The build instructions now comply with Christopher's notes
at http://sourceforge.net/p/erlyaws/mailman/message/32571909/

Version yaws-1.99 Date: Sun Nov 23 14:39:17 2014 +0100


commit 38a644c


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Nov 23 14:37:45 2014 +0100
Minor release tweak

commit 197307e


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Nov 14 22:42:18 2014 -0500
Add yapp appup and c_src *.d files to .gitignore

commit a21a69d


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Nov 14 22:38:05 2014 -0500
Add documentation and templates for rebar releases

Add the rebar-templates directory and the files it contains to provide
rebar templates for creating Erlang releases that use Yaws. Add
www/rebar_release.yaws to provide documentation for using the templates and
creating releases.

commit 5ddbba2


Author: Sebastian Godelet sebastian.godelet+github@gmail.com>
Date: Tue Nov 11 20:02:33 2014 +0800
Set file encoding for wiki application

Added encoding directive to correctly compile when configured with utf-8,
file applications/wiki/src/wiki.erl

commit 10dd428


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Nov 11 17:27:13 2014 +0100
Prepare for yaws 1.99

commit 1396986


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Nov 6 10:39:42 2014 +0100
Fix FCGI worker when an error occures during the response streaming

When a FCGI server is called, the response can be streamed by the fcgi
worker. Because yaws_cgi:fcgi_get_output/1 exits on error, if the exception is
not catched, the client connection will wait for a quite long timeout to be
closed.

commit e080033


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 16 10:43:17 2014 -0400
Add SSL protocol_version configuration element

Add protocol_version configuration element to allow supported protocols for
SSL servers to be specified.

Also add a new unit test for protocol_version.

commit 09e26e0


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 16 10:45:07 2014 -0400
Remove leftover io:format calls from ciphers config

commit e6e0ded


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Sep 25 17:22:42 2014 -0400
Fix #187: handle EINPROGRESS and EALREADY in sendfile driver

Thanks to Maas-Maarten Zeeman for reporting this.

commit 693b043


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Jul 30 11:10:47 2014 +0200
Update known dialyzer warnings

commit 9dec10f


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Jul 30 11:04:23 2014 +0200
Fix yaws_debug module to get debug dump on recent Erlang/OTP releases

commit 4bc84e3


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Jul 30 11:03:34 2014 +0200
Add --configtest option in Yaws script to check a configuration file

commit 7f2c4a1


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Jul 30 11:02:27 2014 +0200
Support subconfig/subconfigdir directives in the server part

commit 53db6c7


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Fri Jul 25 10:47:54 2014 +0200
Fix features detection when rebar is used

commit 1c065c4


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Thu Jul 24 16:43:23 2014 +0200
Add 'honor_cipher_order' option in ssl part

This option can be used to set to true/false the 'honor_cipher_order' parameter
on the ssl socket. This option was introduced in SSL application in Erlang/OTP
17.0, so it will be ignored by Yaws for previous releases. When supported, this
option is set by default to true.

commit 08156ba


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Sep 22 15:46:48 2014 +0200
Reloading the log could lead to an fd leak in the
case where we were having two servers on the same port,
i.e both http and https

commit a48c310


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 15 16:38:43 2014 -0400
Fix yaws_sendfile to correctly handle non-latin1 filenames

Fix a problem where a filename containing Chinese characters would cause
yaws_sendfile to die in a list_to_binary call.

commit 2dfbbb3


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 10 15:26:25 2014 -0400
Exclude hipe application in reltool.config

Several users have reported problems building releases using
rel/reltool.config due to problems with hipe, so extend reltool.config to
exclude hipe.

commit 769bc4b


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 10 15:25:53 2014 -0400
Add test/eunit/subconfig_DATA to .gitignore

commit d8fd203


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 10 15:23:32 2014 -0400
Document access logs as NCSA combined/XLF/ELF log format

commit f535e7f


Author: Johannes Weißl jargon@molb.org>
Date: Tue Aug 26 09:58:32 2014 +0200
Fix typo in configure help (`--disable-pam`)

commit c25095b


Author: Johannes Weißl jargon@molb.org>
Date: Tue Aug 26 09:58:21 2014 +0200
Fix building without PAM

Fixes this error in `make`:

/usr/bin/install: cannot stat epam: No such file or directory
make[1]: *** [post-build] Error 1

commit c8e37b5


Author: Johannes Weißl jargon@molb.org>
Date: Sat Aug 23 15:31:19 2014 +0200
yaws_api: Cosmetics (reduce redundancy)

commit 49d69b2


Author: Johannes Weißl jargon@molb.org>
Date: Sat Aug 23 14:49:52 2014 +0200
yaws_api: Allow binary attribute values in ehtml

Binary attribute values are already supported in exhtml.

commit b513bdd


Author: Johannes Weißl jargon@molb.org>
Date: Sat Aug 23 14:21:50 2014 +0200
yaws_api: Fix ehtml {check, _, number()} attributes

Attribute {check, Key, 10} should expand the same way as {Key, 10}.

commit cbbbdbe


Author: Johannes Weißl jargon@molb.org>
Date: Mon Aug 25 07:23:30 2014 +0200
Update and synchronize ehtml documentation

commit 89ce1d6


Author: Johannes Weißl jargon@molb.org>
Date: Wed Aug 20 13:42:27 2014 +0200
yaws_api: Make end tags HTML5-compatible in ehtml_expand

Currently, HTML generated by Yaws ehtml does not validate correctly as
HTML5 (e.g. using http://validator.w3.org/). The reason is that in HTML5
"void elements" like br> must not have a closing end tag:

Forbidden: br>/br>
Allowed: br>
Allowed (and also valid XHTML): br />

Also, since the self-closing tag syntax ("/>") is simply ignored in
HTML5, some elements must have an end tag:

Forbidden: p />
Allowed: p>/p>

This patch fixes both issues and also adds tests.

References:
- http://stackoverflow.com/questions/10598501/closing-tags-in-html5
- http://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br
- http://www.w3.org/TR/html-markup/syntax.html#void-element

commit 357ad6c


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Jul 23 14:28:13 2014 +0200
Use iolist_to_binary/iolist_size instead of custom functions

And avoid some useless conversions

commit 2fa5ead


Author: Jean-Sébastien Pédron jean-sebastien@yakaz.com>
Date: Wed Jul 23 14:56:17 2014 +0200
yaws_api: Fix matching of Content-Type in parse_post/1

"application/x-www-form-urlencoded" can be followed by attributes, such
as "; charset=UTF-8".

commit b8fd96c


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Mon Jul 21 18:07:17 2014 +0200
Update known dialyzer warnings

commit f77d932


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Mon Jul 21 17:58:26 2014 +0200
Split content data of FCGI records to be compliant with the spec

According to the FCGI specification, the size of the content data should be
lesser or equal to 65535.
See http://www.fastcgi.com/drupal/node/6?q=node/22#S3.3 for details.

commit a64236b


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 10 16:31:39 2014 +0200
Remove support of wildcards for R15B03 and previous

A bug in filelib:wildcard/1,2 was fixed in R16B:
https://github.com/erlang/otp/commit/70b5e24c

So, wildcard strings in the configuration file are now forbidden for older
releases.

commit e2a40fa


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 10 15:03:53 2014 +0200
Add the Travis build status in Readme.md

commit e81c94a


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 10 12:06:31 2014 +0200
Add support of wildcards and relative paths to load sub-config files.

Now, subconfig and subconfigdir targets accept relative paths, searched
relatively to the configuration location. So for the configuration
"/etc/yaws/yaws.conf", all relative files and directories will be searched from
"/etc/yaws". Of course, absolute paths are always supported.

furthermore, the subconfig target can take Unix-style wildcard strings to
include several files at once. See filelib:wildcard/1 for details.

Last, hidden files, starting by a dot, will be ignored in any cases.

commit 90e36db


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 10 11:57:58 2014 +0200
Check #deflate.min_compress_size option for large files

Now large files are compressed only if their size is greater than
the #deflate.min_compress_size option.

commit a3edbee


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Jul 8 15:43:35 2014 +0200
Relax rules that allow the parsing of a query string or an urlencoded body

The parsing of a query string or an urlencoded body was allowed, respectively,
for 'GET' or 'POST' requests. Now, this can be done for any kind of requests. Of
course, a body is parsed only if its Content-Type is set to
'x-www-form-urlencoded'.

In the same way, a body can now be parsed as a multipart content if its
Content-Type is set to 'multipart/form-data', regardless of the request type.

As a consequence of these changes, yaws_api:getvar/2 now returns the merged
result of values found in the query string and in the urlencoded body (if any).

commit 7630ffa


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Jul 1 11:04:02 2014 +0200
Keep the original request during an internal redirection

commit 5b362c4


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 23 10:27:47 2014 +0200
Add systemd service script and fix other init scripts

Other changes:
* Replace README by README.md
* Add travis configuration
* Fix testsuite and dependencies detection

commit 5f04abe


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 23 10:26:43 2014 +0200
Handle a bug in unicode module in releases R14B04 and previous

The code points 16#FFFE and 16#FFFF (not assigned but valid) are considered as
invalid in releases R14B04 and previous. So for these releases, the websockets
testsuite always failed. This commit worked around the bug.

It was fixed in OTP with the commit 34db767655:
https://github.com/erlang/otp/commit/34db767655

commit 26badd6


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 23 10:23:22 2014 +0200
Add yaws:hup/0 to allow Yaws reloads from another erlang module

commit 6e2a971


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 23 10:22:48 2014 +0200
Do not set recbuf by default on listening sockets

This patch removes a bug I experienced on FreeBSD during tests on the loopback
interface because of its MTU. So, I don't really know why that happens on
FreeBSD and not on Linux, but because loopback MTU is greater than the recbuf
value (16K on loopback vs 8k in Yaws), if a client sends data, Yaws will read
them very slowly.

Furthermore, there is no good reason to tweak this value by default. And, if
required, it is always possible to configure it.

commit 8ff00fe


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 23 10:22:03 2014 +0200
Fix a backward compatibility bug with inet:parse_strict_address/1

inet:parse_strict_address/1 was introduced in R16. For previous releases, we
need to rely on inet_parse:ipv4strict_address/1 and
inet_parse:ipv6strict_address/1 functions.

commit cba96bc


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Jun 10 16:44:58 2014 +0200
Massive autotools refactoring & cleanup

Now, all makefile are generated by automake. This way, many things are more
configurable and maintainable.

Main (visible) changes:

* Now, you can configure and compile Yaws outside the source directory. It is
also possible to generate an archive for distribution, using the 'dist' target
(from now, 'distcheck' target should always pass).

* We track .erl dependencies using '-M*' flags of ERLC.

* generated header 'yaws_configure.hrl' disappears. HAVE_SENDFILE,
HAVE_ERLANG_SENDFILE and HAVE_CRYPTO_HASH macros are defined in ERLC flags.

* yaws_generated:localinstall/0 function disappears (see comment about local
install).

* To create a windows installer, we just need to run the 'mkinstaller'
target. Read win32/README.developer for details.

* We use standard Erlang installation path for Yaws, relative to the erlang
library directory (/usr/lib/erlang/lib). Now, '$(libdir)/yaws' is a link. We
do the same for yapp application.

* "local install" was removed. Now, to do a "developer install", we just need
to set a prefix during the project configuration using --prefix option. So,
you need to install yaws to test it.

* DESTDIR variable is still supported.

* scripts/make-release was rewritten to use 'dist' and 'mkinstaller' targets.

* Installation of Yaws applications has slightly changed. Now they are
installed in their own directory, in '$(localstatedir)/yaws'. So, chat
application will be installed in '$(localstatedir)/yaws/chat', with 'www' and
'ebin' subdirs.

Main targets (others than all/install/clean....):

* all : compile Yaws
* debug : compile Yaws with debug flags
* clean : remove files produced by all or debug target
* install : do a proper install of Yaws
* doc or docs : build the documentation
* check or test : launch tests
* cleantest : remove files produced by check target
* dialyzer : run dialyzer on Yaws
* mkinstaller : build an installer for windows
* cleaninstaller: remove files produced by mkinstaller target
* apps : compile Yaws applications (chat,mail,wiki,yapp)
* cleanapps : remove files produced by apps target
* installapps : install Yaws applications
* fullinstall : install + installapps
* fullclean : clean + cleantest + cleanapps + cleaninstaller

To install an application, run: (cd application/{APP} && make install)

Of course, many things can be customized during configuration and Rebar still
works as expected. To do an install with (almost) the same tree than with
previous of Yaws, do:

$> ./configure yawsdir=${prefix}/lib/yaws yappdir=${prefix}/lib/yapp \
--sysconfdir=/etc --localstatedir=/var
$> make install

Here is the default installation tree on my debian:

   usr
     lib
        erlang
            lib
                yapp-0.4.2
                   doc/
                   ebin/
                   examples/
                   priv/docroot/
                yaws-1.98
                    ebin/
                    include/
                    priv/
                    examples/
    
     local/bin/yaws
    
     local/etc/init.d/yaws
     local/etc/yaws/
     local/etc/mail/yaws-webmail.conf
    
     local/lib/pkgconfig/yaws.pc
     local/lib/yapp -> /usr/lib/erlang/lib/yapp-0.4.2
     local/lib/yaws -> /usr/lib/erlang/lib/yaws-1.98
    
     local/share/doc/yaws/yaws.pdf
     local/share/man/{man1,man5}/
    
     local/var/log/yaws
     local/var/run/yaws
     local/var/yaws
         chat/{ebin,www}
         mail/{ebin,www}
         wiki/{ebin,www}
         www

commit c266017


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue May 27 18:49:55 2014 -0400
update known dialyzer warnings

commit 2e86da1


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue May 20 09:34:39 2014 -0400
convert non-ASCII characters in json2 decoding

Non-ASCII characters in JSON strings are now decoded to UTF-8.

commit e549f86


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 29 15:52:18 2014 -0400
fix broken rebar build

In commit cb493908 I broke the ability for yaws to be used as a rebar
dependency for other projects. Move src/yaws.app.src.in back to
src/yaws.app.src. Move the code in rebar.config.script to
src/yaws.app.src.script file to process the app dependencies for
src/yaws.app.src. Change src/Makefile to process app dependencies when
creating ebin/yaws.app.

commit 40313a4


Author: Richard Carlsson richardc@klarna.com>
Date: Tue Apr 22 16:05:48 2014 +0200
remove -vsn attributes to ensure the MD5 sum is used for all modules

commit 53fdbfe


Author: Jean-Sébastien Pédron jean-sebastien@yakaz.com>
Date: Wed Apr 9 17:31:05 2014 +0200
Add a nslookup_pref global parameter

This parameter allows to change the name resolution and connection
preference for fcgi servers and revproxy URLs. It takes a list of the
form [inet | inet6].

For instance, to perform only IPv4 resolution:
nslookup_pref = [inet]

To perform both IPv4 and IPv6, but try IPv6 first:
nslookup_pref = [inet6, inet]

The default value is [inet]. Therefore, the behavior remains the same
with this addition.

This parameter is used by two new functions:
o yaws:tcp_connect/{3,4}
o yaws:ssl_connect/{3,4}

They are wrappers around gen_tcp:connect/{3,4} and ssl:connect/{3,4} and
take care of connection retries for each configured family.

commit 2e662ff


Author: Jean-Sébastien Pédron jean-sebastien@yakaz.com>
Date: Wed Apr 9 17:24:26 2014 +0200
Accept an IPv6 between "[...]" as an fcgi server hostname

Here are some examples:
php_handler = fcgi, [::1]:9000>
fcgi_app_server = [::1]:9000

The square brackets syntax is already used in URLs (http://[::1]:8080/)
and allows to mix an IPv6 address and a port number.

While here, fix a bug in revproxy URL parsing where IPv6 between
brackets were considered as a syntax error.

commit ab4708c


Author: Jean-Sébastien Pédron jean-sebastien@yakaz.com>
Date: Mon Apr 14 16:11:09 2014 +0200
scripts/Install: Create ${etcdir}/rc.d on FreeBSD

If Yaws is installed in a non-standard directory, we must create
${etcdir}/rc.d before copying the init script there.

commit e00ac65


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 13 13:43:43 2014 -0400
update priv/mime.types from Apache

commit 02218b2


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 12 14:11:49 2014 -0400
allow a cleanup pid with replace_cookie_session

Add yaws_api:replace_cookie_session/3 and
yaws_session_server:replace_session/3 to allow the user to pass a cleanup
pid in order to associate a new cleanup process with the replacement
session. Thanks to Patrick Moy for suggesting this.

commit cb49390


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Apr 3 15:37:28 2014 -0400
allow extra app dependencies for yaws.app to be configured

Yaws can depend on crypto for random numbers and hashes, and on the
compiler for .yaws pages. But the default yaws.app file specifies only
kernel and stdlib as application dependencies, since not all Yaws
deployments use crypto or compiler. Still, if a Yaws system uses crypto and
compiler without including them in the yaws.app file, building and
deploying an Erlang/OTP release for that system will fail.

Add --enable-crypto and --enable-compiler options to the configure script
to allow the user to add either or both of these applications to the
yaws.app file. Specifying the --enable-crypto option also causes the Yaws
startup code to start the crypto application; likewise for
--enable-compiler and the compiler application.

For rebar builds, enhance rebar.config.script to generate the same files
the configure script generates for any extra app dependencies. Setting the
YAWS_APPDEPS environment variable to a space- or comma-separated list of
addition applications to add to yaws.app, e.g.

YAWS_APPDEPS='crypto compiler'

causes rebar to add those apps to the generated yaws.app file and ensure
they're started before Yaws started.

commit 52e7b4c


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 1 21:56:43 2014 -0400
dialyzer maintenance

Fix known dialyzer warnings. Also change Makefile dialyzer rule to make it
easier to see pass/fail results.

commit 36a3600


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Mar 27 10:16:56 2014 -0400
remove unused -DDYNAMIC_DRIVER from c_src/Makefile

Thanks to Richard Carlsson for pointing out this unused option.

commit db48102


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Mar 25 09:06:13 2014 -0400
add check for YAWS_DISABLE_PAM to rebar.config.script

Setting the OS environment variable YAWS_DISABLE_PAM to any value causes
rebar builds to avoid building pam. This is equivalent to using the
--disable-pam option with configure, and is useful for building in
environments where pam development files are not available.

commit 754f56e


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Mar 25 09:05:47 2014 -0400
add .rebar dir to .gitignore

commit f86bd40


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Mar 20 00:16:13 2014 -0400
fix #173: set ibrowse dep to v3.0.4 in rebar.config

Set ibrowse dependency to version 3.0.4 to match what test/Makefile
selects. Later versions do not work so well on OS X Mavericks.

commit dbd71df


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Mar 14 19:00:34 2014 -0400
fix #172: make yaws_ticker handle EXIT messages correctly

The yaws_ticker processes were not cleaned up due to an incorrect EXIT
message receive spec. Thanks to Nico Kruber for reporting the problem, and
for supplying a new regression test case which is now in the test/eunit
directory.

commit abce39c


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 12 13:06:16 2014 -0400
add virtual server redirect conf example to redirect.yaws

commit bdb7d0b


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 12 10:13:19 2014 -0400
change "rscheme" to "rmethod" in the docs

commit 3384055


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Mar 8 11:13:30 2014 -0500
handle filename encodings properly in dir listings

commit 615f94a


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Feb 26 09:05:24 2014 +0100
Adjust line numbers in known_dialyzer_warnings file

commit 68f1f7c


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Feb 26 08:45:29 2014 +0100
Respect virtual hosts order when the configuration is reloaded

During a reload, when a virtual host is added or updated, it must be at the same
position than in the configuration file. With this fix, it is possible to
reorder virtual hosts, or add new ones at any position.

commit 15a171f


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Feb 25 12:13:45 2014 +0100
Clean up the parsing of the ssl configuration

commit 2dcb7a5


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Feb 25 11:22:49 2014 +0100
Add 'secure_renegotiate' option in ssl part

This option can be used to set to true/false the 'secure_renegotiate' parameter
on the ssl socket.

commit 24a6229


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Feb 25 18:40:29 2014 -0500
dialyzer updates

Fix a dialyzer problem in yaws.erl and update the known_dialyzer_warnings
file.

commit b8c1875


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Feb 24 13:28:03 2014 -0500
replace charset.def with generated yaws_charset.hrl

Richard Carlsson pointed out in a private email that having configure
generate the priv/charset.def file to be read and interpreted by
src/mime_type_c.erl was overly complicated.

Modify configure script and rebar.config.script to instead generate
src/yaws_charset.hrl, and include that into src/mime_type_c.erl. Thanks to
Richard for suggesting these simplifications.

Also, enhance rebar.config.script to be able to extract the desired charset
from the YAWS_CHARSET OS environment variable if set, thus providing rebar
users a way to set the charset, which they couldn't do before.

Fix test/t2/app_test.erl to not fail on Content-Type header tests if the
header value contains a charset specification.

commit a311320


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Feb 5 20:24:28 2014 -0500
use ibrowse v3.0.4 for testing

On OS X (and perhaps elsewhere too) there were tons of false errors in the
test output, all coming from the ibrowse client complaining about closed
connections. This made it impossible to know whether the tests were
actually working or not. Instead of using ibrowse master, pin the version
the yaws tests use to 3.0.4, which doesn't exhibit this problem.

commit 2360e86


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Feb 4 10:47:41 2014 -0500
fix #168 by checking for pam headers and library

Make configure script check for the pam_appl.h header in multiple
directories, and add the directory in which it's found to CFLAGS. Ensure
the checking takes EXTRAINCLUDE settings into account. Remove
specifications of the /usr/include/pam include path from CFLAGS in the
configure script, and also from c_src/Makefile, as it's no longer necessary
to specify that path explicitly. Add EXTRAINCLUDE to CFLAGS and CPPFLAGS
when pam is enabled (note that adding it to CPPFLAGS is needed so the new
configure checking for pam_appl.h works correctly), and remove the addition
of EXTRAINCLUDE to CFLAGS in c_src/Makefile. Add check for pam library. Fix
checking of the --disable-pam configure option.

Thanks to Antoine Catton for starting the work on these changes.

commit 318f5a2


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jan 17 17:05:29 2014 -0500
combine multiple Accept-Encoding headers

According to HTTP 1.1 section 4.2, a receiver may combine multiple
instances of any header whose value can be a comma-separated list, which
applies to the case of receiving multiple Accept-Encoding headers. HTTPbis
in section 3.2.2 keeps the same rule. Yaws was using only the first such
header and ignoring any others, but should instead be combining the
multiple Accept-Encoding headers into one before processing the combined
value. This commit fixes that and adds a new test case for it.

commit ba8eba4


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Jan 7 15:23:52 2014 -0500
add Resources section to Yaws web pages

Add a Resources section to the Yaws web pages, where pointers/links to
external articles, presentations etc. about Yaws can be provided.

commit fbe25c5


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Dec 31 15:06:19 2013 -0500
fix error in code example in Yaws PDF doc

commit f17c891


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Dec 23 12:35:18 2013 -0500
add some embedded config details to embed.yaws

commit dea23d2


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Dec 18 20:51:14 2013 -0500
exclude ibrowse dialyzer build for testing

commit c978fe0


Author: Lastres ramonlastres@gmail.com>
Date: Wed Nov 20 16:57:17 2013 +0000
Change binary conversion function in yaws_rpc in order to deal with unicode characters

commit 556be77


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Dec 18 17:43:03 2013 -0500
minor edit of www/configuration.yaws

commit f29005b


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Dec 17 10:45:41 2013 +0100
Inefficient handling of the message queue and selective receive for untimed_stream_loop_send fixed by Martin Bjorklund.

commit 0043df3


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Nov 19 09:33:33 2013 +0100
proper include statement in yaws_stats.hrl that includes relative instead on relying on flags to erlc to find the included file

commit 73a2486


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Nov 10 14:56:54 2013 -0500
update cookie documentation

Documentation for cookies used the old yaws_api:setcookie functions, which
are deprecated. Change the docs to use yaws_api:set_cookie/3 instead. Also
add a little more detail to cookies.yaws regarding how
yaws_api:set_cookie/3 is used and what it returns.

commit c7576cd


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Nov 10 14:54:19 2013 -0500
replace now() with os:timestamp() in some places

The now() call requires global locking to ensure monotonicity, so replace
some calls to now() with calls to os:timestamp() where monotonicity isn't
required. There are probably other such calls in other modules that can be
similarly replaced.

Calculate size of data sent only when stats requires it.

commit ee0be8b


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Nov 7 19:52:15 2013 -0500
allow embedded listen IPs to be supplied as either lists or tuples

commit b3a6b24


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Nov 7 19:00:52 2013 -0500
fix broken srcdir tests

Commit a04e38a fixed building the tests with rebar, but broke the
test/t11/srcdir tests when built and run with make. This commit reworks the
approach to allow the tests to run correctly and also build correctly with
rebar.

commit 4c4f96e


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Nov 7 18:59:39 2013 -0500
generate empty priv/charset.def for rebar builds

commit 3cfbfd9


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Nov 7 18:35:48 2013 -0500
enhance "tests passed" messages to include test dir

commit 8f7e6de


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Nov 6 22:31:09 2013 -0500
change use of sendfile flag macros for Erlang R13

Change the use of the macros used to set sendfile configuration flags in
yaws_config.erl so the code works on older versions of Erlang/OTP,
specifically the R13 versions. Tested with R13B04.

Version yaws-1.98 Date: Mon Nov 4 19:27:39 2013 +0100


commit 0a9b80f


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Nov 4 19:26:06 2013 +0100
prepare for 1.98

commit 597544b


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Oct 30 17:16:00 2013 +0100
Bad HTTP 3.0 message sent to yaws, crashed the server entirely

commit a04e38a


Author: Joseph Wayne Norton norton@alum.mit.edu>
Date: Tue Oct 22 10:01:30 2013 -0500
rebar compile eunit compile_only=true fails for yaws

Changes to allow yaws to be compiled by rebar for eunit testing. This
change is helpful when embedding yaws as a dependency of an Erlang
application.

commit 4167754


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Oct 21 12:18:41 2013 +0200
Use Yaws linked-in driver by default to send large file

In a previous commit (c887a374), the use of sendfile (OTP and Yaws versions)
was disabled. The OTP version is buggy, so we recommand to not use
it. But the Yaws linked-in driver can safely be used. So, there is no reason
to not use it. Now, it is the default method.

commit 7aafdc5


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Oct 18 06:51:04 2013 -0400
fix rebar.config.script for YAWS_SOAP build

Version yaws-1.97 Date: Wed Oct 16 06:20:16 2013 +0200


commit c06e4d5


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Oct 16 06:19:20 2013 +0200
preparing for yaws 1.97

Version yaws-1.96 Date: Tue Oct 15 14:05:28 2013 +0200


commit 487ac67


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Oct 11 11:15:30 2013 +0200
Remove authmod_gssapi from the module list in src/Makefile

This module was moved a long time ago in example/src.

commit b57e288


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Oct 11 09:56:20 2013 +0200
Fix mime_types.erl generation for a local installation of Yaws

Without this fix, at the Yaws startup, the mime_types.erl generation fails
on windows when Yaws is installed using the installer. It also fails for
Yaws releases built with reltool (using rebar or autotools).

Fix issue #161.

commit ced32bf


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Oct 11 09:35:12 2013 +0200
Fix typo in yaws_sendfile module

commit 18b226d


Author: Susan Potter me@susanpotter.net>
Date: Sun Oct 6 22:27:19 2013 -0500
Add README.osx for instructions on installing on OSX using Homebrew

commit df2f67d


Author: Corey Haines coreyhaines@gmail.com>
Date: Sat Oct 5 13:02:35 2013 -0500
Add note about running rebar get-deps before rebar compile

I was trying to install with rebar compile and kept getting the failure
that the ibrowse dependency wasn't available. Once I did a rebar get-deps,
the rebar compile seemed to have gone through.

commit a8f37f2


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Tue Sep 10 21:57:32 2013 +0200
Adjust line numbers in known_dialyzer_warnings file

commit c887a37


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Tue Sep 10 21:22:17 2013 +0200
Add the way to configure the version of sendfile method to use

Now, at compile time, we only check if sendfile syscall and file:sendfile/5
are supported. Then, dynamically, we can configure which version to use.
This can be done using the directive large_file_sendfile. Supported values
are:

* erlang: if supported, use file:sendfile/5
* yaws: if supported, use the Yaws sendfile linked-in driver
* disable: do not use any sendfile method, but gen_tcp:send/2

If an unsupported method is configured, we fall back on gen_tcp:send/2.

file:sendfile/5 implementation is buggy (in R15 & R16). When async-threads
are enabled, in efile driver, the tcp socket is set in blocking mode and the
sendfile syscall is executed on an async-thread. So an unresponsive client
could block it for a very long time and therefore block the async-thread.
In this way, all async-threads could be easily blocked.
So, by default, the use of sendfile is disable.

commit 8081c35


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Fri Sep 6 21:49:03 2013 +0200
Add support of many options for tcp/ssl sockets

By adding a "listen_opts> ... /listen_opts>" block in vhosts
configuration, it is possible to define some options to be set on listen
sockets and, by inheritance, on accepted sockets. Supported options are
(see inet:setopts for details):

* buffer
* delay_send
* linger
* nodelay
* priority
* sndbuf
* recbuf
* send_timeout
* send_timeout_close

send_timeout / send_timeout_close options could be very useful to handle
unresponsive clients and thus avoid some sorts of DoS.

commit 42aa247


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Fri Sep 6 16:17:58 2013 +0200
Make the #gconf.large_file_chunk_size value be configurable

commit 849c606


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Sep 6 09:25:03 2013 +0200
Fix option to enable/disable sendfile support in the configure script

Now it is possible to disable sendfile in yaws passing the option
'--disable-senfile' (or '--enable-sendfile=no') to the configure script.
It is also possible to choose between the erlang implementation (the default)
and the yaws implementation.

commit c29f7ed


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 2 23:13:29 2013 -0400
minor yaws.tex edits

commit 2652585


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Mon Aug 26 21:45:14 2013 +0200
Document rebar use

commit 9e7e3e9


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Sun Jun 23 10:28:53 2013 +0200
rel: add Windows scripts

commit 45790e2


Author: Ning Zhang ning.m.zhang@gmail.com>
Date: Fri Aug 16 04:09:25 2013 -0400
fix a typo: "can be override" => "can be overridden"

commit 0244e95


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Thu Jul 18 19:50:24 2013 +0200
Fix a bug about log rotation. yaws_logger:do_rotate/2 was buggy.

commit 549ac43


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Jul 18 20:25:18 2013 +0200
Install procedure for FreeBSD wasn't correct

commit 19aed84


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jul 16 14:01:45 2013 +0200
Redhat /etc script bug fix by flavio-fernans

commit 75e834b


Author: Manuel Duran Aguete manuel@aguete.org>
Date: Mon Jul 15 14:24:50 2013 +0200
Incorrect X-Forwarded-For header

When X-Forwarded-For header appears multiple times in a request only the
last value is supplied by yaws_api:headers_x_forwarded_for/1.

RFC 2616 section 4.2 permits multiple headers with the same name as an
equivalent of one header with a comma-separated list of values.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

Pound loadbalancer ( http://www.apsis.ch/pound ) repeats the header.

Change yaws to collect all values for this header and present them as a
single comma-separated list. Add a regression test to test/t2.

commit 982107a


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Jul 11 15:35:09 2013 +0200
When max connections were reached and we attempt to close the socket, it was assumed we had a TCP socket, crashed on SSL sockets

commit 11b3b42


Author: Manuel Duran Aguete manuel@aguete.org>
Date: Tue Jul 9 08:59:58 2013 +0200
yaws_session_server:print_sessions/0 not working due incorrect message

commit e6bb751


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jul 5 15:30:27 2013 -0400
export yaws:setup_sconf/2 for yapp

The yapp application relies on the yaws:setup_sconf/2 function, but at some
point it was made private to yaws.erl. Export it so yapp works properly
again.

commit a6320a5


Author: James Lee jlee@thestaticvoid.com>
Date: Sun Jun 30 17:33:53 2013 -0400
Try to make the log directory if it doesn't exist

This uses @capflam's patch from https://github.com/klacke/yaws/pull/145
to create the log directory if specified like

logdir = +path/to/log

in the configuration file.

commit 673ac60


Author: Francis Joanis francis.joanis@gmail.com>
Date: Tue Jun 25 21:56:02 2013 -0400
Use proper linker command for drivers on OpenBSD

This fixes the "Cannot load specified object" / setuid_drv.so: undefined symbol '__guard_local' error that occurs on OpenBSD 5.3. It changes the LD_SHARED variable to use gcc rather than ld. A similar issue is documented here: http://erlang.org/pipermail/erlang-questions/2013-May/073837.html. Tested on OpenBSD 5.3 and FreeBSD 9.

commit f7a758a


Author: Johannes Weißl jargon@molb.org>
Date: Tue Jun 25 09:38:17 2013 +0200
Fix configure checks requiring module loading

After 98db40b the check outputs:

$ erl -noshell -eval 'code:load_file(file), io:format("~p~n",[[erlang:function_exported(file,sendfile,5)]]), erlang:halt().'
[true]

=ERROR REPORT==== 25-Jun-2013::09:40:51 ===
Can't load module that resides in sticky dir

Use code:ensure_loaded/1 instead as suggested by Tuncer Ayaz. Fix similar
module loading check in rebar.config.script.

commit 98db40b


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Jun 20 11:32:51 2013 -0400
changes for R16B01

In R16B01, crypto:sha/1 is deprecated in favor of crypto:hash/2, but the
latter is not available prior to R15B02. Change the configure script and
rebar support to look for crypto:hash/2 and use it if found, otherwise fall
back to crypto:sha/1.

Also in R16B01 the public_key application, used by some of the tests, now
requires the asn1 application to be started first. Change the tests to
accommodate that.

commit 5a66aa2


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Thu Jun 20 16:48:17 2013 +0200
rel: sync files with upstream templates

commit 7df6a9b


Author: Karolis Petrauskas karolis.petrauskas@etic.lt>
Date: Thu Jun 20 10:28:16 2013 +0300
Use crypto:hash instead of crypto:sha to be compatible with R16B1.

commit 4aa0061


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu May 30 14:41:01 2013 +0200
Group automatically the server configurations in embedded mode

Now, Yaws groups the server configurations by itself when it is started
in embedded mode. This is done when yaws_api:setconf/2 is called.

commit 83add25


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon May 6 11:01:46 2013 +0200
Support message body in DELETE requests

The HTTP/1.1 specification does not explicitly forbid message body in
DELETE requests.
In fact, it is only forbidden in TRACE requests (rfc2616 - section 9.8).
So GET, HEAD and OPTION requests could contain message body. But it needs
more work to support message body in these requests.

commit 529b97b


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon May 6 10:20:51 2013 +0200
Keep the original request in #arg{} and check it against auth rules

Because the request can be rewritten, it could be useful to backup the
original one. Appmods or Yaws scripts could access it by reading the field
orig_reg in #arg{}. For CGI scripts, the variable REQUEST_URI is now built
using the original request (SCRIPT_NAME, PATH_INFO and QUERY_STRING could
be used to know the info about the rewritten request, if needed).

The original request is also checked against the authorization rules. So, if
the request is rewritten, Yaws will check the original request and the
rewritten one. Access must be granted for both urls to accept the request.

commit e41fec6


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jun 4 07:39:51 2013 +0200
optimized ssi code by storing binaries as the data chunks instead of lists of chars

commit 5878ac6


Author: Rick Reed rr@whatsapp.com>
Date: Thu May 30 08:15:09 2013 -0700
Fix handling of multipart boundary markers at input boundaries

commit d702e96


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue May 21 12:25:58 2013 +0200
pam bug found by Jari Hellman

commit ed285eb


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon May 13 20:17:42 2013 +0200
point to github on main page

commit ab92cc8


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 10 23:09:04 2013 -0400
add encoding comments where needed (Nico Kruber)

For newer versions of Erlang, modules that contain non-UTF-8 characters
require appropriate encoding comments.

commit 4f5f767


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat May 11 00:15:51 2013 +0200
Patch from constantine.deribin@gooddata.com to allow extra modules for authentication

commit 8ed725e


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 3 17:12:32 2013 -0400
fix editing error in yaws.tex

commit 08b12ca


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Tue Apr 16 23:09:47 2013 +0200
Add the global directive 'src_dir' to define source directories

Yaws will compile all erlang modules found in these directories. The
compilation occurs when the configuration is loaded or reloaded. The
include_dir directives are used to search for include files. Multiple
src_dir directives may be used. There is no such directory configured by
default.

commit e4bbac3


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Apr 12 11:56:06 2013 +0200
Add 'Last-Modified' header only for static files or 304 responses

It is a partial rollback of the commit 89f3ea22.
The browsers seem to use this header to do aggressive cache (using some
strange heuristics), without doing any request to the server. IMHO, it is
a bug in browsers. Nevertheless, this header is useless for dynamic resources.
So we can skip it. When this header is meaningful for user's application, it
could be added explicitly.

commit 377f10d


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Apr 2 12:07:01 2013 +0200
Add serveralias directive

Now it is possible to set alternate names for a virtual host. A server alias
may contain wildcards:
- '*' matches any sequence of zero or more characters
- '?' matches one character unless that character is a period ('.')

Here is an example:

server server.domain.com>
serveralias = server server2.domain.com server2
serveralias = *.server.domain.com *.server?.domain.com
...
/server>

commit f657faf


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Apr 22 22:15:50 2013 -0400
enhance yaws_api:get_listen_port/1 documentation

commit e1d65ec


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 21 17:09:50 2013 -0400
fix spelling error in sconf access function name

commit 9926f8a


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 21 16:40:02 2013 -0400
add yaws_api:get_listen_port/1

For testing scenarios it can be useful to configure yaws to run on an
ephemeral port by setting the server port number to 0. Add the
yaws_api:get_listen_port/1 function to enable callers to retrieve the
actual port number of a server from its listen socket. The single argument
to the function is the #sconf{} record for the target server.

commit 9ce4859


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 21 15:36:20 2013 -0400
clean up & clarify code in yaws_api:setconf/3

commit 3489539


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Apr 8 18:07:16 2013 +0200
General whitespace and indent cleanup, removed trailing whitespace and constrained code to 80 cols

commit 2b2ad1f


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 7 11:36:33 2013 -0400
remove obsolete references to removed yaws_dav module

commit 43f8fe7


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 7 10:01:38 2013 -0400
fix dialyzer warnings

commit 9434c0c


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 7 10:00:43 2013 -0400
fix comment heads and some indentation in yaws_appmod_dav

commit 74a5b33


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 7 09:41:23 2013 -0400
increase server stop wait time for tests

Increase the server stop wait time in test/support/include.mk.in so that
it's long enough to work with debug builds.

commit 98ffe2f


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Apr 4 18:18:01 2013 -0400
fix compiler warnings in Yaws applications

commit a6706eb


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Mar 24 22:06:40 2013 -0400
Move WebDAV to an appmod, the locking server to a runmod (tjeerd)

All WebDAV functionality is moved to an appmod so the extension methods and
additional response headers are not part of yaws_server.erl and yaws.erl
anymore. Also the locking server is now a runmod so it is not started by
the supervisor and can be used only when needed.

Additionally the 100-Continue code is moved so it can be returned to all
requests that contain a body.

The WebDAV functionality is tested against the litmus test. All tests are
passed, except the ones that require unsupported properties. The test shows
this as a fail while returning 404 should be sufficient.

commit b6b38a6


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Mar 24 20:54:11 2013 -0400
add documentation of exhtml directive to yaws.tex (by tjeerd)

commit 19ad254


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Mar 19 18:02:01 2013 +0100
preparing for yaws 1.96

commit 9acc88e


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Mar 19 13:07:54 2013 +0100
Slightly better error messages on failed startup

commit bead34b


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 13 19:26:25 2013 -0400
add yaws_api:merge_header/2 and yaws_api:merge_header/3 funs

The merge_header functions allow HTTP headers and their values to be set
and combined in a #headers{} record.

commit 80b5767


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Mar 8 06:30:49 2013 -0500
fix overflowing line in yaws.tex

commit 729b1e4


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Mar 8 06:27:16 2013 -0500
fix issue #140

commit 1ec97b0


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Mar 3 15:32:34 2013 -0500
fix deprecated make_default_sconf/0 to return sconf, not gconf

commit 6015755


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Feb 27 10:06:50 2013 -0500
fix R16B dialyzer issue

commit a7acf19


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Feb 15 20:24:50 2013 +0100
spelling err

commit 9975e7b


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Feb 12 15:42:54 2013 +0100
Fix typo in documentation

commit 29a7989


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Dec 10 14:15:38 2012 +0100
Refactor WebSockets and add support of optional callback functions

Main changes:
* Fix some bugs about UTF-8 encoding and messages fragmentation
* Add support of optional callback functions
* Add support of many startup options
* Add support of outgoing fragmented messages
* Add a websocket testsuite

- * -
*** bug fixes ***

First of all, an huge part of yaws_websocket.erl was rewritten to fix bugs
about the messages fragmentation and the UTF-8 encoding of incoming text
messages:

* UTF-8 encoding
before, when a text message was fragmented, only the first frame was
checked and partial UTF-8 sequences were not supported. Now, checks
are done on each message part and a partial UTF-8 sequence at the end
of a frame is accumulated and checked with the next frame (for basic
callback only).

* Messages fragmentation
for basic callback modules, because of a buggy mapping between frames
and messages, the messages fragmentation was almost unusable. To fix
this, the message handling was rewritten.

Now, all tests in the autobahn testsuite[1] pass successfully.

- * -
*** Optional callback functions ***

Then, from an idea of François de Metz[2], yaws_websocket module was
extended to support optional callback functions. See the documentation for
details (www/websockets.yaws).

Quickly, optional callback functions are:

* Module:init/1 (for basic and advanced callback modules)
* Module:terminate/2 (for basic and advanced callback modules)
* Module:handle_open/2 (for basic and advanced callback modules)
* Module:handle_info/2 (for basic and advanced callback modules)
* Module:handle_message/2 (for basic callback modules only, used in place
of Module:handle_message/1)

Thanks to Pablo Vieytes[3] which added handle_info to optional callback
functions.
- * -
*** Startup options ***

To start a websocket process a script must return the following term from
its out/1 function:

{websocket, CallbackMod, Options}

where 'Options' is a (possibly empty) proplist. Following parameters are
supported:

* {origin, Orig}
* {callback, Type}
* {keepalive, Boolean}
* {keepalive_timeout, Tout}
* {keepalive_grace_period, Time}
* {drop_on_timeout, Boolean}
* {close_timeout, Tout}
* {close_if_unmasked, Boolean}
* {max_frame_size, Int}
* {max_message_size, Int}
* {auto_fragment_message, Boolean}
* {auto_fragment_threshold, Int}

See the documentation for details (www/websockets.yaws).

- * -
*** Outgoing fragmented messages ***

A callback module can now send fragmented messages to clients using the
record #ws_frame{}:

#ws_frame{fin = true, %% true | false
rsv = 0,
opcode, %% text | binary | continuation...
payload = >>}. %% binary(), unmasked data

--
[1] http://autobahn.ws/testsuite
[2] https://github.com/klacke/yaws/pull/99
[3] https://github.com/pvieytes

commit c341c31


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jan 3 11:53:04 2013 +0100
Adjust line numbers in known_dialyzer_warnings file

commit 48c0510


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 9 10:26:48 2012 +0100
Add access functions for #gconf{} and #sconf{} records

Applications may want to retrieve information in it. yaws:gconf_*/1 and
yaws:sconf_*/1 should be used in preference to a direct access to reduce
the dependence of your code on these records. So internal modifications
could be done avoiding the need to update and recompile your application.

Update www/internals.yaws accordingly and remove dependency on 'yaws.hrl'
in examples and applications. Add unit tests to check #gconf{} and #sconf{}
setup.

commit 7da7481


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Nov 27 14:32:51 2012 +0100
Add support for deactivation of cache in reentrant calls

commit d748f92


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 30 12:26:29 2012 +0100
Add support of the 'Vary' header in response

With this patch, Yaws will add 'Accept-Encoding' in 'Vary' header if the
support of gzip compression is enabled or if the response is compressed.
The 'Vary' header can be set using 'yaws:outh_set_vary(Fields)' or by
returning '{header, {vary, Fields}}' from scripts (where Fields is a list
of header names).

commit f5f62b6


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Nov 29 17:10:14 2012 +0100
Fix checks on the response content type when a charset is present

When we test if a response is compressible or not, or when 'Expires' and
'Cache-Control' headers are set, the charset must be removed from the
response content-type to only keep the response mime-type.

commit 89f3ea2


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 9 17:35:01 2012 +0100
Fix when 'Expires' and 'Cache-Control' headers are set

Because the content-type of the response may change many times during the
request handling process, we must wait the #outh{} serialization to set it.

Note: 'Last-modified' header is also managed in a same way because there is
no good reason to set it before.

commit fdc06fd


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 23 15:20:03 2012 +0100
Update docs & testsuite accordingly

commit f5343a3


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 23 14:51:50 2012 +0100
Flush remaining data in case of 3xx redirect

When Yaws returns a 3xx response, if the client connection is kept alive,
the remaining data must be flushed. Else the next request on the same
connection cannot be handled.

commit 4fed987


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 23 14:39:53 2012 +0100
Fix a bug: redirect URL must be url-encoded

commit e7740bc


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 23 14:26:59 2012 +0100
Keep info about the original request during a reentrant call

Some information must be preserved during a reentrant call. From the original
request, we keep:
* buffered data (Arg#arg.clidata) and the number of bytes read
* the request state (Arg#arg.cont & Arg#arg.state)

commit 0a2e565


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 23 09:59:06 2012 +0100
Add a clause to yaws_api:url_encode to handle deep lists

commit bb5124b


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Nov 21 11:18:28 2012 +0100
Make be possible to chain appmods

Before, all appmods were disabled during a reentrent call. So it was
impossible to chain appmods. Now, it is possible. Only the current appmod
is disabled for the next recursion (if we are inside an appmod of course).

So if we have this configuration for appmods:

appmods = /foo, foo> /bar, bar>

When "/foo" is requested, the appmon "foo" is called. At this step, it is
possible to call the appmod "bar" by returning {page, "/bar"}.

commit ebe66b6


Author: Johannes Weißl jargon@molb.org>
Date: Sat Dec 1 17:22:55 2012 +0100
Support multipart/form-data "name" with backslash at the end.

Also add multipart/form-data tests ("name" with escaped characters).

commit 1cf4eeb


Author: olgeni olgeni@olgeni.com>
Date: Thu Nov 29 12:47:45 2012 +0100
Fix io:format call in yaws_compile.

Basically, yaws_compile was unable to process items in some "unlucky"
paths on Win32.

NTFS may generate filenames in an MS-DOS compatible format if the
original filename is not compatible with the legacy 8.3 notation;
these filenames often contain tilde characters, which are inserted
(unquoted) in the Format parameter of io:format by the string
concatenation.

These unquoted tilde characters are processed as usual, leading to
a badarg error as the Data parameter is always an empty list.

commit 7061375


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Nov 29 11:56:40 2012 +0100
Fix compilation of mime_types.erl when working directory is not 'yaws'

When mime_types.erl is generated, we must check if it is done during a Yaws
compilation or a Yaws startup. In the first case, we must use a relative
path for includes. Else include_lib must be used.
This issue was reported by Andrei Zavada and avoid a compile error when the
working directory is not 'yaws'.

The mechanisms to generate and compile this file have also changed.

Then, to centralize calls to yaws_generated:is_local_install/0, following
functions was added in yaws.erl:
get_app_dir/0, get_src_dir/0, get_ebin_dir/0, get_priv_dir/0, get_inc_dir/0

commit dc424c8


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Nov 28 18:20:56 2012 -0500
skip sslaccept_tout_test for R15B03

An SSL bug introduced in R15B03 makes the sslaccept_tout_test fail. The bug
is explained here:

http://erlang.org/pipermail/erlang-bugs/2012-November/003208.html
http://erlang.org/pipermail/erlang-bugs/2012-November/003209.html

Check the Erlang version and skip that test for R15B03.

commit 0f6226d


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Nov 20 15:34:42 2012 +0100
Take care to preserve the query-string in yaws_server:deliver_302/4

It is an old bug on the redirect made when the trailing slash is missing.
The query-string was always missing from the redirect URL. So now, we add
it explicitly.

commit 26e7ed2


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Nov 13 17:11:18 2012 +0100
Extend syntax of redirect block to allow an optional status code

Now, it is possible to change the HTTP status code used in redirect rules.
Supported formats are:

Path = URL
Path = code
Path = code URL

* '==' syntax instead of '=' is always valid.
* If no status code is defined, Yaws will perform a 302 redirect.
* For 3xx status codes, the URL parameter must be present and will be used
to build the new location.
* For other status codes (1xx, 2xx, 4xx and 5xx), it can be omitted. In the
absence of URL, Yaws will return a generic response with the specified
status code. Otherwise, the URL parameter must be a relative URL and will
be used to customize the response.

For example:

redirect>
/foo = http://yaws.hyber.org # (1)
/bar = 301 /foo # (2)
/baz = 404 # (3)
/qux = 403 /forbidden.yaws # (4)
/redirect>

(1) do a 302 redirect on 'http://yaws.hyber.org/foo/...'
(2) do a 301 redirect on 'scheme:host:port/bar/...'
(3) return a generic 404 error
(4) do a reentrant call to '/forbidden.yaws' by setting the status code
to 403.

Note: this new feature is fully compatible with older one.

commit 05be6e6


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Nov 9 12:06:48 2012 +0100
handle case with DOS attack towards pam login with embedded NUL chars in username or password. The protocol cannot handle NUL chars and Yaws dies

commit cda2a27


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 9 09:38:18 2012 +0100
Remove invalid macro in yaws.hrl

?sc_set_ssl is never used and rely on the undefined macro ?SC_SSL.

commit a8077fd


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Nov 9 09:37:33 2012 +0100
Fix doc errors

commit b416f25


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Oct 24 18:23:41 2012 -0400
start crypto app for yaws_session_server_test for R13

commit 7e5e673


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Oct 23 16:06:36 2012 -0400
add Ahti Legonkov to contributors file

commit f496811


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Oct 23 16:02:03 2012 -0400
adjust line numbers in known_dialyzer_warnings file

commit 0281736


Author: Ahti Legonkov ahti.legonkov@gmail.com>
Date: Mon Oct 22 18:23:39 2012 +0300
Fix bug #128 and add a new test case for it

commit 954ccb1


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Oct 23 11:05:19 2012 -0400
ensure compatibility with Erlang R13B04

For R13B04 compatibility, fix bare calls to integer_to_list and
list_to_integer, and in yaws_davlock provide an alternative for pre-R14 for
finding hwaddrs.

commit 0f41b7b


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Oct 22 21:29:04 2012 -0400
fix dialyzer issue in yaws_dav and update known_dialyzer_warnings

commit 06a2b0e


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Oct 22 21:23:47 2012 -0400
fix call to file:read_file_info/1 in yaws_dav

commit 2a131ff


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Oct 22 17:45:07 2012 -0400
keep websocket errors from crashing gen_server

Change websocket implementation to not stop abnormally or crash with noisy
logs if errors occur.

commit fb4df1f


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Oct 21 20:09:13 2012 -0400
add comment to websocket example explaining {origin, any}

commit b3bc43c


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Oct 19 10:35:44 2012 +0200
Handle relative paths when Yaws is started in embedded mode

Now, following functions will throw an error if the docroot
directory does not exist:

* yaws_api:embedded_start_conf/1,2,3,4
* yaws:start_embedded/1,2,3,4
* yaws:add_server/2
* yaws:create_sconf/2

commit 1939b38


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Oct 17 21:03:53 2012 +0200
make error reports for stats:sent() go away nd be ignored

Version yaws-1.95 Date: Wed Oct 17 20:16:04 2012 +0200


commit 589b535


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Oct 17 20:14:43 2012 +0200
prepare for 1.95

commit 0da0628


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Oct 17 19:56:35 2012 +0200
The --heart option didn't work as expected when yaws ran out of filedescriptors - capflam

commit 3c36e2a


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Oct 17 09:32:41 2012 -0400
more WebDAV fixes (lyk0rian)

commit e3c1631


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Oct 15 20:12:47 2012 +0200
news

commit 039c300


Author: Steve Vinoski steve@basho.com>
Date: Sun Oct 14 15:31:58 2012 -0400
add missing make rule for davconf

commit efa9eff


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jul 11 21:25:03 2012 -0400
WebDAV compliancy rework (Tjeerd van der Laan)

The WebDAV support is reworked and adds class 1, 2 and 3 compliancy
which includes:

* XML request body parsing and multistatus responses

* PROPFIND and PROPPATCH methods returning properties asked for

* all RFC4918 properties, the Apache executable property plus some
Microsoft extensions

* locking mechanism (class 2 compliancy) on all destructive methods

* If header parsing

commit 00aa12d


Author: tjeerd tjeerd@yolt.nl>
Date: Sun Aug 26 13:54:09 2012 +0200
Follow structure of EHTML as stated in manual

commit e662e51


Author: tjeerd tjeerd@yolt.nl>
Date: Sun Aug 26 13:49:28 2012 +0200
Added sorting of subconfigdir

commit 75dbb60


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Sep 25 18:06:02 2012 -0400
add a configurable dispatch module

Allow an application to supply its own dispatch module for a server by
setting the new dispatchmod variable in the server config. The module is
expected to export a dispatch/1 function that returns one of the following
atoms:

* done: this indicates the dispatch module has handled the request and sent
the response, and Yaws should go look for a new request on this
connection

* closed: same as "done" but also indicates the dispatch module has closed
the connection

* continue: this tells Yaws to continue with the normal dispatch path

commit 5b7c019


Author: serge saleyn@gmail.com>
Date: Sat Oct 6 12:00:05 2012 -0400
Added more test cases.

commit 6abc02a


Author: serge saleyn@gmail.com>
Date: Sat Oct 6 11:51:32 2012 -0400
Added test cases.

commit 00c152b


Author: serge saleyn@gmail.com>
Date: Sat Oct 6 10:24:14 2012 -0400
Added RFC6265 compliant variant of setcookie.

The new set_cookie/3 function implements more complete RFC2109
cookie formatting than setcookie/6 and is 10x - 15x more efficient
than its old setcookie counterpart because of avoiding the use of
io_lib:format/2. The setcookie/2 through setcookie/6 are marked
as deprecated. The function is named set_cookie rather than setcookie
to facilitate the ease of depricating the old implementation.

commit 1e7a122


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 4 14:28:58 2012 -0400
some man page cleanup/repair

commit f6ba7ca


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 4 12:26:56 2012 -0400
document 127.0.0.1 as the default listen interface

Fix the yaws.conf man page to state that 127.0.0.1 is the default listen
interface for a virtual server. Also document the same in the yaws.tex
file.

commit ba34c61


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Oct 2 12:14:39 2012 +0200
Fix SSL socket wrapping

We must be careful when we rely on Arg#arg.clisock in Yaws modules
because the socket is wrapped in case of SSL connections.

Thanks to Jean-Charles Campagne.

commit faef983


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Oct 1 03:34:44 2012 -0400
add some missing HTTP status codes

commit 77142a0


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Sep 18 10:11:46 2012 +0200
update known dialyzer warnings file

commit a66f8a3


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Sep 12 17:26:58 2012 +0200
Parse extensions and trailing headers of chunked transfer encoded requests

Chunk extensions and trailing headers are parsed but ignored in requests
and are not supported in responses. It is a strange feature of the RFC-2619
and would be hard to implement. Moreover, this feature is rarely supported
by clients and servers and even less used.
So, without any concrete use-case, no further work will be done on this
subject.

commit f3a31fe


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Sep 12 17:19:59 2012 +0200
Fix tests on Transfer-Encoding header to be case-insensitive

commit 5101fde


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 26 17:36:30 2012 +0200
Optimize the ACL checks during the request's authentication

Now, in yaws_server:handle_auth/4, the client ip is no more converted into
integer. All ip addresses in #auth.acl are of the type ip_address(). That makes
easier the checking of the client ip.
To clean up the code, functions that parses and checks the allowed/denied ip
addresses with the client ip were moved into yaws.erl.

commit 8551256


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Sep 9 19:11:47 2012 -0700
Added support to configure ciphers in ssl, previously the ciphers = Val stricng in yaws.conf required the Val to be a string according the openssl cipher string spec language. Now we specify an erlang list instead, the list shall comply to the output of ssl:cipher_suites()

commit 7688b46


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Sep 9 16:49:38 2012 -0400
update known dialyzer warnings file

commit 9b86f4a


Author: Kenji Rikitake kenji.rikitake@acm.org>
Date: Sat Sep 8 15:55:30 2012 +0900
Update Makefile and src/Makefile

* Targets in `Makefile` of `yaws.plt` and `dialyzer` calls
dialyzer with two target directories, `ebin` and `src`;
this causes the error of duplicate modules.
Checking out the .beam files under `ebin` is sufficient
for dialyzer; `src` is removed.

* Target `mime_type_c.beam` in `src/Makefile` is
superfluous and generates a spurious .beam file in
the `src` directory, so the target is removed.
Also target `charset.def` in `src/Makefile` should be
dependent on `../ebin/mime_type_c.beam`, so this is
also changed from the previous target without the
directory path.

commit 2ff32fe


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Sep 1 14:15:03 2012 -0400
update mime.types file

commit d508c6b


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Aug 25 20:10:34 2012 -0400
add startup script for FreeBSD 9 (Thomas Elsgaard)

Add scripts/freebsd/yaws for FreeBSD version 9 or later. The original
script at scripts/freebsd/yaws.sh is retained for use with FreeBSD versions
prior to 9.

commit 66f50e6


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Aug 24 10:33:06 2012 -0400
make sure "rebar eunit" passes

When using yaws as an app dependency for another application built with
rebar, I noticed that testing that application with "rebar eunit" would
fail while testing yaws. It was easy to work around with "rebar eunit
skip_deps=true" but yaws really should pass its tests when tested via
rebar.

Change rebar.config to add ibrowse as a dependency. It's used only for
testing, but rebar doesn't support test-only dependencies, plus it's
filtered out during release generation anyway.

Modify some of the test files to be able to find ibrowse include files
regardless of whether they're built via make or via rebar. Also rename all
non-eunit test functions ending in "_test" so they don't confuse eunit. Also
had to move the embedded_yaws_id_dir test from eunit to t2 because it fails
under "rebar eunit" when yaws is a dependency for another app. It fails
because it calls into the yaws_api:embedded_start_conf function which tries
to call application:load(yaws), but paths aren't properly set up to allow
that to work under these testing circumstances.

Note that not all tests currently run under rebar; building with make and
then running "make test" results in many more tests being executed. Fixing
this will come later.

commit d0a90a9


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Aug 24 09:27:20 2012 -0400
revert commit d990b30

Commit d990b30 was intended to fix issue #122 but my testing was flawed, so
I'm reverting it. The real issue seems to be a bug with reltool not
honoring app overrides of sys-level mod_cond settings.

commit d990b30


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Aug 23 23:21:56 2012 -0400
make sure more modules are included in a release (issue #122)

The problem that caused issue #122 is that the yaws_outmod module, which
isn't directly referenced by any other yaws module, was not being included
in the application release. Change the mod_cond in rel/reltool.config to
all rather than app to ensure yaws_outmod gets included.

commit b415950


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Aug 23 17:34:49 2012 -0400
document the new yaws_api:reformat_header/2 function

commit 602dba7


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Aug 21 23:14:57 2012 -0400
add flexible variant of yaws_api:reformat_header

Add a new yaws_api:reformat_header/2 that takes a formatting function as
the second argument. The old reformat_header/1 now just calls this, passing
the original formatting function.

commit 1c4d428


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Aug 7 15:52:59 2012 -0400
support Raspberry Pi in configure.in (Anders Nygren)

commit 79ba3ba


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Aug 5 22:36:23 2012 -0400
fix setting of yawsid_opts variable in OS X startup script

commit 940ea3a


Author: JD Bothma jbothma@gmail.com>
Date: Tue Jul 31 00:03:20 2012 +0200
Add basic websocket test.

It performs the handshake, then sends one text message and checks
that it is echoed back correctly.

commit 2f3a4bf


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 26 11:16:24 2012 +0200
Improve how Yaws is started in embedded mode

The main change concerns the function yaws:create_sconf/2. Now, this function
relies on yaws_config:make_default_sconf/2 to create a default #sconf record.

commit 40d7acd


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 26 09:27:12 2012 +0200
Check missing fields in yaws_config:eq_sconfs/2

commit 89a64ef


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Jul 19 15:39:26 2012 +0200
Make the mime types mappings configurable

Now, it possible to customize the global mime types mappings and to overload
it for each virtual server. It can be done using following directives in the
global part or the server part of the configuration:

* default_type: Defines the default mime type to be used where Yaws cannot
determine it by its mime types mappings (default: text/plain).
In the server part, this directive overloads the global one.

* default_charset: Defines the default charset to be added when a response
content-type is text/* (default: none). In the server part, this directive
overloads the global one.

* mime_types_file: Overrides the default mime.types file included with Yaws
(default: ${PREFIX}/lib/yaws/priv/mime.types). In the server part, this
directive overloads the global one but mappings defined in this file will
not overload those defined by add_types directives in the global part.

* add_types: Specifies one or more mappings between mime types and file
extensions. More than one extension can be assigned to a mime type. If a
mapping is defined in the global part and redefined in a server part using
this directive, then the later is used. Else the global one is kept.

* add_charsets: Specifies one or more mappings between charsets and file
extensions. More than one extension can be assigned to a charset. If a
mapping is defined in the global part and redefined in a server part using
this directive, then the later is used. Else the global one is kept.

Here is an example:

default_type = text/html

server localhost>
port = 8000
listen = 0.0.0.0
docroot = /var/www
# nothing is overloaded in the vhost
/server>

server localhost>
port = 8001
listen = 0.0.0.0
docroot = /var/www

# overload global configuration:
default_type = text/plain
mime_types_file = /etc/mime.types
add_types = text/xhtml, yaws> application/x-test, tst test>
default_charset = UTF-8
add_charsets = ISO-8859-1, php html yaws> US-ASCII, tst>
/server>

During Yaws compilation, a default module 'mime_types' is created using the
default mime.types file. Then, when yaws starts up, this module is
re-generated, re-compiled and loaded dynamically. The new module replaces the
default one but the .beam file is unchanged. So if one of these steps failed,
we fall back on the default module.

commit a5515f2


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Jul 24 18:25:53 2012 +0200
Fix return value of yaws_server:is_auth/2 when no auth structure is found

commit ef5e555


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Sat Jul 14 00:46:24 2012 +0200
Sync rel/files/yaws with upstream template

commit 2ad166a


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jul 11 20:31:24 2012 -0400
server_sent_events: end gen_server process if send fails

commit 6c6f62f


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Jul 11 15:08:10 2012 +0200
Add index_files directive into the server part configuration

This directive sets the list of resources to look for, when a directory is
requested by the client. If the last entry begins with a "/", and none of
the earlier resources are found, Yaws will perform a redirect to this uri.

Default is:
index_files = index.yaws index.html index.php

commit 5b34d48


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Apr 20 18:36:04 2012 -0400
wrap SSL sockets in tuple

Yaws previously internally used details of an SSL socket representation
that's supposed to be private/opaque to Erlang's SSL support. Encapsulate
SSL sockets within a {ssl, SslSocket} tuple and add the
yaws_api:get_sslsocket/1 function that returns a socket for SSL sockets or
undefined for non-SSL sockets. Also document the new get_sslsocket/1
function and other minor tweaks to SSL areas of the documentation.

commit 6948590


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jun 29 12:24:59 2012 -0400
minor changes to server-sent events

Change yaws_sse to send close connection header by default, and change the
example to return an Allow header if anything other than GET is requested.

commit 6561513


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Sat Jul 7 19:28:12 2012 +0200
Fix test on the return value of peername/2 in close_accepted_if_max/2

commit ba07506


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jul 9 18:41:00 2012 +0200
Refactor Set-Cookie/Cookie header parsing to follow RFC6265

RFC6265 obsoletes RFC2965 and RFC2109. #setcookie{} and #cookie{} are
changed to reflect this new RFC. So, yaws_api:parse_set_cookie/1 and
yaws_api:parse_cookie/1 are refactored accordingly:

* yaws_api:parse_set_cookie/1: Because RFC2109 and RFC2965 are still used,
we try to be backward compatible with these old RFCs. So this function
returns a #setcookie{} record when only one cookie is found else it returns
a list of #setcookie{} records.
in RFC2109 and RFC2965, cookies are separated by comma. So, comma is
forbidden in 'path-av' and 'extension-av' except for double-quoted value.
The parsing are not really strict because of the compatibility and can lead
to unwanted behaviors.
Old attributes (like 'Comment' or 'Port') are still parsed and can be
found into #setcookie.extensions field.

* yaws_api:parse_cookie/1: This function follows the RFC6265, so all cookie
attributes (like '$Domain' or '$Path') are parsed like any other cookie.

commit caa121a


Author: Kaloyan Dimitrov kaloyan.dimitrov@sumup.com>
Date: Mon Jul 9 16:59:26 2012 +0300
added customization for ibrowse timeout parameter since it is not overridable

commit 0c1112d


Author: Kaloyan Dimitrov kaloyan.dimitrov@sumup.com>
Date: Mon Jul 9 16:36:32 2012 +0300
added export for the newly introduced call/8

commit 2d33061


Author: Kaloyan Dimitrov kaloyan.dimitrov@sumup.com>
Date: Mon Jul 9 16:31:35 2012 +0300
-enabled http client library options customization

commit a721cfc


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jul 6 19:52:21 2012 -0400
minor changes to server-sent events

Change yaws_sse to send close connection header by default, and change the
example to return an Allow header if anything other than GET is requested.

commit 39aae44


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Fri Jul 6 18:47:06 2012 +0200
Sync with upstream rebar node template

commit 32d4de1


Author: Kaloyan Dimitrov kaloyan.dimitrov@sumup.com>
Date: Fri Jul 6 11:43:08 2012 +0300
-fixed action header for soap12 requests to contain action rather than operation;
-added namespace registry to allow for wsdl inline schemas in different namespaces

commit 3a8e071


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Wed Jul 4 19:44:16 2012 +0200
Fix parse_set_cookie/1 and format_set_cookie/1 functions

1. According to the RFCs 2109 and 2965, multiple cookies can be set in a
single 'Set-Cookie' header. So, yaws_api:parse_set_cookie/1 now returns a
list of #setcookie{} records. If no cookie was found or if an error occurred,
it returns []. The parsing is also improved.
Note that this fix breaks the compatibility with previous versions.

2. In yaws_api:format_set_cookie/1, options are now always formated as
quoted-strings.

3. 2 new functions are added, yaws_api:parse_cookie/1 and
yaws_api:format_cookie/1, to parse and format 'Cookie' headers. To let these
functions to work, the #cookie{} record was introduced.

Documentation and testsuite are updated accordingly.

commit be0babd


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jun 29 05:11:32 2012 -0400
remove duplicate entry from 1.94 news

commit da6d73c


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jun 29 05:10:04 2012 -0400
remove unnecessary inet:setopts from server-sent events example

commit 8dd9f23


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jun 27 14:01:51 2012 -0400
add doc for new functions for manipulating #headers{} records

Commit cccc5789 added new functions to yaws_api for manipulating #headers
records: set_header/2, set_header/3, get_header/2, and
delete_header/2. This commit adds the documentation.

commit d6e7d36


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jun 27 13:56:06 2012 -0400
add note about the sse appmod to the Server-Sent Events yaws page

commit 3947ca3


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Jun 27 15:38:28 2012 +0200
Fix is_revproxy/3 and is_redirect_map/2 in yaws.erl

In these functions, we try to find the longest matching prefix and not
the first anymore. So we can have several revproxy/redirect_map definitions
for which order does not matter.

For example, if we define these revproxy rules (in any order):
revproxy = /goo http://www.worldofgoo.com (1)
revproxy = / http://yaws.hyber.org (2)
revproxy = /erl http://www.erlang.org (3)
revproxy = /google http://www.google.com (4)

then
http://localhost will match the rule (2)
http://localhost/goo will match the rule (1)
http://localhost/google/search will match the rule (4)
http://localhost/erl will match the rule (3)

We also change how the matching is made. Now, the matching is done by
splitting the path on slashes. So, using previous rules, "/google" is the
longest prefix for the path "/google/test" and "/" is the longest prefix
for "/erlang".

commit be1c395


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Jun 27 15:31:05 2012 +0200
Fix yaws_api:format_partial_url/2 to avoid strange redirection

commit efc1d1d


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Jun 27 12:28:25 2012 +0200
Handle undefined docroot when the fullpath of a request is built

Now, the internal function yaws_server:construct_fullpath/3 returns
'undefined' when there is no docroot. This might only happen for servers
with an appmod on "/" (because docroot is optional in that case).

Note that such appmods cannot return ssi or yssi structures.

commit ea1e77b


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jun 25 19:59:38 2012 -0400
loosen docroot checking for certain server configs

For server configurations that define a reverse proxy, redirection for the
path "/", forward proxies, or appmods on "/", a docroot isn't
needed. Change yaws_config to avoid errors for missing docroot settings for
such servers. Add test/t6 to check these configurations.

commit 8862645


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Jun 26 18:33:09 2012 -0400
use localtime not universaltime for server_sent_events example

Looks like httpd_util:rfc1123_date/1 wants local time, not UTC time, as its
time argument. The server_sent_events example uses that function to create
the server date string events.

commit fd81730


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Tue Jun 26 12:24:32 2012 +0200
Fix trivial typo in server_sent_events.yaws

Version yaws-1.94 Date: Mon Jun 25 23:45:27 2012 +0200


commit 38bce37


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Jun 25 23:44:17 2012 +0200
prepare for 1.94

commit c160d87


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jun 25 14:48:41 2012 -0400
add news items for upcoming 1.94

commit c4fd143


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jun 1 07:42:59 2012 -0400
add support for W3C Server-Sent Events

Server-Sent Events is a W3C working draft allowing servers to send simple
events to a client. See the documentation in www/server_sent_events.yaws
for a full description.

commit 9efbaad


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Jun 25 11:13:24 2012 +0200
Patch from Nico Kruber to fix compile issue on OTP R13

commit afdddab


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Jun 24 23:51:38 2012 +0200
prepare for 1.94

commit ed75b53


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Jun 24 23:45:04 2012 +0200
The random patch for 1.93 wasn't good enough as discovered by Sergei Golovan, we need to cater for non printable chars

commit f7d145c


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Jun 21 16:33:37 2012 -0400
fix some compiler warnings in the tests

commit cccc578


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jun 17 20:08:08 2012 -0400
add reverse proxy intercept module capability

Users can now specify an interception module that can rewrite requests and
responses as they pass through the Yaws reverse proxy. See the
documentation for details (yaws.conf.5 man page or the yaws.pdf file).

Also add new set_header, get_header, and delete_header functions to the
yaws_api module to allow intercept modules and arg rewriters to more easily
examine and modify #headers{} records.

Add new tests for the new header manipulation functions and for the reverse
proxy interception feature.

Version yaws-1.93 Date: Thu Jun 21 09:58:40 2012 +0200


commit 92a1a27


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Jun 21 09:56:00 2012 +0200
sloppy bug that sneaked into the 1.93 release, call to undef function in yaws_ls

commit 645c644


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Jun 20 22:34:53 2012 +0200
preparing for 1.93

commit b49b6e8


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Jun 20 22:30:52 2012 +0200
preparing for 1.93

commit 290b982


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Jun 20 20:57:24 2012 +0200
preparing for 1.93

commit 8a1401b


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Jun 20 20:47:28 2012 +0200
preparing for 1.93

commit b44aba6


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Jun 20 20:21:21 2012 +0200
Use crypto:rand_bytes() instead of the cryptogrphicalli weak random module. Swedish security consultant and cryptographer Kalle Zetterlund discovered a way to - given a sequence of cokkies produced by yaws_session_server - predict the next session id. Thus providing a gaping security hole into yaws servers that yse the yaws_session_server to maintain cookie based HTTP sessions

commit 73741c6


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Tue Jun 19 00:59:44 2012 +0200
Simplify reltool.config

commit 5545f49


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jun 16 14:30:56 2012 -0400
minor fixes to yaws.tex

commit 8904c51


Author: Nicolas Adiba adiba@whatsapp.com>
Date: Thu Jun 14 15:18:45 2012 -0700
make sure to always send proper strings to file:write() while logging

Failure to send proper string to file:write() on FreeBSD could result in a
emulator Bad value on output port 'efile' if bad data makes it there, say
an atom.

commit c90a997


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jun 15 14:27:41 2012 -0400
default to a tcp queue backlog of 1024 (Nicolas Adiba)

Default to a backlog of 1024 rather than the default 5 that TCP provides.

commit 0b3f29e


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jun 15 13:50:30 2012 -0400
log debug messages to the error_logger for embedded mode (Nicolas Adiba)

Log debug messages to the error_logger given that stdout is not available
in embedded mode.

commit 8e0ac54


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Jun 13 12:18:18 2012 +0200
Add support of the 'OPTIONS' method when WebDav is enabled

commit 05aa4f0


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jun 11 19:21:24 2012 -0400
fix overfull hbox warnings in yaws.tex

Fix overfull hboxes and also update some of the record definitions (like

commit 9a95602


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 11 17:59:06 2012 +0200
Handle non-chunked responses without content-length in yaws_revproxy

In that case, the revproxy must read until the backend closes.
Add a test for this new functionality

commit 32bdfb0


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 11 17:43:11 2012 +0200
Refactor yaws_revproxy when large non-chunked content is received

Fix: srvconn_status must not be set to keep-alive
Refactoring: prepare the handling of non-chunked responses with no
content-length.

commit 98b6f00


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jun 11 17:28:38 2012 +0200
Fix conditions to close the backend socket when an error occurs

We must close the socket when an error _OTHER_THAN_ 'closed' occurs.

commit b10e492


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jun 10 22:33:48 2012 -0400
handle large non-chunked content in yaws_revproxy

Use partial_post_size as a block size to handle large non-chunked content
from backend servers in yaws_revproxy. Read the content block by block,
returning each block to the client as it arrives. This avoids having to
read the entire backend response into memory before replying to the
client. Add a test for this new functionality and fix .gitignore to ignore
the new content file used for the test.

commit f1f858c


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jun 6 10:05:54 2012 -0400
add a do_recv variant taking a timeout arg

commit 69b1215


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jun 3 20:54:22 2012 -0400
use request content type for SOAP responses

Rather than hard-coding text/xml or application/xml as the content type for
SOAP responses, extract the content type from the SOAP request and use it
in the response. This will avoid problems with clients that don't properly
handle certain MIME types with SOAP.

commit b80121d


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jun 2 15:33:24 2012 -0400
fix websockets reply status codes for client close messages

A number of autobahn WebSockets tests were failing due to replies
containing incorrect status codes. Check client status codes and reply with
correct codes.

commit fd690a6


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu May 31 22:53:26 2012 -0400
refactor yaws_websockets as a gen_server

The yaws_websockets module used an explicit recursive loop. Refactor it to
use a gen_server instead.

commit e2e6f66


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu May 31 22:25:59 2012 -0400
assert return value of filelib:ensure_dir for $HOME/yaws dir

A user reported an installation-related error because of a missing
$HOME/.yaws dir where the CTL file is stored. Assert that
filelib:ensure_dir returns ok for that directory.

commit 9e6c9e1


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu May 31 20:37:10 2012 -0400
revert SOAP response MIME type to "text/xml"

Some Microsoft tools don't handle "application/xml" as the MIME type for
SOAP responses. Revert the change from "text/xml" made in commit 15454bcd.

Also perform some minor cleanup in yaws_soap_lib and yaws_soap12_lib.

commit ea6c5b1


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu May 31 18:14:50 2012 -0400
use already-downloaded ibrowse for tests if network down

"make test" failed for disconnected operation due to trying to check the
latest version of ibrowse, which we use for a test client. Change it to
just use any existing ibrowse if it can't check github for the ibrowse
version.

commit 369ce33


Author: Nicolas Adiba adiba@whatsapp.com>
Date: Fri May 25 17:17:22 2012 -0700
fix typo for WWW-Authenticate error leading to infinite recursion

commit 563c7ef


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 11 23:48:21 2012 -0400
add new HTTP status codes from RFC 6585

RFC 6585 added new HTTP status codes, so add them here.

Also change the code that limits the number of incoming headers to return
new status code 431 (Request Header Fields Too Large).

commit 8981ce2


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 11 16:46:35 2012 +0200
Add support for precompressed static files

By setting use_gzip_static to true in deflate options, in a vhost
configuration, It is possible to serve precompressed versions of
static files. Yaws will look for precompressed files in the same
location as original files that end in ".gz".

Only files that do not fit in the cache are concerned and the mtime
of a precompressed file must be higher than the one of original file.

commit ea529f1


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 11 16:09:18 2012 +0200
Fix compat_send/3 to return the number of bytes sent

So all versions of the send function into yaws_sendfile will return
{ok, BytesSent} if successful, otherwise {error, Reason}.

commit cab8a28


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 11 09:07:29 2012 +0200
Improve how the responses compression is handled

Among other things, we can now disable the compression in yaws scripts by
returning '{header, {content_encoding, "identity"}}'.
A bug was also fixed when part of a large file is requested. The response
content length was calculated using the file size and not the part size.

commit 48b73a4


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 4 15:40:06 2012 +0200
Do cosmetic changes in yaws.erl

commit 93a2fd4


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 5 22:10:59 2012 -0400
fix issue #106: commit 6b5266 broke websockets

The fix for uncaught exceptions as implemented in commit 6b5266
unfortunately included too much within a try/catch block and ended up
reporting intentional exit(normal) code in websockets as uncaught
exceptions. Rework the try/catch to protect only the call needing
protection.

commit 5f11152


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 5 13:27:42 2012 -0400
issue #105: don't create default libdir if configure --libdir option used

commit c008278


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 5 11:41:19 2012 -0400
fix yaws issue #105: configure ignores --libdir

commit 6b52665


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 4 18:41:32 2012 -0400
report uncaught exception as server error 500

In yaws_server we used to catch exceptions thrown by application code and
ignore them. Now, catch them and report a 500 error back to the client, and
include an error message similar to what occurs for unexpected exits in
application code. This makes debugging applications that unexpectedly throw
exceptions much easier. Thanks to Richard Carlsson and Samuel Rivas for
reporting this.

commit 824e6db


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu May 3 18:28:42 2012 +0200
Move hostname resolution from yaws_server to yaws_log

It is useful to keep ip addresses unchanged when a specific logger is
used.

commit f31e4b8


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu May 3 14:56:55 2012 +0200
Make the parameter "x_forwarded_for_log_proxy_whitelist" obsolete

This parameter is now ignored and throws a warning when yaws starts.
If necessary, it can be replaced by a simple logger_mod on top of
yaws_log. To explain how to write such module, an example was added
into the www directory (www/logger_mod.yaws).

commit 4dc3b76


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu May 3 14:15:53 2012 +0200
Remove safe_decode_path/1 from yaws_log and use...

... yaws_server:safe_decode_path/1 instead.

commit 02930c9


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed May 2 17:01:02 2012 +0200
Complete yaws:setup_gconf/2 and yaws:setup_sconf/3

In embedded mode, these functions are used to populate #gconf and #sconf
records. Now, all fields can be setup.

commit 457d941


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed May 2 16:16:46 2012 +0200
doc update

commit 592c765


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Apr 12 14:46:41 2012 -0400
fix yaws issue #103: fix yapp exclude_dir paths (Mikael Karlsson)

commit af3e2ca


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Apr 27 09:54:41 2012 +0200
Fix bugs in yaws_api:parse_multipart_post/1,2 for chunked requests

For chunked requests, when several parts are parsed, only the first one was
processed properly. For the others, all the content of each part was needed
to be parsed. So when an huge file was uploaded, this bug could lead to a
memory exhaustion.

Note: Now, yaws_api:parse_multipart_post/1,2 can return '{error, Reason}'
if an error occurred during the parsing.

commit 02e9baf


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Apr 26 16:09:11 2012 +0200
Check the Content-Length before reading the request's content

Some browsers, like Firefox, do not support files that are larger than 2GB.
Uploading a >2GB file causes an integer overflow and the Content-Length
header is set to a negative value.

To prevent any crash in this case, we check the Content-Length value before
reading the request's content. When the value is negative, an error 400 is
returned.

A bug about this problem is openned for Firefox:
- https://bugzilla.mozilla.org/show_bug.cgi?id=215450

commit c74a92e


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Apr 25 08:38:16 2012 +0200
Add options to configure deflate compression behaviour

By adding "deflate> ... /deflate>" structure in vhosts configuration,
it is possible to configure how deflate compression will be applied
and when it will come into effect. Now we can:

* define the smallest response size that will be compressed
* define the compression level to be used
* specify the zlib compression window size
* specify how much memory should be allocated for the internal
compression state
* choose the strategy used to tune the compression algorithm

All these parameters are used when a zlib stream is initialized for
compression.

It is also possible to define all compressible mime types.
Here is an example:

server localhost>
...
deflate = true
deflate>
min_compress_size = 4096
compression_level = best_compression
mime_types = defaults, image/*
mime_types = application/xml, application/xhtml+xml, application/rss+xml
mem_level = 9
strategy = default
window_size = 15
/deflate>
...
/server>

commit 172b8b4


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Apr 24 18:27:44 2012 +0200
Update yaws.tex to have the same description of the config file...

...than in the manpage yaws.conf.5

commit 2f9f664


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Apr 24 16:04:23 2012 +0200
Make the target test dependent on the target all

So, when we run 'make test', Yaws sources are recompiled, if needed.

commit 3683b2e


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Apr 24 14:56:07 2012 +0200
Fix syntax and layout errors in yaws.conf.5

commit c1bdfc7


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Apr 17 12:35:50 2012 +0200
cosmetic comment and whitespace cleanup in yaws.hrl

commit af9ab82


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 24 20:27:08 2012 -0400
make handling of cookie names case insensitive

According to RFC 2109, handling of cookie names is specified as being case
insensitive.

Also, add a couple cookie unit tests. More are needed though.

commit 9334c88


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 24 17:29:42 2012 -0400
add rebar dependencies needed for SOAP applications

Use rebar.config.script to dynamically add SOAP dependencies if the shell
environment variable YAWS_SOAP is set. This way, Yaws users not interested
in SOAP do not need these dependencies.

commit cbed101


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 24 16:10:41 2012 -0400
change dialyzer Makefile targets to handle known warnings

At the suggestion of Tuncer Ayaz, modify the dialyzer targets to use the
new known_dialyzer_warnings file to ignore all known dialyzer warnings.

commit 705cd0a


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 22 11:31:30 2012 -0400
fix compilation error in previous commit (thanks again Kostis)

commit ed11020


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 22 11:09:04 2012 -0400
fix broken change to yaws_trace.erl from previous commit (thanks Kostis Sagonas)

commit f3622d2


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 22 09:50:51 2012 -0400
dialyzer fixes and comments

commit 02c9022


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 22 00:28:09 2012 -0400
fix misspelled call to yaws_api:headers_transfer_encoding

commit c0af90a


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 21 23:15:18 2012 -0400
add callback for abnormal websocket close

If a websocket client closes the connection abnormally, issue a callback to
the application callback module indicating the closure.

commit 6e10bf2


Author: Andrei Soroker soroker@gmail.com>
Date: Fri Apr 20 15:21:31 2012 -0700
Update www/websockets.yaws

commit 88996d8


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Apr 11 19:58:41 2012 -0400
cosmetic comment and whitespace cleanup in yaws_api.hrl

commit 32ad09a


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 10 20:23:34 2012 -0400
note IPv4 or IPv6 as appropriate in munin statistics (Olivier Girondel)

commit ced8e45


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Wed Apr 4 17:49:03 2012 +0200
Sync noderunner script with rebar template

commit 1a888aa


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 3 15:34:46 2012 -0400
fix configure's ERTS version checking for file:sendfile/5

R15B01 is ERTS version 5.9.1. In commit ddfa25, made before R15B01 was
released, it was erroneously assumed to be 5.10. This prevented
file:sendfile/5 from being configured properly for R15B01.

commit fef5fcd


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Mon Mar 26 19:37:57 2012 +0200
reltool: use app-level lib_dir setting

commit 3020ed1


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Sat Mar 31 13:47:25 2012 +0200
Update rebar.config: port_envs -> port_env

commit ddfa257


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 1 10:52:29 2012 -0400
rebar: use file:sendfile/5 if erts version > R15B

commit 2150708


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Thu Dec 29 20:43:30 2011 +0100
Use file:sendfile/5 if available

Due to a bug in file:sendfile/5 in R15B, the yaws configure script enables
the use of file:sendfile/5 only for versions R15B01 or greater.

commit ad390f7


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Mar 31 22:03:50 2012 -0400
fix tests due to ibrowse include file path change

In the ibrowse sources ibrowse.hrl was moved from the src dir to the
include dir. Change yaws tests where necessary to account for this change.

commit 3fcf9a7


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Mar 24 13:08:03 2012 -0400
fix yaws issue #97: mail application config file read failure

Change yaws_config to export the toks/2 function being called by the mail
application.

commit a323a3f


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Mar 24 12:25:33 2012 -0400
fix compilation warnings in mail application

commit 137f5c7


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Mar 17 13:12:29 2012 -0400
fix multipart tests for commit 470004

commit 08cee94


Author: Kaloyan Dimitrov kalski@gmail.com>
Date: Fri Mar 9 21:27:01 2012 +0200
added soap12 capability

commit a2c17ec


Author: Ulf Wiger ulf@feuerlabs.com>
Date: Thu Mar 15 22:58:50 2012 +0100
Added facility for specifying an #auth record when starting embedded

When giving a proplist for SC, the option {auth, Opts} can be
given. Opts is a {Key,Value} list where Key shall match the fields
in the #auth{} record. All other options ignored.

commit cf60207


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Mar 17 11:34:37 2012 -0400
make embedded start use docroot from sconf

Embedded startup previously used the docroot passed as the first
argument into yaws_api:embedded_start_conf even if the sconf records
passed in specified their own docroot settings. Fix the code to use
the docroot first argument only for sconf records that don't specify
their own docroots.

commit 1d78da8


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Mar 15 10:26:08 2012 -0400
fix overfull vboxes in yaws.tex

commit a7f41ba


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Mar 15 10:15:10 2012 -0400
add description of "yaws --running-config"

Add description of "yaws --running-config" to the Embedded Mode
chapter of yaws.tex.

commit 470004c


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Mar 16 14:38:47 2012 +0100
A denial of service bug has been corrected. Multippart POST processing on the yaws server side contained a list_to_atom/1 call which potentially makes it possible for an attacker to craft a continous list of POSTs, each potentially generating a new atom. This is a backwards incompatible fix since the upload code on the server side is user code. That code now needs to look for strings instead of atoms. For example the upload.taws code in the www examples is changed. It searches now for the field "filename" instead of 'filename'

commit de1f46a


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Mar 6 11:33:08 2012 +0100
Update gitignore file

commit f727b9bd


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Mar 6 10:55:47 2012 +0100
Fix bug when reentrant requests are used to return regular files

Response headers were not correctly set, in particular the Content-Length
header. This bug was fixed by refactoring the way reentrant requests are
handled.

commit 8beb7a9


Author: Mikael Karlsson karlsson.rm@gmail.com>
Date: Sun Mar 4 14:57:09 2012 +0100
Adapt yapp.app.src to new yaws include.mk

commit b1b4e2b


Author: Christopher Faulet christopher.faulet@capflam.org>
Date: Tue Feb 28 22:32:50 2012 +0100
Improve management of cached connections in the revproxy

commit 7464efc


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Mon Feb 27 13:48:25 2012 +0100
Adapt rebar.config to rebar changes

commit 262cac7


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Feb 24 12:57:51 2012 +0100
Add the revproxy testsuite

commit fcba27d


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Feb 21 15:32:08 2012 +0100
Refactor the reverse proxy to manage it as a "special" appmod

Now, the reverse proxy is written like an appmod and follows the same
workflow. We forge the #urltype{} record and use Arg#arg.state to pass
the revproxy's rule before calling yaws_revproxy:out/1.

For now, the support of persistent connections with the backend servers
is disabled. But it does not affect the status of client connections.
Chunked-transfer encoded requests and responses are supported.

Despite this refactoring, yaws_revproxy is always experimental and need
more tests to be safely used in production environments.

commit e61b0e3


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Feb 21 14:49:54 2012 +0100
Manage all 'special' headers of #headers{} and #outh{} records

Some headers, like 'Content-Encoding' or 'Transfer-Encoding' were
not correctly handled. These changes can be useful for everyone who
writes yaws scripts or appmods. In particular, the next version of
the reverse proxy depends on it.

commit 8ec7125


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Feb 17 15:48:23 2012 -0500
clean up rebar build problems with examples/src

Clean up some duplicate options and extra whitespace in
examples/src/Makefile, and add examples/src to rebar.config to make
sure it gets built under rebar.

commit f163227


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed Feb 15 12:26:02 2012 +0100
Fix issue #88

2 changes here:

* Revert "Flush remaining data when dynamic content is delivered"

This reverts commit d09ed3dc622be8d2b17efcd1cda552ee777fe464.
Systematically flushing data is not a good idea.

* Add "flush" as possible return value of the out/1 function

Some clients (eg. Firefox and google-chome...) do not handle connection
close gracefully when the connection is closed during sending data; they
do not read the server response. So, when the response is important, to
warn the end-user that an error occured for example, we must be fair by
flushing data before closing the connection.

commit 280e38e


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Feb 13 15:19:51 2012 +0100
Fixed issue 87

commit 16834ce


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Feb 10 18:24:19 2012 -0500
add close callback for websockets

WebSocket clients can close their end of the connection, and RFC 6455
requires servers to handle that message appropriately. This change
adds a new callback message for basic WebSocket callback modules. The
server now also replies to client "close" messages with a "close"
reply, as RFC 6455 requires. WebSockets documentation updated as well.

Also included a message ordering fix from Jan Bothma.

commit 0944464


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Feb 10 18:20:36 2012 -0500
minor cleanup

commit ac369a3


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Feb 2 17:42:48 2012 +0100
Allow the server signature to be defined per virtual server

Now, we can use the 'server_signature' directive into the server part
to overload the global one for specific virtual server.

commit 2411b2f


Author: Garret Smith garret.smith@gmail.com>
Date: Wed Dec 7 09:08:50 2011 -0800
rotate log file regardless of copy_errlog parameter

Signed-off-by: Garret Smith garret.smith@gmail.com>

commit 317008a


Author: Garret Smith garret.smith@gmail.com>
Date: Wed Dec 7 09:08:03 2011 -0800
fix log rotation on Windows, where fsync() is required to get the actual file size

Signed-off-by: Garret Smith garret.smith@gmail.com>

commit 51c5e03


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Fri Jan 20 17:20:13 2012 +0100
Simplify excl_sys_filters

commit eab8584


Author: Sergei Golovan sgolovan@gmail.com>
Date: Mon Jan 16 22:29:30 2012 +0400
fixed wiki app XSS vulnerabilities

In applications/wiki/src/wiki.erl,
applications/wiki/src/wiki_format_txt.erl,
applications/wiki/src/wiki_to_html.erl: Fixed CVE-2011-5025 (multiple
cross-site scripting (XSS) vulnerabilities in the wiki) by accepting
only letters and digits in node names, guarding a few calls to
list_to_integer/1, and escaping all HTML which goes to a user's
browser.

commit 5c0cc97


Author: Sergei Golovan sgolovan@gmail.com>
Date: Mon Jan 16 22:11:59 2012 +0400
R15B compatibility fixes

In applications/mail/src/mail.erl, applications/mail/src/smtp.erl,
applications/wiki/src/utils.erl, applications/wiki/src/wiki.erl,
applications/wiki/src/wiki_format_txt.erl,
applications/wiki/src/wiki_yaws.erl: Fixed compatibility with Erlang
R15B. Replaced atom/1, list/1, integer/1 by is_atom/1, is_list/1,
is_integer/1 and erlang:fault/1 by erlang:error/1. In the wiki app,
replaced regexp module by re one, renamed error/1 by html_error/1 to
avoid clashing with global error/1 function.

commit 404aec1


Author: Sergei Golovan sgolovan@gmail.com>
Date: Mon Jan 16 22:09:09 2012 +0400
fix syntax and spelling errors in man pages

In man/yaws.conf.5, man/yaws_api.5: Fixed a few syntax and spelling
errors in manpages.

commit 86dc31d


Author: Sergei Golovan sgolovan@gmail.com>
Date: Mon Jan 16 22:03:58 2012 +0400
handle parseable but invalid ctlfile

src/yaws_ctl.erl: Process the case when ctlfile is parseable but its
content is invalid.

commit a40036a


Author: Sergei Golovan sgolovan@gmail.com>
Date: Mon Jan 16 21:59:52 2012 +0400
fixes for make clean in applications and doc dirs

* applications/wiki/scripts/Makefile: Remove all scripts on make
clean.
* applications/yapp/Makefile: Remove forgotten PNG image on make
clean.
* doc/Makefile: Remove generated www/yaws.ps and www/yaws.pdf on
make clean.

commit a77d2e9


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 17:47:51 2012 +0100
Set default output headers when a rewrite response is returned

Because a response can be returned by the module used to rewrite arg records,
we must take care to set default output headers like 'date' and 'server'.
When the response has a content, if the content type is not defined, then
we set it to "text/plain".

commit 9730337


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 17:44:12 2012 +0100
Add tests for flush mechanisms

commit 96da4a1


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jan 9 12:27:35 2012 +0100
Allow gconf keepalive_timeout to be set to infinity

The manpage of yaws.conf says that 'infinity' is a legal but not recommended
value for keepalive_timeout. But it was not really supported.

commit 6b56d41


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jan 9 11:49:27 2012 +0100
Update the testsuite accordingly

commit 6a0379d


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Jan 9 10:35:52 2012 +0100
Use gconf keepalive_timeout when the SSL connection is established

If a client open an SSL connection on Yaws without starting the SSL
negotiation phase, the server hangs until the client closes the connection.
By using a timeout during the call to ssl_accept, we solve this problem.

commit eacdbbd


Author: Richard Carlsson richardc@klarna.com>
Date: Mon Jan 9 09:51:45 2012 +0100
fixed warnings about unused imports and export_all

commit 2cee2df


Author: Richard Carlsson richardc@klarna.com>
Date: Mon Jan 9 09:23:56 2012 +0100
check for Host = undefined in pick_host()

commit 4a8d7ba


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Sep 9 14:20:15 2011 +0200
Update documentation accordingly

commit 55f72f9


Author: Christopher Faulet christopher@yakaz.com>
Date: Mon Aug 29 17:20:34 2011 +0200
Use filter to reduce the amount of trace messages logged by Yaws

When traffic or http tracing is enabled, a filter can be defined to
disable trace logging for specific requests. When Yaws receive a request,
if tracing is enabled and the filter is evaluated to true, trace messages
are logged. Else tracing is disable for this request.

Filter is defined using a syntax similar to the condition part of match
specifications. We can match on the client's ip address or request headers.

For example, to trace requests coming from 127.0.0.1 on all gif images,
we can do:

1> yaws_trace:set_filter({'and',
{equal, ip, "127.0.0.1"},
{match, {request, path}, "^.*\.gif$"}}).
ok

commit c363cfe


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Aug 12 15:50:04 2011 +0200
Typo

commit d9e3392


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Aug 11 17:24:14 2011 +0200
Speed up stop/quite_stop target in test suites when yaws is not started

commit 1462128


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Aug 11 17:19:51 2011 +0200
Trace parameter is dynamically reconfigurable

So yaws_trace:enable_trace/disable_trace are also dynamic.

commit 61cadfe


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Aug 11 16:48:17 2011 +0200
Remove useless code about trace handling in yaws_log

commit eb25bc7


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Aug 11 16:45:59 2011 +0200
Use yaws_trace to handle trace files

commit 082d55c


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Aug 11 16:28:00 2011 +0200
Add new module to deal with trace files

This module is a replacement of what we find in yaws_log.erl. This is the
first step to improve traces handling.

Changes with yaws_log.erl:

* Trace files are created in a subdirectory suffixed with the creation
date. So this subdirectory changed every time yaws restarts.

* There is 1 trace file by connection handler. So traces cannot be
interwined with each other

* We can enable/disable trace for a period of time (must be improved
to be fully dynamic)

commit 16d46fc


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu Aug 11 16:25:12 2011 +0200
Retrieve the address and port number of the peer only once

commit 3dee1a5


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 17:40:17 2012 +0100
Update documentation and manpages accordingly

commit d09ed3d


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 17:25:04 2012 +0100
Flush remaining data when dynamic content is delivered

So, in a script, we can return values without taking care of remaining data
on the socket. This is very usefull to return result early even if the
request content is chunked.

commit 0e1a7c3


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 17:21:21 2012 +0100
Fix handle_out_reply/5 function

commit 2d4fba9


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 16:35:19 2012 +0100
Handle_crash/2 function must always return break

This is useful when a crash is reported during evaluation of return values
from Mod:out/1 function.

commit 92899a8


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 16:34:30 2012 +0100
Fix get_chunked_client_data/2 function

If this function is called when all data are already read, it hangs.
Now, this state is caught.

commit 1245ce4


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 16:32:27 2012 +0100
Refactor flush/1 function to prevent DoS attack

When Yaws receives a request with the method 'GET', 'HEAD', 'OPTIONS'..., its
content is ignored. Because the connection may be persistent, we must flush
the socket.

Today, this is done by reading all the data at one time. If there is an huge
amount of data, Erlang can run out of memory. To fix this issue, we flush
data by blocks of maximum 'partial_post_size' bytes.

There is another problem with the current implementation of the flush/1
function. It does not handle chunked encoded requests. So, now, we also
catch this case.

commit ad267c4


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 16:26:46 2012 +0100
Update documentation about docroot directive

commit 4ec8c19


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri Jan 6 16:24:21 2012 +0100
Improve 'docroot' directive definition

Now, we just need at least one valid docroot in a server part to start yaws;
other invalid docroots are skipped with their associated auth structures.
Moreover, multiple docroot directives can be used.

commit 990bf47


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Jan 2 14:53:17 2012 +0100
moved the websockets example cb modules into the example dir

commit 53f02fc


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Dec 29 16:44:11 2011 +0100
added yaws.eps high resolution logo , created by Tomas Selander

commit 167c7bc


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Wed Dec 28 13:29:56 2011 +0100
Use version from vsn.mk for reltool release

commit 04970fa


Author: Claes Wikstrom klacke@iron.hyber.org>
Date: Sun Dec 25 21:27:47 2011 +0100
exhtml cleanup

commit a056469


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Dec 24 17:26:10 2011 -0500
set 2.61 as minimum required autoconf version

commit e119da6


Author: Garret Smith garret.smith@gmail.com>
Date: Wed Dec 7 09:08:50 2011 -0800
rotate log file regardless of copy_errlog parameter

commit 8025d25


Author: Garret Smith garret.smith@gmail.com>
Date: Wed Dec 7 09:08:03 2011 -0800
fix log rotation on Windows, where fsync() is required to get the actual file size

Version yaws-1.92 Date: Fri Dec 23 22:30:07 2011 +0100


commit 7b68b2f


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Dec 23 22:28:54 2011 +0100
prepare for 1.92

commit c3d6b7c


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Thu Dec 22 19:51:52 2011 +0100
rebar_reltool_link: fix typo and post_generate

commit b1234de


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Dec 21 09:58:32 2011 -0500
tweak settings in rel/files/vm.args

commit b6b9d87


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Mon Dec 19 17:48:07 2011 +0100
Add reltool based release support

Running "rebar generate" now creates a self-contained yaws system
under the build directory's "rel" subdirectory. The yaws script it
provides at ./rel/yaws/bin/yaws isn't the same as the normal yaws
script (the one normally found at ./bin/yaws); rather, it's a special
script that starts yaws and the Erlang applications on which it
depends as a local self-contained Erlang node. You can run

./rel/yaws/bin/yaws console

to start an interactive yaws node, or

./rel/yaws/bin/yaws start

to run it as a daemon, which you can later stop with

./rel/yaws/bin/yaws stop

This script does not accept the command-line options that ./bin/yaws
does, at least for now. If this is a problem, please raise an issue at
the Yaws github repo or on the Yaws mailing list.

commit 1f8b315


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Dec 20 23:02:54 2011 -0500
make "rebar compile" install under the build dir

A "rebar compile" used to install yaws, yaws.conf, and other files
under the user's home directory, just like "make local_install". This
approach isn't idiomatic to rebar usage, so change it to install files
locally under the build directory. Starting ./bin/yaws from the build
directory starts this local installation.

commit 378da72


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Dec 20 10:25:10 2011 -0500
clean src/mime_type_c.beam during "make clean"

commit 0b7c11e


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Dec 20 10:07:37 2011 -0500
handle long HTTP header lines in R15B

R15B includes a fix for receiving HTTP request and header lines longer
than Erlang's internal TCP buffer size of 1460 bytes. In the future we
might have to allow this limit to be configurable, but for now
hard-code a maximum HTTP header line size of 16384 bytes.

This will have no effect for Erlang releases older than R15B.

commit 4cf5fa8


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Dec 19 17:33:23 2011 -0500
add support for HTTP PATCH (RFC 5789)

Add support for the HTTP PATCH method, added to HTTP by RFC 5789. The
Erlang HTTP request line parser doesn't recognize PATCH yet, but this
change will continue to work if and when it does.

commit e3f358e


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Dec 19 16:53:53 2011 -0500
treat src warnings as errors

Fix compilation warning in yaws_dav.erl so that no compilation errors
exist in the build, allowing us to treat warnings as errors in
rebar.config and in src/Makefile.

commit 62b89d9


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Dec 18 14:08:23 2011 -0500
remove call to tuple fun in yaws_api.erl

R15B deprecates tuple fun calls, emitting a warning when they're
called at runtime. Replace single use of {M, F} with fun M:F/1 in
yaws_api.erl to avoid runtime warning.

commit 39c8d49


Author: JD Bothma jbothma@gmail.com>
Date: Fri Sep 30 19:08:18 2011 +0200
update WebSockets implementation to support RFC 6455

This change allows websocket connections to be set up between browsers
and the yaws server. RFC 6455 for WebSocket connections is supported,
in addition to the hybi working group RFC drafts 10 to 17.

The quickest way to try this out is by compiling yaws as usual, then
visiting /websockets_example.yaws at the default local installation
host. This can be done using Google Chrome 14+, Firefox 7+ or any
other browser supporting WebSocket version 8 or above. Information
about getting started with WebSockets using this implementation is
given in /websockets.yaws.

This drops support for the older draft RFCs, specifically those of the
hixie working group which were previously supported by yaws but are
significantly different from the hybi working group's specification.

The interface for using WebSocket with yaws has changed
somewhat. Instead of spawning a websocket owner process which
maintains a server loop such as that shown in the old
websockets_endpoint.yaws, the application developer now implements a
callback module such as those in src/basic_echo_callback.erl or
src/advanced_echo_callback.erl -- the difference being that the
advanced callback style is only necessary if you need advanced
features of WebSocket such as fragmented messages. One suggested way
to deploy your callback module and its dependencies is as part of an
application in an OTP release, with yaws as a dependency. Rebar can be
used to build the dependencies, fetch and build yaws, and create a
release which will ensure the modules are in the path of the runtime
system.

Most behaviour tested by the Autobahn test suite 0.43 pass when
configured to connect to the /websockets_autobahn_endpoint.yaws and
/websockets_example_endpoint.yaws over an unencrypted
connection. Significantly, websocket connection closing is not
implemented and the socket is left to be cleaned up by the Runtime
System when either the connection is lost or the owning processes
dies. Secondly, certain cases where websocket frames are fragmented
within UTF-8 code points cause the check for valid text type messages
to incorrectly fail the connection.

Subprotocols are not currently supported.

Augment yaws.tex with a new WebSocket Protocol chapter (Steve
Vinoski).

commit 4e78762


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Dec 15 15:54:58 2011 -0500
make local_install put var dir under $HOME

The "make local_install" command was using /usr/local/var by default,
which might not exist and the user might not have permissions to
create. Put var and its subdirs under $HOME with the rest of
local_install instead.

commit 0458c5d


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Dec 14 22:47:43 2011 -0500
change return type of sendfile set_error_buffer() (Tuncer Ayaz)

At the suggestion of Tuncer Ayaz, change the return type of
set_error_buffer() in the yaws sendfile driver from size_t to
ErlDrvSizeT. This makes the code make more sense since the result of
set_error_buffer() is sometimes used as the return value for driver
callback functions.

commit 9873a60


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Fri Dec 9 22:08:27 2011 +0100
Add missing driver entries

commit 0911702


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Fri Dec 9 22:08:10 2011 +0100
Fix R15B compatibility (ErlDrvSizeT typedef)

commit fc85359


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Nov 27 10:10:56 2011 -0500
fix reference to undefined misc:mktemp/1 function

The yaws_exhtml module was referencing a function misc:mktemp/1 from a
library not included with yaws. Add mktemp/1 to the yaws module and
call it instead.

Thanks to Richard Carlsson for reporting this.

commit 74845f5


Author: Uwe Dauernheim uwe@dauernheim.net>
Date: Thu Nov 24 12:57:00 2011 +0100
Starting to fix a bug related to this issue #69

commit 7811247


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Oct 31 16:02:14 2011 -0400
whitespace cleanup

Remove all trailing whitespace from all text files. Some bot sent
Klacke and me a pull request saying it had done this for us, but I
reviewed the diffs and it was affecting lines that shouldn't have been
affected, so perl and I did it ourselves instead.

commit ec553ff


Author: Willem de Jong w.a.de.jong@gmail.com>
Date: Sat Oct 29 14:22:04 2011 +0200
Allow to pass options to erlsom (fix issue #65)

commit 942e307


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Oct 23 14:25:01 2011 -0400
ensure .yaws id dir is created in embedded mode (#66)

Fix #66 by making sure the .yaws directory corresponding to the yaws
ID is created for embedded applications using
yaws_api:embedded_start_conf.

commit 59a8cc1


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 20 09:46:13 2011 -0400
make sed commands for version substitution more robust

The sed commands in yaws.app.src and rebar-pre-script were pretty
picky regarding the presence of empty lines or other garbage in the
vsn.mk file. Change to make sed operate only on the desired version
text.

commit 08b88c4


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 20 09:39:50 2011 -0400
fix compile warnings introduced in 96dd91e0

commit 21228ba


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Tue Oct 11 11:39:35 2011 +0200
rebar: fix loading of version string from vsn.mk

commit bf30d1a


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Oct 19 21:54:10 2011 -0400
move some test files

Relocate test files for some test/t2 tests to the new www directory
underneath that directory, instead of reaching up and across to the
top-level www directory. Change test code and config files as
necessary to match.

commit 96dd91e


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Oct 19 20:52:59 2011 -0400
fix CGI redirect HTTP status bug

The CGI 1.1 spec (RFC 3875) requires a server to augment a CGI
response with a 302 status code if that responses consists only of a
HTTP Location header and optional CGI extension headers, but Yaws was
not doing this. Fix this and add a unit test to verify it.

commit 186f07a


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Oct 19 20:46:14 2011 -0400
fix expires header time when crossing DST boundary

The expires header test was failing because the header time was
calculated in a way that failed to account for any daylight savings
time issues, specifically when the access time occurs when DST is
active but the expiry time occurs after DST has ended (or
vice-versa). Fixed.

commit 0884ecb


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Oct 18 10:45:19 2011 +0200
listen opts must be passed also to SSL sockets, Bug discovered and fixed by per Hedeland

commit 48542ca


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Oct 18 10:44:13 2011 +0200
listen opts must be passed also to SSL sockets, Bug discovered and fixed by per Hedeland

commit 88ee737


Author: Claes Wikstrom klacke@kisel.(none)>
Date: Thu Oct 13 18:46:55 2011 +0200
don't setup dirs in embeddded mode

commit 136ff2c


Author: Essien Ita Essien essiene@gmail.com>
Date: Wed Oct 5 18:15:16 2011 +0100
Populate soap_srv_mods field in yaws:setup_gconf/2

When running in embedded mode, this function is used to setup the
gconf. Currently, the soap_srv_mods field is not built and is
ignored. Correct that by setting the soap_srv_mods field.

Signed-off-by: Essien Ita Essien essiene@gmail.com>

commit ffa8cdb


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Oct 1 17:23:20 2011 -0400
remove obsolete username config from yaws.tex

The "username" global config setting was removed from the code ages
ago but it was still in the LaTeX doc. Remove it.

commit 028f2f0


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 26 18:00:59 2011 -0400
add config setting for acceptor pool size

Add new config setting to allow the size of the acceptor process pool
to be set to something other than the default. The default size is the
same as what it was prior to this change. Also add documentation for
the new setting, and augment the yaws.conf.template with information
about it.

commit 914a52f


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 26 15:00:47 2011 -0400
refactor hard-to-read code in yaws_config

The code to handle subconfig dirs suffered from way too many levels of
indentation. Refactor it to make it easier to read.

commit 0d6b539


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 26 15:00:24 2011 -0400
document process_options config setting

The process_options config setting was not documented, so add it to
yaws.tex.

commit c2a51e3


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Sep 25 23:52:05 2011 -0400
fix minor documentation issue for ehtml function values

commit 26e79be


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Sep 25 22:52:09 2011 -0400
allow functions to be specified as values in ehtml

Ehtml now allows functions to be used as values. You can specify a
function value as an anonymous arity 0 function, or as a tuple
consisting of a module, function name, and argument list (i.e.,
{M,F,[Args]}). Functions must return valid ehtml values, and they may
return other functions as long as those functions eventually return a
valid non-function ehtml value.

Augment yaws.tex to document this new feature. Add a new eunit test
for the feature as well.

commit 206b4d9


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Sep 23 03:42:33 2011 -0400
delete chatty messages, make yaws_server upgrade-friendly (Klarna)

Incorporate changes from Klarna (via Richard Carlsson) to delete
chatty messages in a variety of places. These messages were for
success cases; they were deleted because success cases should be
quiet.

Change yaws --check to take an optional --verbose option to allow
original verbose success messages to be emitted. Also change the yaws
script so that the --id option works for --check.

Change yaws_server to make fully-qualified calls to gserv_loop to
ensure code upgrades call into the newly-loaded module version.

commit c61e0c0


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Sep 23 03:27:43 2011 -0400
changes for OS X Lion for build and test

The configure script had a place verifying Darwin version 10.*, which
doesn't work for Lion since it's version 11.*. Allow any version
greater than or equal to 10. Also the wgettest script under test/t1
uses grep in a way that no longer seems to work under Lion (very odd),
so change it to work around the issue.

commit 769fa3a


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Sep 13 23:10:01 2011 -0400
careful review of yaws.tex, with numerous fixes

commit 1589530


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jul 17 18:38:35 2011 -0400
add yapp.app to .gitignore

Version yaws-1.91 Date: Tue Aug 2 15:44:17 2011 +0200


commit 467a675


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Aug 2 15:43:09 2011 +0200
prepare for 1.91

commit 23c0c13


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Aug 2 14:47:00 2011 +0200
Added support to generate and check strict xhtml output

commit 3bdc203


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Aug 2 14:02:46 2011 +0200
Added possibility to turn off yaws log wrapping. This is useful for applications that embedd yaws and do not want that functionality at all.

commit b6e60f0


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jul 6 21:30:24 2011 -0400
revert "remove support for SOAP DIME attachments"

This reverts commit 65bf36a597ac26559d179059a98bfcf5ebe8e9cc.

commit 4d7440f


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jul 3 15:09:50 2011 -0400
add proxy autoconfig to MIME types (Kenji Rikitake)

commit a922ccb


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue Jun 21 09:44:07 2011 +0200
catch exit signals sent by gserv process

In commit 5cc39b7, the temporary fix for issue #60, all exit signals
found when erasing transient messages are ignored. This commit
completes that fix. Exit signals coming specifically from the gserv
process to shutdown the connection are also ignored. So, only signals
from gserv are now processed and all others are flushed.

commit 5cc39b7


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jun 20 22:29:42 2011 -0400
fix reverse proxy problem (issue #60)

Change yaws_server.erl to not exit on {'EXIT', From, Reason} messages
found when erasing transient messages, a change originally introduced
in commit c0755739. Doing so was causing reverse proxy to no longer
work, as reported in issue #60 on github and as experienced by several
users. Note however that this might be a temporary fix, since it might
be better to figure out the source of the EXIT message, but I'm
committing and pushing this fix now for the benefit of those waiting
to use the reverse proxy feature.

Thanks to Manuel Durán Aguete for providing a test case making it easy
to reproduce the problem and test the fix.

commit 2961b81


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jun 18 21:48:30 2011 -0400
fix yaws_rpc session handler (Christian Adams)

Fix yaws_rpc:handler_session funs to remember sessions. The problem
resulted in the www/json_sample.html example no longer counting.

commit b4aab16


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jun 18 20:59:32 2011 -0400
let configure handle erlang built from git clone

A normal Erlang installation has versioned directory names for
applications such as sasl, kernel, and ssl. The yaws configure script
checks for these. But an Erlang built from a git clone of the OTP
repository, the versions for these applications do not exist. Trying
to build yaws using erl built in such a git clone would fail due to
this lack of versioned applications.

Change configure.in to look for normal application versions first and
if not found, look for application dirs containing vsn.mk files. If
found, use those versions instead. Also change configure.in to get the
erts version from running the emulator instead of from the erts
versioned directory name.

commit b7b8b7d


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Fri Jun 3 20:11:46 2011 +0200
fix missing whitespace in yaws_sendfile error message

commit 27105f7


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Jun 2 09:02:28 2011 -0400
slight tweak to json2 float test

commit 661aaf9


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jun 1 20:18:28 2011 -0400
fixes for json2.erl and json.erl (Nico Kruber)

Implement more precise floating point number conversions -- avoid
converting via io_lib:format/2 by using erlang:float_to_list/1. Fix
encoding lists of (small) floats (json.erl mistakenly tried to convert
them to strings). Fix/add encoding of lists to {array, List}. Handle
unicode in object keys.

commit 4451864


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jun 1 14:12:50 2011 -0400
remove leftover dbg statements

commit 8748762


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jun 1 10:13:21 2011 -0400
quiet test messages for stopping yaws

A recent change added extra stop calls for yaws to prevent problems
caused by yaws instances being left over from previous test runs. But
if yaws isn't running, these messages were emitting misleading error
messages. These are now redirected to /dev/null.

commit 183ec82


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jun 1 10:11:21 2011 -0400
restore removed jsonrpc:call/3

Restore the jsonrpc:call/3 function inadvertently removed in the
JSON-RPC 2.0 update. Add a new test for it. Remove test/src/httpc.erl
because it conflicted with inets:httpc during the execution of the new
test, and also because it's not used anywhere.

commit 11b272b


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon May 30 22:42:02 2011 -0400
use {wordsize, external} in configure script

To properly check to see whether the Erlang emulator is 32-bit or
64-bit in the configure script, call erlang:system_info with the
argument {wordsize, external} instead of just wordsize. The latter
reveals only the internal word size, which happened to work previously
(and is the only option for older versions of Erlang) but doesn't work
for halfword emulators. Fallback to an argument of just wordsize for
older versions of Erlang.

commit d12607c


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 17:43:59 2011 +0200
add tests for authentication mechanisms

commit ba8e4df


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 12:18:45 2011 +0200
add a test for request shaping

commit de9ca04


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 12:08:51 2011 +0200
add tests for argument rewriting

commit 6118169


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 12:00:40 2011 +0200
add a test for external interpretation of php scripts

commit 52e8852


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 11:50:32 2011 +0200
add tests for reentrant requests (scripts returning {page, P})

commit aab5243


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 11:39:22 2011 +0200
add a test for the 'expires' directive

commit 4f3545f


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 11:29:05 2011 +0200
add tests for post and chunked transfer-encoding requests

commit 73c9dcb


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 17:05:25 2011 +0200
fix filter_auths function

commit d39553c


Author: Christopher Faulet christopher@yakaz.com>
Date: Thu May 26 11:38:51 2011 +0200
fix get_chunked_client_data function

When the size of a chunk is a multiple of partial_post_size, last CRLF of
the chunk was not eaten.

commit 0f828e8


Author: Christopher Faulet christopher@yakaz.com>
Date: Fri May 27 09:15:17 2011 +0200
do not accumulate empty content

When a module used to rewrite arg records returns an HTTP response,
as a #rewrite_response{} record, if the content of this response is
empty, it must not be accumulated.

Version yaws-1.90 Date: Wed May 25 23:34:51 2011 +0200


commit fda6d26


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed May 25 23:32:50 2011 +0200
FreeBSD patch by Jimmy Olgeni, add quotes around vsn number in .app file

commit 16ede48


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed May 25 11:13:31 2011 -0400
increase default maximum wait-started time

Increase the default maximum time for the yaws --wait-started option
from 6 seconds to 30 seconds. The test suite was seeing random
failures due to 6 second wait not being enough. (The option doesn't
mean it waits for 30 seconds every time, just that it will wait for a
maximum of 30 seconds for yaws with the specified id to start.)

commit fcae3cd


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon May 16 23:32:54 2011 -0400
quote Install arguments in regular-install (Christopher Faulet)

commit 4c2ae80


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed May 25 10:01:11 2011 -0400
minor corrections to news file

commit 3d09de8


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed May 25 09:59:10 2011 -0400
correct handling of delayed requests (Christopher Faulet)

Correction for one of the capflam patches that wasn't fully applied.

commit 66a0c5e


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed May 25 00:37:17 2011 -0400
contributor list additions, corrections, and sorting

Fix some misspellings in the www/contributors.txt list, add missing
contributors mostly gleaned from eyeballing the old sourceforge svn
repository, eliminate duplicates, and sort it alphabetically by
surname it to make it easier to track.

commit 17df5ce


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue May 24 22:28:44 2011 +0200
starting to prepare for 1.90

commit 9dd0990


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue May 24 21:59:03 2011 +0200
publish the contributors list on frontpage

commit 1540c17


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue May 24 21:32:20 2011 +0200
starting to prepare for 1.90

commit 4582480


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue May 24 21:31:48 2011 +0200
starting to prepare for 1.90

commit c48a0e8


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue May 24 20:30:07 2011 +0200
dups

commit db7b2af


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue May 24 00:52:15 2011 -0400
fix server listen config initialization

One of the capflam contributions added the ability for a server config
to have multiple listen directives. Part of the patch was to
initialize the #sconf.listen field to the empty list when starting to
parse a server config, but that was erroneously left out. Fixed.

commit db3ec48


Author: Jean-Sébastien Pédron jean-sebastien@yakaz.com>
Date: Fri May 20 16:56:05 2011 +0200
always store a tuple in #headers.authorization (capflam)

The function yaws:parse_auth/1 returned "undefined" if it couldn't
parse the value of the "Authorization" header. In this case, we lost
the original value of this header.

Always store a tuple of the form "{User, Pass, Orig}" even if the
value can't be parsed. In this case, "User" and "Pass" are set to
"undefined".

Also, export yaws:parse_auth/1 so that 3rd-party modules can set

commit 049d4b1


Author: Jean-Sébastien Pédron jean-sebastien@yakaz.com>
Date: Fri May 20 12:40:22 2011 +0200
fix include of yaws_debug.hrl (capflam)

A couple files included yaws_debug.hrl with the following path:

../../yaws/src/yaws_debug.hrl

This assumes the root directory is named "yaws". Also, the directory
paths used are pointless since yaws_debug.hrl lives in the same
directory as the source files including it, so they can just include
it without specifying any preceding directory paths.

commit f64b24d


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:50:37 2011 +0200
improve daemon status output (capflam)

Improve the output of the "yaws --status" command by adding session
and connection counters for each group of virtual servers.

commit e014400


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:15:53 2011 +0200
allow Server header customization (capflam)

Add the server_signature directive in the global part of configuration
to allow users to customize the HTTP Server header.

commit c650d77


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed May 4 16:43:43 2011 +0200
add shaper directive to control access (capflam)

inspired by the mod_bwshare module of Apache, add the shaper directive
to control access to virtual servers. Access can be controlled based
on the client's IP address. It is also possible to throttle HTTP
requests based on the client's download rate. External modules used to
shape the traffic must implement the new behaviour yaws_shaper.

commit fd3ca71


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:15:15 2011 +0200
allow conf file pathname config with app env var (capflam)

Prior to this change you could customize the path to the configuration
file with the --conf command line argument, otherwise Yaws would use
the default configuration file. With this patch, you can also use the
application environment variable "config" to set the path of the
default configuration file.

commit 9bb7178


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:14:15 2011 +0200
init SSL sockets same as regular TCP sockets (capflam)

Give ssl:listen the same options as gen_tcp:listen, especially the
reuseaddr flag.

commit c075573


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 15:48:29 2011 +0200
soft yaws shutdown (capflam)

Close listening sockets and stop accepting new connections, and then
try to shutdown all open connections. If, after 60 seconds, some
connections remain alive, kill them. So, shutdown takes longer, but
every process handling requests has a chance to send a response before
stopping.

commit f983a1b


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:00:27 2011 +0200
arg_rewrite mods can now return HTTP responses (capflam)

Module used to rewrite arg records can now return any HTTP
response. This can be used to redirect requests or to return an
error. To do so, such a module must set the element #arg.state using
the record #rewrite_response{}. The record #rewrite_response{}
contains 3 elements:

status: any valid HTTP status code
headers: a list of {header, H}
content: an iolist

For example, to do an unconditional redirect to http://www.yakaz.com,
you can use the module simple_redir_mod.erl:

-module(simple_redir_mod.erl).
-export([arg_rewrite/1]).
-include_lib("yaws/include/yaws_api.hrl").

arg_rewrite(Arg) ->
L = "http://www.yakaz.com",
H = [{header, {location, L}}],
RwResp = #rewrite_response{status=301, headers=H}
Arg#arg{state=RwResp}.

commit 3ad1703


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 16:30:12 2011 +0200
support external handler to interpret php scripts (capflam)

phpfcgi is now deprecated. Instead, you must use php_handler. This
directive is used to customize the handler to interpret .php files. It
can be one of the following definitions:

- php_handler = cgi, Filename>
- php_handler = fcgi, Host:Port>
- php_handler = extern, Module:Function | Node:Module:Function>

If there is no php_handler or deprecated phpfcgi directive, we use the
value of php_exe_path. Its default value is "/usr/bin/php-cgi" but it
can be customized.

commit 7036143


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 14:55:05 2011 +0200
renew sconf record when {page, P} is handled (capflam)

Renew sconf record when Yaws return a different page than the one
being requested. This is particularly useful to restart checks on all
docroots.

commit b65bdb8


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 14:41:48 2011 +0200
add status option to page options (capflam)

Scripts can return {page, {Options, Page}} to make Yaws return a
different page than the one being requested, where Options is a deep
list of options. Previously the only type of option was {header, H}.
This patch adds the type {status, Code} to set the HTTP status code of
the response.

It also delays the accumulation of these headers to preserve it during
the handling of the request on Page. Both 'delayed_regular' and
'delayed_directory' need fewer checks than other requests because
they're used on the second pass and many tests have already been done
during the first pass.

commit 985491a


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed May 11 13:42:44 2011 +0200
allow multiple listen directives per server (capflam)

Sometimes, a virtual server must be bound to several IP
addresses. Previously you had to duplicate virtual server
configuration and change the address to listen on.

Now, multiple Listen directives are allowed without any
duplication. For example, if your server must listen on loopback
address on both IPv4 and IPv6, your server part may be:

server www.yakaz.com >
port = 80
listen = 127.0.0.1
listen = ::1
...
/server>

commit d9342f8


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed May 4 15:49:18 2011 +0200
server-specific logger_mod and auth_mod (capflam)

Make logger_mod and auth_mod configuration variables local to each
virtual server. The logger_mod variable can be used to customize
access and auth messages. The auth_log variable previously was global,
but it now lives in the server configuration and the global variable
is deprecated.

The new behaviour yaws_logger must be used to define external modules
to log messages.

commit 4a7c1b1


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed May 11 09:25:52 2011 +0200
support parsing of literal IPv6 addresses (capflam)

Support parsing of URLs with literal IPv6 addresses in function
yaws_api:parse_url, like http://[::1]:8080.

commit a2805a9


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 15:02:38 2011 +0200
allow hard reload of conf without stopping (capflam)

Allow a hard reload of the configuration when the server is running,
without stopping the application. This happens when the configuration
has changed too much (e.g. the IP address of virtual server). This is
done by stopping all gserv processes and restarting it with the new
configuration, so it is pretty brutal.

commit 6764e5d


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:35:52 2011 +0200
fix gserv counters (capflam)

Each group of virtual servers (same IP, same port) is represented by
an Erlang process that maintains some counters, but these counters
were not updated correctly. Fix it so they are.

commit c60fc5f


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 16:02:28 2011 +0200
add control for "Expires" and "Cache-Control" response headers (capflam)

Allow an expires list in the server configuration and add "Expires"
and "Cache-Control" headers in responses if the mime type of the
document matches an element of this list. Like the Apache mod_expires
module, the "expires" configuration directive controls the setting of
the Expires HTTP header and the max-age directive of the Cache-Control
HTTP header in server responses. The expiration date can be relative
to either the time the source file was last modified or to the time of
the client access. It is possible to have multiple expires directives
for a virtual server.

Here is an example:

server www.yakaz.com >
...
expires = image/gif, access+2592000> image/png, access+2592000>
expires = image/jpeg, access+2592000> text/css, access+2592000>
expires = application/javascript, modify+2592000>
...
/server>

commit 2b603fc


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:13:24 2011 +0200
add "application/javascript" as a compressible mime type (capflam)

commit b955bca


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:10:49 2011 +0200
use "partial_post_size" for chunked requests (capflam)

Chunked requests were read entirely into memory, so for very large
POSTs Erlang could run out of memory. Use the config value
"partial_post_size" to read these requests in blocks, same as for
non-chunked requests.

commit ab09643


Author: Christopher Faulet christopher@yakaz.com>
Date: Wed May 4 08:58:32 2011 +0200
authorization improvements (capflam)

There are two changes here. The first improves the implementation of
authentication mechanisms, like authentication inside all docroots and
recursion through subdirectories (if you define an authentication
policy for a directory, then it is automatically applied to any
subdirectories, except those with their own authentication policy). It
also adds the docroot directive in auth structures (or .yaws_auth
files) to restrict it to a specific docroot (no docroot configured
means all docroots). We can now also configure authentication for
specific files instead of just directories.

The second one adds ACLs (Access Control List), like Apache's
mod_access module, to protect data. You can add directives in auth
structures (or .yaws_auth files) to control access to particular parts
of the server based on the client IP address. The allow and deny
directives are used to specify which clients are or are not allowed to
access to the server, while the order directive sets the default
access state and configures how the allow and deny directives interact
with each other. Use "/" as default directory in auth structure;
yaws.conf manpage has been updated accordingly.

Here is an example:

server www.yakaz.com >
...
auth>
docroot = /var/www/yakaz/admin
deny = all
allow = 127.0.0.1, 192.168.0.0/24
order = deny,allow
/auth>
...
/server>

commit bc1a16b


Author: Christopher Faulet christopher@yakaz.com>
Date: Tue May 3 12:23:27 2011 +0200
add yaws.appup.src template file (capflam)

Add yaws.appup.src template file used to build the final yaws.appup
file. Also add ebin/yaws.appup to .gitignore.

commit 739fcd6


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat May 21 13:39:31 2011 +0200
added contributors.txt

commit 3385b0a


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun May 15 18:20:30 2011 -0400
minor edits in yaws.tex

commit 1aeaccd


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon May 9 22:12:56 2011 -0400
check for install dirs before calling mkdir

In the new scripts/regular-install script, check for directory
existence before calling mkdir.

commit bccfd7f


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun May 8 16:41:38 2011 -0400
fix rebar-related installation errors

Fix install-related errors caused by refactoring for rebar. One error
was that the new gen-yaws-conf script was trying to create directories
needed for the local-install script, and the other was that the
regular-install script was attempting to create a directory named
$DESTDIR, which is typically an empty string.

commit 61a1116


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 7 23:20:54 2011 -0400
more build avoidance for rebar build

Modify scripts/rebar-pre-scripts and scripts/local-install to avoid
rebuilding generated files that haven't changed since the last
build. Modify scripts/Makefile to account for local-install changes.

Also apply minor fix to rebar.config indentation.

commit 21d0299


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Wed May 4 23:47:11 2011 +0200
epam: removed unused variable

commit bedbc05


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Sat May 7 09:09:03 2011 -0400
add rebar support (Tuncer Ayaz and Steve Vinoski)

Add support for building yaws with rebar. The original configure and
make support is kept intact.

If you build with rebar you get a local install. The rebar approach
does not support a regular install, which defaults into /usr/local. If
you want a regular install, use configure and make.

Create a new top-level contrib directory and move unused src files
there. Also move src/benchmarks and src/contrib contents there as
well. Remove the obsolete src/patches directory. This is all to keep
rebar from compiling this unused code (since by default it compiles
everything under the src dir).

Move a number of build rules out of Makefiles into separate scripts so
they can be used by both rebar and make.

Modify yaws version specifier and handling to be amenable to rebar.

Clean up trailing whitespace in a number of scripts and Makefiles.

Use the following environment variables to customize the rebar build
defaults:

DEFAULT_CHARSET: used in mime type table (default: "")
ERLBINDIR: e.g. /usr/local/bin
ETCDIR: etc directory (default: ./etc)
VARDIR: var directory (default: ./var)

commit d8cf062


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 7 08:28:50 2011 -0400
augment index.yaws and news

Add a link to the Yaws github repo to the Yaws front page.

Add a note about JSON-RPC 2.0 changes to the news page.

commit 5ca422e


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 7 00:26:30 2011 -0400
fix object lookup problem in jsonrpc

Fix a matching problem causing lookups to fail in JSON objects used
for JSON-RPC calls.

commit b16f002


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon May 2 19:10:49 2011 -0400
fix warning introduced in JSON-RPC 2.0 changes

commit 15454bc


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun May 1 20:14:33 2011 -0400
JSON-RPC 2.0 support

Convert existing JSON-RPC support to version 2.0, supporting all
features mentioned here:

http://groups.google.com/group/json-rpc/web/json-rpc-2-0

Add all the examples from that webpage as new tests.

Modify documentation to note that version 2.0 of JSON-RPC is now
supported.

commit 96534b2


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 24 00:25:48 2011 -0400
replace json.erl with json2.erl to fix issue 50

Yaws issue 50 (https://github.com/klacke/yaws/issues/50) notes that
the json.erl module uses list_to_atom and is therefore dangerous due
to the possibility of filling the atom table. Also, the test function
in json.erl has been broken for quite some time. Deprecate json.erl
and add json2.erl, which avoids list_to_atom. Repair the json2:test/0
function inherited from json.erl and add it to the t1 test
suite. Change www/json_intro.yaws to refer to json2.

commit 5d8fd4a


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 19 21:22:20 2011 -0400
improve error message for setting process ulimit

The test/t1/runtest script attempts to raise the process ulimit if
it's too low to run its load test. Improve the error message it emits
if it can't set the ulimit to the desired level.

commit 455578a


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 19 20:49:18 2011 -0400
major trailing whitespace cleanup

Remove trailing whitespace in all .erl and .hrl files in the
repository.

If you're an emacs user, you can easily see trailing whitespace using
settings like these in your ~/.emacs file:

(setq-default show-trailing-whitespace t)
(set-face-background 'trailing-whitespace "slate gray")

You can also delete trailing whitespace automatically when you save
your Erlang sources by setting the emacs before-save-hook in your
~/.emacs file like this:

(add-hook 'before-save-hook
'(lambda () (if (eq major-mode 'erlang-mode)
(delete-trailing-whitespace))))

commit f74f67a


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Apr 18 10:58:22 2011 -0400
set HTTP_HOST properly for CGI

Set HTTP_HOST to the value of the HTTP Host header, rather than just
setting it to the server hostname. Thanks to Roman Arefiev for
tracking down the fact that HTTP_HOST was set incorrectly.

commit 4aa146b


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 17 00:04:06 2011 -0400
fix dialyzer problems in yaws_sendfile changes

commit 4872cd7


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 16 22:43:06 2011 -0400
delete ets table in terminate

Delete the caller table in terminate, and fix the terminate return
value.

commit d75acaf


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 16 17:56:05 2011 -0400
restore overflow handling dropped in previous commit

Restore handling of eoverflow errors in sendfile, which was
accidentally left out of the previous commit.

commit 6a4c4e7


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 16 17:26:36 2011 -0400
change sendfile driver handler to a gen_server

Rather than use a custom message handling loop, make the yaws_sendfile
driver handler a gen_server. Collapse the yaws_sendfile_compat
functionality directly into yaws_sendfile and remove
yaws_sendfile_compat, and change all references to
yaws_sendfile_compat to refer to yaws_sendfile instead.

commit a425e71


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Apr 13 06:57:19 2011 -0400
fully qualify call to erlang:max

commit 7add0cf


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Apr 13 00:06:48 2011 -0400
update mime.types from recent Apache web server sources

Also eliminate trailing whitespace in the file.

commit 6eee2aa


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 12 23:26:00 2011 -0400
remove leftover debug code in yaws_api.erl

commit d9a795a


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 12 15:58:11 2011 -0400
add binary option to multipart/form-data parsing

Add optional arguments list and binary (passed as atoms) to specify
whether the uploaded file data should be returned in list form or
binary form, respectively. By default
yaws_multipart:read_multipart_form returns uploaded file data in list
form to preserve backwards compatibility. But using the binary option
can result in yaws requiring less memory for handling file uploads.

The same options can now also be passed to
yaws_api:parse_multipart_post.

commit b6f774f


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Apr 12 15:03:01 2011 +0200
Removed the contribs stuff from the front webpage, it was lame and inaccurate

commit 501ad5d


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 10 16:06:28 2011 -0400
rewrite multipart/form-data POST handling

Issue 38 (https://github.com/klacke/yaws/issues/38) states that
POSTing large files crashes Yaws due to out-of-memory (OOM). I found
that POSTing just a half meg file will drive Yaws to OOM on my 3 GB
Macbook Pro.

Rewrite the multipart/form-data handling (which is almost 10 years old
at this point). Avoid converting the data to lists for processing, and
avoid processing the data byte-by-byte. Use Boyer-Moore searching to
find data boundaries, and use erlang:decode_packet to handle part
headers.

Unfortunately binaries are still converted to lists after all
processing is completed. This is required for backward compatibility,
but it means a lot of memory still gets used to handle large file
uploads, even though it's not as much memory as was previously
required.

commit f922e85


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 10 16:04:48 2011 -0400
add applications/wiki/scripts files to .gitignore

commit 1edce78


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Apr 6 17:14:08 2011 -0400
no code changes, just cleanup trailing whitespace

commit 4539905


Author: Torbjorn Tornkvist tobbe@tornkvist.org>
Date: Mon Apr 4 12:36:07 2011 +0200
Adding mime type for WOFF font files.

This according to: http://www.w3.org/TR/WOFF/#appendix-b

commit 3f08480


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 3 14:59:33 2011 -0400
add configurable access logging

Add the global logger_mod config variable to allow for customized
access logging. Document logger_mod in yaws.conf.5 and yaws.tex.

commit 799f0c7


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Mar 25 11:32:35 2011 -0400
make RUNTEST_CURLS reflect actual number of curl test clients

commit 870ef05


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Mar 18 20:50:40 2011 -0400
fix yaws_server dialyzer issues

In yaws_server the old function ut_open used to return either {bin,
Bin} or an open file handle depending on how it was called. A number
of other areas of the yaws_server code also handled either a file
handle or {bin, Bin}. The ut_open function was changed in June 2002 to
deal only with binaries, and dialyzer correctly pointed out that a
number of areas of the code were obsolete as a result. Change
yaws_server to get rid of ut_read and ut_close, then rename ut_open to
ut_read and have it just return a plain binary. Remove all vestiges of
code relying on the old behavior related to open file handles.

This clears up all known dialyzer issues in yaws_server.

commit f43aa7d


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Mar 6 22:26:58 2011 +0100
correction

commit 525846e


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat Mar 5 13:13:04 2011 +0100
Some dialyzer fixes - no real bugs, just enhancements, removed the deprecated feature of fdsrv, and fixed some bugs recently introduced by Tobbe and yaws_session_server

commit b1e886f


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat Mar 5 00:24:33 2011 +0100
compiler warning

commit ce93c84


Author: Torbjorn Tornkvist tobbe@klarna.com>
Date: Sat Mar 5 00:18:50 2011 +0100
Adding access functions for various Yaws records.

By adding these access functions for extracting data out from
some of the Yaws records (e.g the #arg{} record, it is possible
for other code to avoid having a dependency to any Yaws .hrl files.

For example: SimpleBridge can now implement its wrappers without
having to include yaws_api.hrl.

commit d2d461c


Author: Torbjorn Tornkvist tobbe@tornkvist.org>
Date: Fri Mar 4 09:38:24 2011 +0100
Figuring out proper yaws_session_server backend.

This fixes the problem with getting hold of the yaws_session_server
backend when running in embedded mode. In this mode, no #gconf{}
record may be available when the yaws_session_server want to figure
out what backend to use. The fix stores the 'pending' configuration
as a yaws appplication environment variable 'embedded_conf', which
makes it possible for the yaws_session_server to get hold of the
backend when starting up. If still no #gconf{} can be obtained,
we will fallback to the default yaws_session_server backend.

commit b0514f5


Author: Torbjorn Tornkvist tobbe@tornkvist.org>
Date: Fri Mar 4 09:34:07 2011 +0100
Fixing up the start_embedded code.

Add an explicit check for successfully starting Yaws.
Adding proper setup of authdirs in start_embedded.

commit 9791223


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Mar 3 23:41:54 2011 +0100
indent

commit 6e96a14


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Mar 3 16:06:39 2011 +0100
indendation cleanup

commit c90c603


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Mar 3 12:54:18 2011 +0100
ugly indent, plus a dialyzer warning for dead code

commit 3d1c7df


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 2 22:54:47 2011 -0500
avoid keeping our own copy of ibrowse

Remove our copy of ibrowse in our test directory from git
control. Instead, download ibrowse master from github if we don't have
a fresh copy. Track master HEAD to make sure we have the latest.

Change test/Makefile to fetch ibrowse if needed as part of building
the "all" target.

Add test/ibrowse to .gitignore.

commit 28cb08d


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 2 20:58:48 2011 -0500
make "make clean" also clean the test directory

commit 65bf36a


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 2 20:49:41 2011 -0500
remove support for SOAP DIME attachments

Remove DIME support. We're cleaning up dialyzer errors in Yaws and the
DIME code had some problems, so we decided to drop it rather than try
to fix it since we don't believe anyone's using it. Microsoft has
dropped support for DIME anyway, recommending MTOM instead.

commit 6c982a7


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 2 14:38:48 2011 -0500
do not use ERL_DRV_USE when de-selecting sendfile socket

The sendfile driver does not own the HTTP sockets to which it sends
data, and so it never closes them. The previous commit erroneously set
ERL_DRV_USE on the driver_select(..., 0) call, which causes erts to
justifiably complain about the driver not implementing the stop_select
call. Remove ERL_DRV_USE for this case. Thanks to Tuncer Ayaz.

commit 3a5b906


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 2 11:36:12 2011 -0500
fix EINTR handling in sendfile driver

Tuncer Ayaz pointed out that OS X sendfile will return bytes sent for
the case when EINTR occurs. Make sendfile driver handle this case by
treating EINTR the same as EAGAIN for all supported platforms.

Also update driver to use ERL_DRV_* flags in driver_select calls if
they're defined, rather than the old DO_* flags. This is considered
correct practice since R13B.

commit db682d3


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 2 11:31:51 2011 -0500
add test target to top-level Makefile

Add test target to top-level Makefile to allow tests to be built and
run from that level.

Also fix the start target in test/support/include.mk.in to only try to
start a yaws instance if the current working directory contains a
yaws.conf file. The lack of this check was preventing half the tests
from running under "make test".

commit f0c19f6


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Mar 2 09:19:41 2011 -0500
change the previous dialyzer fix (thanks to Kostis)

commit c833e54


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Mar 1 17:34:20 2011 -0500
comment out unused ssl functions

Comment out the ssl_fail_if_no_peer_cert functions to eliminate
warnings about them being unused.

commit b6ffe23


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Mar 1 16:41:07 2011 -0500
fix more dialyzer warnings

commit 1fcdfd7


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Mar 1 22:01:38 2011 +0100
removed unused post/query parsing code

commit 3a55037


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Feb 28 15:25:48 2011 -0500
yaws_cgi dialyzer cleanup (thanks to Kostis Sagonas)

Clean up dialyzer warnings. Make sure fcgi_receive_binary return value
used consistently everywhere. Comment out code used for
as-yet-unsupported FCGI features to avoid dialyzer warnings.

commit 8493ded


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Feb 28 08:45:33 2011 +0100
Use a binary comprehension instead of god old list_to_binary as per suggestion from Kostis

commit d744060


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Thu Feb 24 12:48:48 2011 +0100
Fix Dialyzer warning: remove dead code

commit 2f8a8c6


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Wed Feb 23 03:28:25 2011 +0100
Fix unused clause Dialyzer warnings in yaws_rss

commit 6f61f74


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Wed Feb 23 03:17:25 2011 +0100
Fix zlib:deflate/3 Dialyzer warning

commit 9e516ba


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Sun Feb 20 14:50:28 2011 +0100
Fix calls to undefined functions

commit 438cfb1


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Sun Feb 20 14:32:31 2011 +0100
Fix deprecated guard warnings

commit 4637975


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Feb 25 23:50:32 2011 +0100
dialyzer

commit dad71b7


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Feb 25 23:45:32 2011 +0100
more dialyzer bugs, soap_srv startup code that could never run

commit 8e64d3b


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Feb 25 17:14:40 2011 +0100
Some minor bugs, and some dead code removed, all found by Tuncers run of dialyzer

commit df47d9c


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Feb 25 16:49:33 2011 +0100
compile bug

commit 88915e6


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Feb 24 12:32:28 2011 +0100
io:format leftover

commit f73d23d


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Feb 23 22:30:02 2011 +0100
Fixed dialyzer bugs found by Tuncer, Issue #54

commit 5ea40d4


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Feb 16 19:28:54 2011 -0500
eliminate redundant check for erl

commit e7e6404


Author: James Lee jameslee@gwu.edu>
Date: Wed Feb 16 14:14:29 2011 -0500
configure ERLBINDIR relative to ERLDIR

Rather than configuring ERLBINDIR relative to ERL, which doesn't work
when ERL is in a strange location such as /usr/bin/amd64/erl,
configure it relative to ERLDIR.

commit 98f8db9


Author: Yurii Rashkovskii yrashk@gmail.com>
Date: Mon Feb 14 00:45:47 2011 -0800
Fix configure failing to determine word size on Linux platform.

It was not explicitly specifying that it needs Erlang to run the test so autoconf was trying to
compile that halt(...) code test as a C program, which obviously leads to a failure

commit 6b56677


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jan 26 15:54:04 2011 -0500
filter erl output for setting ERLDIR

A user reported a problem with yaws-1.89 where ERLDIR was getting set
incorrectly because his R14B01 Erlang installation was emitting the
string "Running Erlang" as part of the output used to set the ERLDIR
variable. (I don't know why, since that string doesn't appear anywhere
in the sources as far as I can see.) Change the command used to set
ERLDIR so that only the last line of output is kept.

commit 3cdb645


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Jan 17 22:16:20 2011 -0500
teach linux build to distinguish 32- and 64-bit erlang

Change Linux build to check whether the Erlang system available is
32-bit or 64-bit and use the right build flags for c_src to
match. This support is mostly the same as changes added some time ago
to distinguish 32- and 64-bit builds on OS X.

Also change configure script to use "host" where "target" used to be
used, since according to autotools documentation "host" is what was
really meant.

commit 2d74b84


Author: Nicolas Thauvin qux@free.fr>
Date: Thu Jan 6 01:25:44 2011 +0100
Added a comment in yaws.hrl

commit c6f26aa


Author: Nicolas Thauvin qux@free.fr>
Date: Thu Jan 6 01:23:08 2011 +0100
Pluggable ysession storage with mnesia sample in src/contrib, part 2

commit 0761bb2


Author: Nicolas Thauvin qux@free.fr>
Date: Thu Jan 6 01:15:26 2011 +0100
Pluggable ysession storage with mnesia sample in src/contrib

commit 3aac349


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Dec 29 13:16:25 2010 +0100
openbsd port

commit 2e97498


Author: Fabian Linzberger e@lefant.net>
Date: Tue Nov 9 17:11:18 2010 +0100
add manpage entry for x_forwarded_for_log_proxy_whitelist

(As part of pulling from Fabian's branch to get this change I also
repaired some formatting for another entry and amended the
commit. --steve)

commit 1c3afb1


Author: Tuncer Ayaz tuncer.ayaz@gmail.com>
Date: Thu Nov 25 07:37:53 2010 +0100
Fix 'implicit declaration of function' warnings

c_src/yaws_sendfile_drv.c: In function 'set_error_buffer':
c_src/yaws_sendfile_drv.c:142:9: warning: implicit declaration of
function 'tolower'
c_src/yaws_sendfile_drv.c: In function
'yaws_sendfile_drv_ready_output':
c_src/yaws_sendfile_drv.c:259:9: warning: implicit declaration of
function 'close'

commit 35a5c1a


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Dec 7 23:41:34 2010 -0500
add configure detection of erts bits support

The websockets support relies on bits support in Erlang. The
src/Makefile used to contain a gmake shell command for checking the
erts version to see if bits support was present. This change moves
that test into the configure scripts and adds a new make variable to
include.mk that src/Makefile can use instead. This keeps configuration
checks out of the makefiles and in the configure script where they
belong.

Also fixed the test for bits support, which would have been incorrect
once the erts major version number increases above 5 because it also
unconditionally wanted the erts minor number to be greater than 6, so
a major/minor version such as 6.0 would have failed.

commit 7d10e6f


Author: Peter Lemenkov lemenkov@gmail.com>
Date: Thu Nov 18 12:53:34 2010 +0300
Typo fix in previous commit

Module yaws_dime should be listed w/o extension.

Signed-off-by: Peter Lemenkov lemenkov@gmail.com>

commit 5708168


Author: Peter Lemenkov lemenkov@gmail.com>
Date: Wed Nov 17 18:20:23 2010 +0300
Add yaws_dime.erl to the list of modules to compile

This module is used in yaws_rpc, yaws_soap_lib and
yaws_soap_srv modules but it wasn't compiled. So it's
quite likely that application will fails with 'undef'
error.

Signed-off-by: Peter Lemenkov lemenkov@gmail.com>

commit 29fb4cd


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Nov 17 12:59:32 2010 +0100
security vulnerability for win32 reported at http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-4181

commit d2225ed


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Nov 8 09:41:23 2010 +0100
bug in upload to file code found by Mojito Sorbet

commit 68111e1


Author: François de Metz fdemetz@af83.com>
Date: Fri Oct 29 14:33:16 2010 +0200
added webm mime type

commit c25ed57


Author: Dan Willemsen dan@danw.org>
Date: Sat Oct 23 17:06:32 2010 -0700
fix SSL Websocket support (Dan Willemsen)

fixed a case where a gen_tcp call was erroneously being used on an SSL
socket

commit 40fac1e


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 21 16:10:18 2010 -0400
add eunit tests to top-level test Makefile

Make sure eunit tests get executed when test/Makefile is used to run
all the tests.

commit 31995fe


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Oct 21 16:00:40 2010 -0400
let fdsrv return ignore for normal connection

Allow fdsrv to return the atom ignore, which tells yaws_server to just
listen normally. This is useful because fdsrv is global, but the user
might want to use it for just one virtual server while having listen
sockets for other virtual servers set up normally.

commit a1e2e74


Author: Fabian Linzberger e@lefant.net>
Date: Wed Oct 6 16:49:40 2010 +0200
add implementation of X-Forwarded-For header (Fabian Linzberger)

* Add x_forwarded_for_log_proxy_whitelist global config parameter and
parsing for it.

* Add x_forwarded_for header in record definition and collection
(based on code by Chris Double he mentions on
http://www.bluishcoder.co.nz/2006/04/handling-x-forwarded-for-in-yaws.html)

* For yaws_server:maybe_access_log/3: if originating IP is present in
x_forwarded_for_log_proxy_whitelist, log last IP found in
x-forwarded-for header instead of originating IP

commit c54054e


Author: Torbjorn Tornkvist tobbe@klarna.com>
Date: Mon Oct 11 15:00:27 2010 +0200
Ahhrg...minor text modification of previous commit.

commit 9b4dc47


Author: Torbjorn Tornkvist tobbe@klarna.com>
Date: Mon Oct 11 14:58:16 2010 +0200
Adding some more text to the arg_rewrite_mod paragraph to highlight the use of the yaws_vdir module.

commit 43d6620


Author: Torbjorn Tornkvist tobbe@klarna.com>
Date: Thu Oct 7 16:21:52 2010 +0200
Adding yaws_vdir.erl to the Makefile.

commit 713e35b


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Oct 5 21:37:02 2010 +0200
--running-config flag to query a running yaws for its config

commit 035303b


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Oct 5 21:15:32 2010 +0200
bad docs for ssl verify

commit 891a972


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Oct 5 11:18:53 2010 -0400
updated mime.types

Updated mime.types based on Apache's mime.types. See the top of
src/mime.types for details.

commit 9bcdaf6


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Oct 4 12:19:23 2010 -0400
fix typos on soap intro page (reported by Wes James)

Fix typos, and also update the instructions for retrieving erlsom to
use github.com instead of SourceForge.

commit 6d5b980


Author: Per Andersson avtobiff@gmail.com>
Date: Fri Oct 1 18:55:26 2010 +0200
Added handling of SSL option.

* Added access functions for fail_if_no_peer_cert.
* Handle new SSL verify and fail_if_no_peer_cert options in config.

commit b6cbbe5


Author: Per Andersson avtobiff@gmail.com>
Date: Fri Oct 1 17:56:23 2010 +0200
Fixed and updated SSL verify options.

* Fixed documentation for verify values to correspond to Erlang's SSL
implementation.
* Updated documentation to include new SSL implementation options.
* Updated #ssl{} and yaws:ssl_listen_opts/2 to include
fail_if_no_peer_cert.

Version yaws-1.89 Date: Sat Sep 25 14:42:13 2010 +0200


commit f5e6004


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat Sep 25 14:41:31 2010 +0200
1.89 rel work

commit f3bfae3


Author: Claes Wikstrom klacke@topaz.(none)>
Date: Sat Sep 25 14:22:40 2010 +0200
preparing for 1.89

commit 896b8b1


Author: Hans-Christian Esperer hc@hcesperer.org>
Date: Wed Sep 15 19:48:02 2010 +0200
Fix all.zip routine.

all.zip should not not include .yaws files, nor directories
"protected" with an index file, nor directories protected by an auth
directive.

commit 7f922a0


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 15 09:54:21 2010 -0400
adjust to R14B change in gen_tcp:recv for {packet,http} mode

Where we handle the return value of gen_tcp:recv while reading headers
from the socket (such as with calls to yaws:do_recv), handle new R14B
return values as well as existing return values for previous
releases. According to the R14B release notes:

For a socket in the HTTP packet mode, the return value from
gen_tcp:recv/2,3 if there is an error in the header will be
{ok,{http_error,String}} instead of {error,{http_error,String}} to
be consistent with ssl:recv/2,3.

commit 62a7cd5


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 1 18:12:02 2010 -0400
very minor whitespace fixes

commit 8e18857


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 1 01:32:26 2010 -0400
for portability, use erlang:md5 rather than crypto md5

Since OpenSSL availability on Windows for working with the crypto
module is apparently questionable, use the erlang:md5 function in
place of the crypto md5 functions.

commit 8e42e4e


Author: Steve Vinoski svinoski@erlang.(none)>
Date: Sun Aug 29 21:44:05 2010 -0400
restore conf target, just make it use stdconf

The previous change to test/t2/Makefile broke test/Makefile,
which expects t1 and t2 to have conf targets. Restore the conf
target but simply make it depend on stdconf.

commit d2d1f53


Author: Steve Vinoski svinoski@erlang.(none)>
Date: Sun Aug 29 20:37:01 2010 -0400
eliminate redundant conf target in t2 test Makefile

The test/t2/Makefile contained a conf target, but the
stdconf target in test/support/include.mk already does
what's needed. Eliminate conf and just use stdconf.

commit 4ebda22


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Aug 27 21:20:00 2010 -0400
minor code cleanup

commit 5a70e44


Author: Dominique Boucher schemeway@gmail.com>
Date: Thu Aug 26 22:15:14 2010 -0400
Reverted some names to ease merge.

commit 1d1adb8


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Aug 26 22:11:10 2010 -0400
teach fcgi_encode_name_value to handle non-flat lists

The yaws_cgi:fcgi_encode_name_value function can now handle non-flat
lists for Name and Value, to allow callers to form them via io:format
for example.

commit fe2e42a


Author: Dominique Boucher schemeway@gmail.com>
Date: Thu Aug 26 22:03:09 2010 -0400
Added support for websockets v76.

commit af39f30


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Aug 26 16:12:04 2010 +0200
Better error message when fds run out

commit d1ecdbf


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Aug 24 10:53:44 2010 -0400
avoid abnormal exit for FCGI worker failures

If an FCGI worker fails, which can happen for example if its TCP
connection to the FCGI server fails, we log an error message and
exit. Change the exit to always be normal to avoid filling logs with
additional process crash messages for any abnormal exits.

commit 5155b86


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Aug 23 00:47:43 2010 -0400
Add auth_skip_docroot server config variable (Christian Hennig)

At startup Yaws normally searches the entire docroot for .yaws_auth
files. For very large docroot directories, the time required to
perform the search can result in unacceptably long startup times. To
allow for large docroot directories, add auth_skip_docroot server
config variable which, if set to true, prevents Yaws from searching
the docroot for .yaws_auth files. The variable defaults to false.

Add documentation for auth_skip_docroot variable.

Also clean up some whitespace and typos in the yaws.conf.5 man page.

commit 88c4e83


Author: Joseph Wayne Norton norton@alum.mit.edu>
Date: Fri Aug 13 22:51:16 2010 +0900
Fix use_old_ssl=bool() for R14A

Starting with R14A release, ssl_impl() must always be set for forwards and backwards compatibility.

commit ee35df4


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Aug 3 01:09:34 2010 -0400
add --umask option to yaws script

Users can use the --umask option to set the process umask for the yaws
daemon. By default the daemon inherits the umask of its parent process.

commit ebf7bc5


Author: Mikael Karlsson karlsson.rm@gmail.com>
Date: Mon Jul 26 10:40:59 2010 +0200
Modifed yapp application - added simple example and changed oroginal authors mail address.

commit 08fcadd


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jul 24 16:31:16 2010 -0400
add generated doc files to .gitignore

commit 7c6fd31


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Jul 24 15:18:37 2010 -0400
performance enhancements

Based on a yaws configuration consisting of an appmod registered on
"/" and simply returning {status, 204} with no response body, these
changes resulted in a 6.8% performance improvement on a modest older
Ubuntu 8.10 2.40GHz Core 2 Duo box with 2GB of RAM. The changes were
identified by analyzing fprof output, and performance was measured
using ab (ApacheBench) running on the same host as shown below:

ab -k -n 1000000 -c 1000 http://localhost:8200/

The access log was disabled and the listen backlog was set to 512, but
other than that the default configuration was used. Requests per
second went from ~14750 to ~15750. YMMV.

commit 8b5e74b


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Jul 20 20:26:40 2010 -0400
add support for PHP FCGI applications (Hans-Christian Esperer)

Add server configuration support for PHP FCGI applications. Modify
dispatching support to invoke a PHP FCGI server for .php files if
configured.

Modify existing FCGI application server configuration to use a single
separate fields. Use the same approach for the phpfcgi field. Patch up
yaws_cgi.erl for these changes.

Enhance yaws.conf.5 and yaws.tex to describe the new PHP FCGI
support.

Also fix a number of editorial issues in yaws.tex.

commit 9c23ce4


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jul 16 15:07:33 2010 -0400
fix cached process counter (Hans-Christian Esperer)

Stopping old cached processes was not properly resetting the cached
process counter, eventually resulting in a lack of any cached
processes.

commit ca1c8b1


Author: Mikael Karlsson karlsson.rm@gmail.com>
Date: Thu Jul 1 20:40:56 2010 +0200
Fixed a number of compiler warnings and html validation errors

commit 641939a


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jun 27 17:10:47 2010 -0400
return part headers from yaws_multipart:read_multipart_form

Each part of a multipart/form-data message can have part-specific
headers such as Content-Type and Content-Transfer-Encoding. This
changes adds these headers to the parameter lists within the dict
returned from yaws_multipart:read_multipart_form and to the parameter
list returned from yaws_api:parse_multipart_post.

Modify the documentation to reflect the fact that these headers are
now returned if present. Also fixed a coding error in the existing
multipart example in yaws.tex.

Add a new unit test to multipart_post_parsing.erl to verify the return
value of yaws_multipart:read_multipart_form. The unit test previously
checked only yaws_api:parse_multipart_post.

This work is based on a patch submitted by Dilshod Temirkhodjaev.

commit 144ac13


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Jun 21 22:51:13 2010 +0200
docs

commit 1407f5e


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jun 15 19:04:59 2010 +0200
docs

commit 02feeaa


Author: Alexander Simonov alex@simonov.in.ua>
Date: Fri Jun 4 13:54:23 2010 +0300
patch for no-return-in-nonvoid-function error

commit ebb4323


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun May 30 22:44:09 2010 -0400
updates to make two-mode-mode work with emacs 23

commit cd6d9be


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 29 07:21:22 2010 -0400
fix typo in documentation example

commit 8cedffc


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat May 29 07:20:14 2010 -0400
remove local copy of erlsom.hrl (Mikael Karlsson)

This was meant to be part of commit 358c69d53.

commit 9608fa1


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Fri May 28 10:48:44 2010 +0200
doc error

commit 358c69d


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu May 27 00:29:58 2010 -0400
remove compile time dependencies on erlsom hrl files (Mikael Karlsson)

Also, due to problems with yaws_soap_lib:priv_dir/0, add some extra
code that makes use of code:priv_dir.

commit cc1575b


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 21 11:10:50 2010 -0400
do not append "/" to revproxy prefix for static config

Commit 281d993 changed reverse proxy prefix handling to correct a
problem with leading slashes. This fix should have been part of that
commit as well, as it eliminates a previous change to yaws_config.erl
to ensure prefixes handled "/" correctly given how they were being
parsed in the revproxy code.

With this change, both static config and embedded startup config
should work correctly for revproxy.

commit 281d993


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu May 20 11:06:50 2010 -0400
allow leading slash on revproxy prefix

Trying to "mount" a remote site underneath a path other than "/" under
our docroot with a revproxy was hitting function clause errors in
yaws_revproxy.erl. Change the strip_prefix function there to properly
handle prefixes with leading slashes.

commit 5da72a3


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed May 12 00:53:21 2010 -0400
Allow "stream processes" to close the client socket

Yaws allows application processes to take control of the client socket
via the streamcontent_from_pid directive. Sometimes during the course
of its data delivery the application might find that it needs to close
the socket, but the original design did not provide a way for the
application to tell Yaws the socket was closed. The result was that a
message like the one below would show up in the Yaws log whenever a
closed socket was returned to Yaws, due to Yaws trying to continue to
use the socket as if it were still open:

=ERROR REPORT==== 12-May-2010::00:27:05 ===
Yaws process died: {{badmatch,{error,einval}},
[{yaws,setopts,3},
{yaws,http_recv_request,2},
{yaws,do_http_get_headers,2},
{yaws,http_get_headers,2},
{yaws_server,aloop,3},
{yaws_server,acceptor0,2},
{proc_lib,init_p_do_apply,3}]}

Change yaws_api:stream_process_end/2 to allow the application to pass
the atom 'closed' as the first argument, in place of the socket
argument. This informs Yaws that the socket is closed and prevents it
from trying to keep using it, thus avoiding errors like the one above.

commit fd5e602


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue May 11 01:50:56 2010 -0400
Augment yaws man page with --erlarg argument quoting info

If a multi-word argument is passed to --erlarg, it must be quoted in
the calling shell so that yaws sees it as a single argument. Add
details to the man page about this, and also show an example of how
single quotes within such a multi-word argument must receive extra
quoting.

commit 17be957


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon May 10 13:51:37 2010 -0400
Use gconf keepalive_timeout for connection lifetime (Brady McCary)

Previously persistent connections were held open for a hard-coded 30
seconds, and if no request was received in that time, Yaws closed the
connection. Change this behavior to use the gconf keepalive_timeout
field to determine the amount of time the connection is held open
rather than using a hard-coded timeout. The default is still 30
seconds, but users can change the default by specifying a different
value for keepalive_timeout in their Yaws configuration.

Also, fix yaws.tex to document the keepalive_timeout setting as well
as other recent changes such as max_connections and keepalive_maxuses.

commit 9194d12


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun May 9 00:08:24 2010 -0400
handle multi-word arguments for heart restart command

commit a1f8536


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Apr 28 10:58:21 2010 -0400
remove leftover debug io:format call

commit 0fa9db4


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 27 17:25:56 2010 -0400
fix typos on front page

commit 5fe881b


Author: Anders Nygren anders.nygren@gmail.com>
Date: Mon Apr 26 15:19:08 2010 -0500
Fix yaws_api:parse_set_cookie

Fix bug where yaws_api:parse_set_cookie tried to convert a record to lower case.

commit 1c20a97


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Thu Apr 22 15:49:13 2010 +0200
patch by Sergey Shilov to set old_ssl for embedded mode

commit 0809a53


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Apr 21 01:14:23 2010 -0400
fix socket usage for FCGI authorization (bruno rijsman, steve vinoski)

The FCGI authorization code was holding the socket to the FCGI server
open until Yaws finished replying to the client. Change handling for
FCGI authorization to gather the response and then return to the
caller, closing the socket to the FCGI server much sooner than before.

commit ade3631


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Apr 16 02:52:56 2010 -0400
work around an erlang:open_port bug for CGI QUERY_STRING env var

Some versions of erlang:open_port can't handle query strings that end
with an equal sign. This is because the broken versions treat
environment variable strings ending with '=' as environment variable
names intended to be deleted from the environment, i.e. as if they
have no value. The result is that no QUERY_STRING environment variable
gets set for these cases. We work around this by appending a &
character to any query string that ends in =.

Also, clean up some comment lines that extended past 80 characters.

commit 0446f2b


Author: Thomas O'Dowd tpodowd@geminimobile.com>
Date: Wed Apr 14 15:08:35 2010 +0900
Added a new configuration parameter called "keepalive_maxuses" which allows
the yaws admin to close persistant connections after X number of uses. This
is handy for some types of system which may generate a lot of garbage in the
process in the erlang VM or for other reasons where you want to limit how
many requests can be processed on a single connection. The default setting
remains unlimited.

commit 59432b5


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Apr 12 13:47:34 2010 -0400
add www/*.txt files, which are generated by tests

commit 6b26557


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Apr 9 23:19:53 2010 -0400
improved embedded support

Add yaws_api:embedded_start_conf functions that take the same
arguments as yaws:start_embedded but instead of starting the yaws
application, return the gconf, sconf, and supervisor child specs
corresponding to the supplied arguments. When the application doing
the embedding is ready to start yaws, it can use the child specs to
start yaws under its own supervisors, and can then pass the gconf and
sconf to yaws_api:setconf to configure yaws. This approach gives the
application more control over how yaws is started and supervised.

Reimplement yaws:start_embedded in terms of the new
yaws_api:embedded_start_conf, maintaining backward compatibility.

Change www/embed.yaws and its example ybed code to describe the new
yaws_api:embedded_start_conf functions.

Updated web documentation and the yaws.tex file.

commit 34865d9


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Mon Apr 12 12:36:07 2010 +0200
macosx description for privbind

commit 7334cee


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Apr 11 23:08:45 2010 +0200
added gc/sc debug outputs for -d flag

commit 968de1b


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Apr 9 23:16:23 2010 -0400
add files generated by tests and more build-generated files

commit aa217d8


Author: Thomas O'Dowd tpodowd@geminimobile.com>
Date: Wed Apr 7 19:14:44 2010 +0900
Added a new configuration parameter to allow the administrator to control
the erlang virtual machines garbage collection knobs when spawning a new
process to handle incoming connections. The option is called "process_options".
Its default value is the empty list which uses erlangs default options as
is the case now. This is useful for long lived connections which can generate
a lot of garbage if left untapped. Use with care :-)

commit d57f77c


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Mar 18 22:48:41 2010 +0100
yaws 1.88 commit

Version yaws-1.88 Date: Thu Mar 18 22:04:07 2010 +0100


commit c30bb56


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Mar 18 22:02:47 2010 +0100
prepare for 1.88

commit 93b6f82


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Thu Mar 18 13:04:07 2010 +0100
ssl support for websockets, patch by wde

commit 4fec139


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Mar 10 22:28:58 2010 +0100
fixed a broken link and added a Makefile that test compiles all our yaws files making sure nothing broken get shipped

commit 9dfb58e


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Mar 10 21:57:13 2010 +0100
Erroneous common log format entries, time should be surrounded by brackets

commit 92037d8


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Mar 9 20:52:21 2010 +0100
When executing yaws --hup the order of the hosts in a virthost group wan't maintained, thus breaking the feature of pick first virthost on nomatch

commit ee0aee7


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Mar 7 16:52:21 2010 -0500
set nodelay on FCGI TCP connection, and avoid 0-length FCGI gen_tcp:recv

Set {nodelay,true} on the TCP connection to the FCGI server to improve
performance of small requests.

The code receives packets from the FCGI server and for some cases was
extracting length fields from some packets and then making further
gen_tcp:recv calls based on those length values. The code was not
checking for length values of 0 before calling recv, and passing 0 to
recv means to return all available bytes. For both correctness and
performance, the code must avoid the recv calls altogether when the
length is 0.

commit 56f41b6


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Mar 2 19:14:53 2010 -0500
convert error atoms into error strings for fcgi_worker_fail

commit 561a09c


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Tue Mar 2 16:32:49 2010 +0100
clarification on ssl depth param

commit cfb32f4


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Tue Mar 2 16:29:21 2010 +0100
spelling corrections

commit 7f2951c


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Tue Mar 2 15:41:06 2010 +0100
IpV6 support for listen socket

commit 662d1f3


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Tue Mar 2 15:29:42 2010 +0100
The default value for partial_post_size was nolimit, not a good default value and also erroneoulsy documented

commit 937925b


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Feb 26 14:51:26 2010 +0100
An atempt at having utf8 characters in the host names for yaws servers

commit ff2fc18


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat Feb 20 14:52:35 2010 +0100
dialyzer work

commit 6f0ab17


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Feb 19 11:12:40 2010 +0100
Anders Dahlin found that yaws log code doesn't delete the gen_event handler it adds error logger when terminating, that means that restarting yaws leaves old processes hanging around

commit b45c0a4


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Feb 18 18:06:38 2010 +0100
dialyzer work

commit 2c2f776


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Feb 18 15:44:11 2010 +0100
Closed Issue #31, made parsing of yaws.conf more tight complaining on e.g allowd_scripts = [ yaws ]

commit f18fc6c


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Feb 17 01:08:47 2010 -0500
fix for FastCGI/PHP Issue (http://github.com/klacke/yaws/issues#issue/30) (davide)

commit ee5b63f


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Feb 17 01:01:36 2010 -0500
increase FCGI read timeout

commit 4696b6b


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Feb 11 23:51:17 2010 +0100
auth through .yaws_auth files has become broken, this fixes it

Version yaws-1.87 Date: Tue Feb 9 23:08:38 2010 +0100


commit f1988a2


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Feb 9 23:07:42 2010 +0100
release work

commit 1e1850f


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Feb 9 23:02:33 2010 +0100
release work

commit 855d191


Author: Claes Wikstrom klacke@zoe.(none)>
Date: Tue Feb 9 12:37:52 2010 +0100
apparently erl can ?? soon be an executable, canot grep in script

commit 28f44b0


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Feb 6 16:19:30 2010 -0500
allow caller to set Host header for SOAP requests

commit d4fec79


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Feb 1 09:12:51 2010 +0100
added support for OTP new ssl implementation

commit bd0bf89


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jan 12 15:33:23 2010 +0100
no utf8 in the author name

commit 7680b32


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Jan 11 22:11:26 2010 +0100
re-prepare for 1.87

commit 35ff951


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Jan 11 22:07:53 2010 +0100
patch by Andrei Soroker to strip the port part in #redir_self records - this patch may break some code, users that use redir_self() and unconditionally strip off their optional port number are affected

commit 3e74906


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jan 8 00:30:41 2010 -0500
support some extra status codes in code_to_phrase

commit 30a39ae


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Jan 7 11:04:46 2010 +0100
drop spaces before parsing ints - patch by Colm Dougan

commit 297f2c9


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Jan 6 00:32:59 2010 -0500
fix setting of ERTS_MAJOR and ERTS_MINOR

commit f5eb9d5


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jan 5 22:51:56 2010 +0100
conditional compile of websockets

commit 9d929ca


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jan 5 14:46:02 2010 +0100
prepare for 1.87

commit 8176fe9


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Dec 21 17:37:29 2009 +0100
reintroduced yaws_vdir.erl, erroneoulsy removed

commit 9e12baf


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Dec 20 12:28:08 2009 -0500
proper handling of "/" appmod with excluded paths (patch from wde)

Added new unit tests for appmods, with both / and non-/ tests. The /
tests include exclude_paths testing.

commit afa6a19


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Dec 20 10:02:05 2009 -0500
ensure yaws ebin is in the path for multipart tests

commit 790ce8a


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Dec 19 00:53:44 2009 -0500
minor indentation and comment cleanup

commit 9855e31


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Dec 18 23:55:21 2009 +0100
patch from wde solving a problem with appmod exclude paths and verify_upgrade

commit 8c2e90d


Author: davide nesrait@gmail.com>
Date: Fri Dec 18 22:02:32 2009 +0000
yaws_server: fixed the test for whether to close the socket.
The yaws:outh_get_doclose() doesn't return a boolean and it requires the outh dicionary entry to be set (sometimes it isn't).

commit 785b7c6


Author: davide nesrait@gmail.com>
Date: Fri Dec 18 18:27:00 2009 +0000
Added documentation for the HTML5 Web Sockets implementation.

commit da8ebc6


Author: davide nesrait@gmail.com>
Date: Fri Dec 18 16:58:15 2009 +0000
Get the websocket return value to enforce #outh{doclose=false} using the {connection, erase} header.

commit 7fdc54a


Author: davide nesrait@gmail.com>
Date: Fri Dec 18 15:44:25 2009 +0000
HTML5 Web Sockets support.

commit d63642e


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Dec 14 22:26:32 2009 -0500
do not pass the --id option if the default id is used

The default id in the code is represented as the string "default". If
the --id option passes default to set the id, it becomes the atom
default which of course differs from the string "default". By not
using --id to specify the default id, we get the value "default" as
the default.

Make sure ids passed in via the --id option that yaws_sup.erl sees as
atoms are converted to lists. This matches what's done for other
options involving ids such as --check and --stop.

Other changes in this commit make sure that the $HOME/.yaws/yaws/ID
path is used consistently across the code and documentation, and also
a couple minor whitespace/indentation cleanups.

Version yaws-1.86 Date: Sun Dec 6 14:52:19 2009 +0100


commit 9c63c94


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Dec 6 14:49:46 2009 +0100
preparing for 1.86

commit 2470367


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Dec 6 14:34:38 2009 +0100
handle expired cookie sessions in the example

commit 082f043


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Dec 4 22:50:13 2009 -0500
if sendfile hits EOVERFLOW send the file from Erlang code instead

commit 9cee816


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Dec 3 09:51:06 2009 +0100
json binary keys patch by TBBle

commit 5debb9f


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Dec 2 22:14:25 2009 +0100
README docs

commit 82a449b


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Dec 2 21:48:51 2009 +0100
Forward prox functionality added through a patch by Colm Dougan

commit 6055704


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Dec 2 17:58:13 2009 +0100
patch from anders dahlin to always populate yaws auth headers

commit b30714f


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Dec 2 15:47:16 2009 +0100
create configure script at release

commit d3f2242


Author: davide nesrait@gmail.com>
Date: Wed Dec 2 14:08:24 2009 +0000
Added SSL support to stream_process_* functions.

commit 2ed6733


Author: davide nesrait@gmail.com>
Date: Tue Dec 1 13:08:28 2009 +0000
Added support for passing SSL configurations to start_embedded as a proplist (passing #ssl{} still works).

commit ab5675f


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Dec 1 12:09:56 2009 +0100
Fixed Issue #27

commit b7656de


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Nov 30 00:04:36 2009 +0100
Added support for excluding dirs from an appmod. This is useful for / appmods

commit a7ee64c


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Nov 29 22:45:02 2009 +0100
clean target

commit b43bc52


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Nov 29 22:00:12 2009 +0100
compile error , at least on older erls

commit 323c10e


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Nov 23 09:37:36 2009 -0500
erasing the connection header must also set doclose to false

commit c32479a


Author: Eric Liang eric.l.2046@gmail.com>
Date: Fri Nov 20 23:30:27 2009 +0800
add explanation about global setting: soap_srv_mods to man file: yaws.conf.5

commit 58a4471


Author: Eric Liang eric.l.2046@gmail.com>
Date: Fri Nov 20 21:37:03 2009 +0800
get back the start_link/0 in yaws_soap_srv.

commit 813f032


Author: Eric Liang eric.l.2046@gmail.com>
Date: Fri Nov 20 14:43:52 2009 +0800
support on addtional specified prefix when rpc call by method: yaws_soap_lib:call.

commit d8df08c


Author: Eric Liang eric.l.2046@gmail.com>
Date: Thu Nov 19 21:36:57 2009 +0800
add the soap_srv_mods support, which can setup soap serve modules while yaws start.

commit ded4870


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Nov 21 16:41:32 2009 -0500
remove duplicate set_dyn_headers line from php handle_ut case

commit 5e3b650


Author: Torbjorn Tornkvist tobbe@bult.hq.kred>
Date: Mon Nov 16 12:58:02 2009 +0100
Added 'autoconf' as needed when building from a fresh clone.

commit 5c5c36b


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Nov 12 18:46:20 2009 -0500
prevent crash caused by malicious client sending an empty Host header

commit 189188b


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Nov 11 22:43:42 2009 +0100
rm configure

commit 48c117d


Author: Paul Hampson paulh@microforte.com>
Date: Mon Nov 9 19:04:07 2009 +1100
Add example for haXe returning an error object

commit 5316274


Author: Paul Hampson paulh@microforte.com>
Date: Mon Nov 9 19:08:04 2009 +1100
Document how to run haXe remoting sample under neko

This is probably obvious to a regular or occasional haXe user, but
invaluable to someone who's only using haXe to ensure his yaws_rpc
changes are valid...

commit b503fa4


Author: Paul Hampson paulh@microforte.com>
Date: Mon Nov 9 19:01:53 2009 +1100
Export haXe remoting handler function

commit b10354c


Author: Paul Hampson paulh@microforte.com>
Date: Mon Nov 9 19:00:02 2009 +1100
Update haxe remoting sample to current remoting API

commit af707a9


Author: Paul Hampson paulh@microforte.com>
Date: Mon Nov 9 18:03:55 2009 +1100
Add example for JSON-RPC returning an error object

A real object could be used as well as a string here, but jsolait
as bundled stringifies the object when it raises a JSONRPCError
exception.

commit 908fea6


Author: Paul Hampson paulh@microforte.com>
Date: Mon Nov 9 17:10:11 2009 +1100
Allow JSON-RPC/haXe remoting handlers to send error objects

Any hander which may return a payload of { response, ErlStruct }
can also send { error, ErlStruct } to have the object described
in ErlStruct sent back as an error or exception depending on the
RPC protocol in use.

commit e126213


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Nov 5 22:30:47 2009 -0500
minor code clarity and indentation change

commit b0feb46


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Nov 5 19:24:38 2009 +0100
docs bug

commit 9cd3e6e


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Nov 4 19:59:51 2009 +0100
Fixed http://github.com/klacke/yaws/issues/unreads#issue/22

commit b8c1de1


Author: Matt Stancliff matt@genges.com>
Date: Tue Nov 3 22:16:01 2009 -0800
Allow binaries as json values.

commit 6144b4f


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Oct 18 15:54:55 2009 +0200
mkcert

Version yaws-1.85 Date: Sat Oct 17 23:07:31 2009 +0200


commit 229c5b6


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat Oct 17 23:07:14 2009 +0200
prepare for 1.85

commit 18cec55


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Oct 17 15:34:10 2009 -0400
fixes for FCGI authorization (Bruno Rijsman), plus I cleaned up indentation and comments in yaws_cgi.erl

commit 682bc96


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Oct 17 15:09:34 2009 -0400
document yaws_multipart (with the assistance of Praveen Ray)

commit 68ab570


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat Oct 17 20:35:27 2009 +0200
locale setting

commit 006dfea


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Oct 16 21:44:40 2009 +0200
Patch from wde with support for virthosting several ssl serveres on the same IP. This makes sense if we have multiple subjectAltName in the ssl cert

commit a9ce4a0


Author: Claes Wikstrom klacke@hyber.org>
Date: Sat Oct 3 22:54:05 2009 +0200
some ssl info

commit cebdd43


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 30 09:45:39 2009 -0400
moved yaws_multipart.erl to src, so remove from examples

commit 6b3f0cc


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Sep 29 21:48:41 2009 -0400
remove commented-out example code from yaws_multipart.erl to use in documentation

commit 4248f8d


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Sep 29 21:47:26 2009 -0400
move yaws_multipart.erl to src dir and incorporate klacke's changes

commit c966d77


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Sep 28 20:35:11 2009 +0200
re-introduce Steves optimazation of fmtnow()

commit b605e5c


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 28 13:58:24 2009 -0400
fixes for yaws_multipart.erl (Praveen Ray)

commit 8322cec


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Sep 28 11:13:39 2009 +0200
timezone format patch by Per Hedeland

commit 4c90d3a


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Sep 27 23:56:42 2009 -0400
add new multipart example yaws_multipart.erl (Praveen Ray)

commit 92681ef


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Sep 27 23:55:43 2009 -0400
fix spelling

commit 5018bcc


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Sep 26 00:03:04 2009 -0400
determine gcc flags for 32-bit or 64-bit Erlang on OS X Snow Leopard

commit 984470b


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Sep 22 22:07:17 2009 +0200
installer

commit d5676b2


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Sep 22 12:57:20 2009 +0200
Auth enhancements by Anders Dahlin,
- Auth - unauthorized enhancements
- Setup auth rewrite/cleanup
- (Embedded) Config enhancements

commit aa32fa0


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 21 10:33:49 2009 -0400
document streamcontent process delivery functions

commit 3a6c4c2


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 21 10:33:48 2009 -0400
document yaws --nodebug option

commit a80cfee


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Sep 21 10:33:03 2009 -0400
add --nodebug option

commit 913aff8


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Sep 19 15:29:15 2009 -0400
Use iolists instead of binaries for streamcontent_from_pid data, and
add a new test for the streamcontent_from_pid feature

commit 6d8d382


Author: davide nesrait@gmail.com>
Date: Sat Sep 19 11:59:57 2009 +0100
Fixed support for Timeout=infinity in streamcontent_with_timeout.

commit 5f35f5b


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Sep 18 23:33:06 2009 -0400
add streamcontent_from_pid capability to allow direct streaming to socket

commit 0efd59c


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Sep 17 14:17:02 2009 -0400
more efficient check for the yaws application being up

commit 51cbdc0


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 9 20:52:11 2009 -0400
fix dumb errors in previous commit

commit f2e687f


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed Sep 9 16:11:49 2009 -0400
fix decode_base64 to return just a tuple in case of error (reported by Gabriel Ki)

commit 12ddebc


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Sep 8 10:31:25 2009 -0400
fix HTTP header case sensitivity problem in yaws_cgi (Bruno Rijsman)

commit 4b3bbeb


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Sep 8 10:30:42 2009 -0400
move join function to yaws:join_sep

commit 2e6b7f4


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Sep 8 10:28:04 2009 -0400
reduce loop to 5 for sendfile_get test

commit c3a8eb2


Author: Claes Wikstrom klacke@rock.(none)>
Date: Tue Aug 25 23:32:04 2009 +0200
cleanup

commit b752b8c


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Aug 22 09:35:52 2009 -0400
trivial edit cleanups

commit f65b422


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Aug 21 15:42:26 2009 +0200
More work by Ander Dahlin to pass the Realm in case of faile auth to the authmod

commit 36109e0


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Aug 20 21:58:38 2009 +0200
patch from Anders Dahlin to add errormod_301 till yaws:setup_sconf/3

commit b39a6fe


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Aug 20 21:55:50 2009 +0200
several nice cleanups by Anders Dahlin

commit cf6ae42


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Aug 20 21:49:39 2009 +0200
stopping yaws_sendfile thru supervisor does not hang - by ks

commit b71da7e


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Aug 19 21:08:34 2009 +0200
cleanup

commit 043ce4e


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Aug 19 21:07:40 2009 +0200
invoke handle crash_msg if Mod:auth/2 crashes.

commit 792697b


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Aug 19 14:48:41 2009 +0200
possible bug with id check

commit 536d65c


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Aug 19 11:33:52 2009 +0200
80 chars row cleanup

commit 4df0d77


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Aug 19 11:32:53 2009 +0200
config of partial_post_size = nolimit was broken

commit 61b1e10


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Aug 17 16:59:01 2009 -0400
updated mime.types from recent Apache web server sources

commit 1ba9770


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Aug 17 22:49:20 2009 +0200
small fixed by anders dahlin

commit 53608c3


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Aug 17 22:36:38 2009 +0200
max number of connections patch by Kinoshita

commit 5ec7807


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Aug 6 21:48:28 2009 +0200
check for toolchain

commit 0e07576


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Aug 6 21:43:46 2009 +0200
check for toolchain

commit cb07393


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu Aug 6 13:13:42 2009 +0200
streamcontent_with_timeout bug , git issue #16 fixed

commit 45b45ce


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Aug 3 13:40:34 2009 +0200
rm vdir

commit 316bf6d


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Aug 3 13:22:30 2009 +0200
small fixes

commit e5dbee8


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Aug 3 13:07:55 2009 +0200
readme docs

commit 977c123


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Aug 2 01:47:51 2009 -0400
1. Fix redirect bug reported by James Lee.
2. Add new regression test for redirect bug. Test details suggested by James Lee.
3. Clean up a bunch of other tests to make them more reliable. Added use of
.PHONY targets for tests, and made tests start and stop Yaws individually.

commit 60e5235


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jul 17 16:48:02 2009 -0400
correct fcgi calls to use yaws_cgi module

commit 74b7a81


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jul 10 14:28:35 2009 +0200
fcgi merger error

commit 2fa66b0


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jul 10 14:26:00 2009 +0200
cgi support

commit 034faa4


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Jul 5 18:27:36 2009 -0400
fix setconf call for start_embedded

commit 3655d57


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Jul 5 20:49:32 2009 +0200
eunit test added

commit 8913f68


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Jul 5 20:49:24 2009 +0200
eunit test added

Version yaws-1.84 Date: Sun Jul 5 20:20:48 2009 +0200


commit e9344fa


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Jul 5 20:20:13 2009 +0200
prepare for 1.84

commit c30ef89


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Jul 5 20:06:23 2009 +0200
prepare for 1.84

commit 4683f85


Author: Claes Wikstrom klacke@hyber.org>
Date: Sun Jul 5 20:04:27 2009 +0200
patch from anders abramhamson - a bug with multiprat posts and a head being reversed

commit 5355a13


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jul 3 15:56:51 2009 +0200
doc

Version yaws-1.83 Date: Fri Jul 3 15:49:14 2009 +0200


commit 20d080c


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jul 3 15:48:24 2009 +0200
prepare for 1.83

commit 49fc86f


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jul 3 15:32:17 2009 +0200
docs and also don't fail if authmod:get_headers() don't exist

commit 9ab391e


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jul 3 15:00:38 2009 +0200
warn when crypto app is not there

commit abe2833


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jul 3 12:31:50 2009 +0200
minor docs for new stats feature

commit 3b56900


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Jul 1 22:26:14 2009 +0200
rm t3

commit 25028a8


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Jul 1 22:19:06 2009 +0200
cleanup

commit c73cff6


Author: dnz@bk.ru dnz@bk.ru>
Date: Tue Jun 30 13:07:19 2009 +0000
yaws [PATCH] Use $CC instead of gcc

Hi,

I'm just a newbie, but these fixes seemed obvious.
Hope it's useful.

commit 2747a01


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jun 30 16:21:17 2009 +0200
doc cleanup

commit f7d5ad8


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jun 30 16:20:37 2009 +0200
configure patch by dnz

commit 4010fc7


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri Jun 26 02:34:10 2009 +0200
don't fail if read perms are not ther when followin the .yaws_auth dir down

commit 5c3c546


Author: Fabian Alenius fabian.alenius@gmail.com>
Date: Fri Jun 19 01:25:10 2009 +0200
Yaws patch

Hi!

Here is the patch, as promised. Not sure this solution is optimal but it
should work.

To be honest I've only done basic testing (bit tired by now..) so would
be good if you could give it a run before you put it out. I checked out
the 1.82 tag from github so that's the version you should apply the
patch to.

// Fabian

From 4636b0d096a061a0af6c2034446926bdba4259ed Mon Sep 17 00:00:00 2001
From: Fabian Alenius faal@faal.(none)>
Date: Fri, 19 Jun 2009 01:17:44 +0200
Subject: [PATCH] Fixed backwards compatibility

commit 12c9f01


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Jun 18 10:49:39 2009 -0400
eliminate io_lib:format overhead in yaws_log:fmtnow

commit edfca30


Author: Olivier Girondel olivier@biniou.info>
Date: Tue Jun 16 16:38:14 2009 +0200
Comment

commit 350765b


Author: Olivier Girondel olivier@biniou.info>
Date: Tue Jun 16 16:31:54 2009 +0200
Start/stop stats servers

commit 5ceb0cf


Author: Olivier Girondel olivier@biniou.info>
Date: Tue Jun 16 15:48:11 2009 +0200
Start or stop servers when configuration has chenged

commit 4d4fad6


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri Jun 12 14:54:25 2009 -0400
handle authdirs search properly when docroot not defined (Olivier Girondel)

commit 9459316


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 17:41:52 2009 +0200
Simplify

commit 9317a44


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 17:41:13 2009 +0200
Compile yaws_stats

commit a0a5329


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 17:27:01 2009 +0200
Bugfix revproxy

commit 08e2531


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 17:25:15 2009 +0200
Bugfix revproxy

commit eedaca5


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 16:39:34 2009 +0200
yaws_ctl --stats added

commit 2a369b3


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 16:28:05 2009 +0200
README.munin

commit 9f4cc66


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 16:24:40 2009 +0200
munin scripts

commit a42cf46


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 16:24:18 2009 +0200
yaws_ctl and conf template

commit dbaab8b


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 14:59:06 2009 +0200
Stats command

commit 4300392


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 14:53:54 2009 +0200
Start stats servers, bytes sent accounting

commit 3f0752a


Author: Olivier Girondel olivier@biniou.info>
Date: Fri Jun 12 14:33:09 2009 +0200
Sent bytes

commit 4aea292


Author: Olivier Girondel olivier@biniou.info>
Date: Wed Jun 10 17:12:04 2009 +0200
Statistics module added

commit 8c969fe


Author: Olivier Girondel olivier@biniou.info>
Date: Wed Jun 10 13:28:10 2009 +0200
Support for the statistics option per virtual host

commit c6a12eb


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Jun 9 22:42:58 2009 +0200
removed ancient backwards compat flag

commit 856fb79


Author: Fabian Alenius fabian@havsbrax.(none)>
Date: Tue Jun 9 15:17:00 2009 +0200
Removed debug print.

commit 7d205b5


Author: Fabian Alenius fabian@havsbrax.(none)>
Date: Tue Jun 9 14:15:56 2009 +0200
Changed so that auth is setup in yaws_api:setconf/2 instead of yaws:start_embedded/4.

Previously auth would not be setup when starting in embedded mode using yaws_api:setconf/2

commit 7a2fa8d


Author: Fabian Alenius fabian@havsbrax.(none)>
Date: Tue Jun 9 10:57:10 2009 +0200
Changed so that Pam and Authmod modules are supplied as atoms instead of lists in .yaws_auth files.

commit b74df54


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Jun 9 03:36:11 2009 -0400
fixes for traffic tracing in reverse proxy mode (Olivier Girondel)

commit d84e9d2


Author: Fabian Alenius fabian@havsbrax.(none)>
Date: Tue Jun 9 09:20:44 2009 +0200
Small fix to remove_multiple_slash/2 to make it remove arbitrarily many slashes.

commit 4c7aaf7


Author: Fabian Alenius fabian@havsbrax.(none)>
Date: Tue Jun 9 09:15:52 2009 +0200
Added a .gitignore to file to ignore generated files, this makes 'git status' a lot more readable.

commit 385ae07


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Jun 1 13:44:47 2009 +0200
Better error msg if erl is not found for win32 users

commit d781406


Author: Claes Wikstrom klacke@hyber.org>
Date: Fri May 29 23:50:27 2009 +0200
indent

commit 3aabdb4


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 23:31:45 2009 +0200
prepare for 1.82

commit 45ae3b4


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 23:08:22 2009 +0200
prepare for 1.82

commit a679f38


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed May 20 17:13:20 2009 +0200
--load and --id togehtehr didn't work

commit dc206fd


Author: Fabian Alenius fabian@havsbrax.(none)>
Date: Mon May 11 19:24:57 2009 +0200
Moved the parsing of .yaws_auth files to a seperate function

commit e038ed1


Author: Fabian Alenius fabian@havsbrax.(none)>
Date: Mon May 11 17:00:31 2009 +0200
Cleaning up yaws_config.erl, removing add_yaws_auth(...) since it is no longer neccessary. Also removed some debug prints

commit 37e5aa4


Author: Fabian Alenius faal@faal.(none)>
Date: Wed May 6 00:39:46 2009 +0200
1. Changed so that yaws searches recursively for .yaws_auth files in the docroot. 2. Directories containing .yaws_auth files no longer has to be specified in the config file to be searched. 3. Code still contains some debug code which needs to be removed.

commit 2cf5076


Author: Fabian Alenius faal@faal.(none)>
Date: Sun May 3 18:54:18 2009 +0200
Sorted the examples in the menu in alphabetic order to make it easier to find what you're looking for.

Version yaws-1.82 Date: Thu May 28 23:06:15 2009 +0200


commit 3a590cb


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 23:05:44 2009 +0200
prepare for 1.82

commit d983f7d


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 23:03:12 2009 +0200
prepare for 1.82

commit 08933df


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 22:54:33 2009 +0200
prepare for 1.82

commit e1e92fc


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 21:12:01 2009 +0200
prepare for 1.82

commit e71db24


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 20:59:55 2009 +0200
prepare for 1.82

commit 5e1d1ec


Author: Claes Wikstrom klacke@hyber.org>
Date: Thu May 28 20:26:31 2009 +0200
prepare for 1.82

commit 3fd7044


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 22 23:58:22 2009 -0400
add date header to OPTIONS response

commit 1025b24


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 22 15:55:23 2009 -0400
fix badmatch calling yaws_server:suffix_type from yaw_server:do_url_type when dav is true

commit 19afa9f


Author: Steve Vinoski vinoski@ieee.org>
Date: Fri May 22 02:31:15 2009 -0400
Added fix and tests for github issue #2. Handle zero values for
max_num_cached_files, max_num_cached_bytes, and max_size_cached_file
to prevent infinite loops.

commit d0e776f


Author: Steve Vinoski vinoski@ieee.org>
Date: Wed May 20 13:49:52 2009 -0400
modify time_to_string to avoid slow io_lib:format

commit 29dcd07


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue May 19 20:04:56 2009 +0200
removed obsolete stats collector

commit 15801d7


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon May 4 21:58:14 2009 +0200
comment in code

commit df7a68b


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon May 4 19:44:17 2009 +0200
set HOME if unset, this is required since some distros don't set HOME for code run under/etc/rc and erlexec requires HOME to be set

commit 7d9f3ab


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon May 4 09:27:40 2009 +0200
add extra cgi vars patch from joe_e_e

commit 8c1f224


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Apr 27 17:35:32 2009 +0200
doc fix by hun

commit 2d767ad


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Apr 27 17:34:09 2009 +0200
new ebuild file from joe_e_e

commit f9dd6c0


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Apr 27 17:32:59 2009 +0200
patch by joe_e_e to move all files from /etc to /etc/yaws in the installer

commit de056eb


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Apr 27 17:31:04 2009 +0200
add extra cgi vars patch from joe_e_e

commit 8ca43c2


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Apr 27 17:22:25 2009 +0200
add extra cgi vars patch from joe_e_e

commit b732bd1


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Apr 27 17:20:50 2009 +0200
doc patch from kevingrimes

commit 71af10e


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 26 10:36:39 2009 -0400
in open, ensure the gen_server is up before calling it

commit 10febe6


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 25 00:19:00 2009 -0400
added sendfile check for Darwin, since no sendfile is available on OS X Tiger

commit be8d198


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 25 00:17:16 2009 -0400
fixed compiler warnings for unused variables

commit 8545c2c


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Apr 25 00:12:12 2009 -0400
document rss_dir

commit 3c41877


Author: Fabian Alenius fabian.alenius@gmail.com>
Date: Fri Apr 24 11:36:19 2009 +0200
1. Fixed so that the HTTP status is set to 401 explicitly in
yaws_server:handle_ut(...), previously out401 needed to return
{status, ...} or status would default to 200.

2. Changed outmod:out401(...) so that it returns {ehtml, ...} instead of
{status, ...}

3. Documented the errmormod_401 option in the man page.

commit f27ca2c


Author: Steve Vinoski vinoski@ieee.org>
Date: Thu Apr 23 03:27:05 2009 -0400
minor cleanup modifications

commit afea472


Author: Fabian Alenius fabian.alenius@gmail.com>
Date: Tue Apr 21 17:29:43 2009 +0200
Added ifndef, define to erlsom.h to avoid conflicts

commit 3cc5744


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Apr 20 14:52:42 2009 -0400
update yapp application version due to yapp_ets_server addition

commit d22255b


Author: Steve Vinoski svinoski@erlang.verivue.com>
Date: Sat Apr 18 00:16:17 2009 -0400
add ets-based yapp registry implementation for cases where mnesia is overkill

commit c1cea99


Author: Fabian Alenius fabian.alenius@gmail.com>
Date: Thu Apr 16 01:37:28 2009 +0200
Changed the way authentication is done, added support for multiple authentication methods to be used for one directory and changed so that the
401 page can be customized similarly to the 404 page.

1. Renamed yaws_401.erl to yaws_outmod.erl, which is probably a better name considering it's current use(it also displays the crashmsg).
2. Fixed the Makefile accordingly.
2. Changed so that the auth record not only contains the authentication methods but also the headers that should be displayed for the
directory.
3. The headers are added in yaws_config.erl when the config file is parsed, the authmods now has to have a function get_headers/1 that
returns the http headers that are to be displayed.
3. is_auth now goes through the list of directories and when a matching directory is found it calls handle_auth which does the actual
checking.
4. handle_auth checks all the methods specified in the config file, if _one_ returns true, the user is authorized to view the page.
5. Removed deliver_401 and changed so that handle_ut is called with UrlType = unauthorized.
6. Changed handle_ut to handle UrlType = unauthorized, it handles it similarly to when it displays 404. It pulls the errormod_401 from the
GC and calls out401 to display the actual page.
7. Added a function outh_set_auth/1 to yaws.erl which takes a string or a {realm, Realm} tuple and returns the corresponding WWW-Authenticate
header.
8. Fixed so that the headers are displayed when the 401 page is displayed.
9. Removed the special handling of appmod in handle_request. Previously authmods would return appmod when they wanted the 401 page to be
displayed, this is no longer neccessary.
10. Removed the out function from authmod_gssapi.erl.
11. Changed the behaviour of authmod_gssapi so that it simply returns fales when it doesn't find called with the correct headers.
Previously it would crash.

TODO: Add support for multiple authmods and Pam modules for one directory.
Rewrite authmod_gssapi so that it simply returns true or false.
Fix a bug in yaws_ls, it links directories without the final / which means that every time you enter a directory first a 302 page is sent with
a redirect to "dir/".
Properly sort the WWW-authenticate headers, apparently the order mathers. For example Negoiate needs to be above Basic realm for
it to use Negoiate.

commit f01eff3


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Apr 14 19:25:30 2009 -0400
fix overlooked endian issue with socket_fd in set_error_buffer() (thanks to Olivier Girondel)

commit 0e5ebd2


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Apr 13 17:00:06 2009 -0400
improved checking of --heart-restart arguments

commit 2ba5805


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Apr 13 16:44:47 2009 -0400
add new --heart-restart option to allow control over heart restarts

commit 6312ad1


Author: Steve Vinoski vinoski@ieee.org>
Date: Mon Apr 13 16:44:15 2009 -0400
very minor indentation fix

commit 93abf77


Author: Steve Vinoski vinoski@ieee.org>
Date: Sun Apr 5 16:57:35 2009 -0400
modified the way data is passed between yaws_sendfile.erl and the sendfile driver
to fix endian problems I found on PPC systems

commit a3b9ee2


Author: Hans Ulrich Niedermann hun@n-dimensional.de>
Date: Wed Apr 1 01:51:41 2009 +0200
Remove last occurrence of hyphenated version nums

With CVS or SVN, yaws used release tags like yaws-1-81.
We can just use the version number now with git, though:
yaws-1.81.

Remove the last occurrence of the hyphenated version number.

commit 4635899


Author: Steve Vinoski vinoski@ieee.org>
Date: Tue Mar 31 20:53:05 2009 -0400
apply win32/mkinstaller.sh patch from Hans Ulrich Niedermann

commit f44be6a


Author: Claes Wikstrom klacke@hyber.org>
Date: Mon Mar 30 23:02:00 2009 +0200
all calls to old deprecated guard tests removed

commit ba94b67


Author: Steve Vinoski vinoski@ieee.org>
Date: Sat Mar 28 18:04:31 2009 -0400
add mime type for MPEG-4 video

commit 6ed3cb4


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Mar 18 17:22:27 2009 +0100
configure woes

commit b08c38e


Author: Claes Wikstrom klacke@hyber.org>
Date: Wed Mar 18 15:36:52 2009 +0100
echo push command

commit 8a5d8e7


Author: Claes Wikstrom klacke@hyber.org>
Date: Tue Mar 17 16:52:17 2009 +0100
Configure script broken on openbsd due to cygwin weirdness

Valid XHTML 1.0!