├── .github └── workflows │ └── main.yml ├── ChangeLog ├── LICENSE ├── Makefile.am ├── README.cygwin ├── README.md ├── README.osx ├── README.pkg-config ├── SECURITY.md ├── _build.cfg ├── applications ├── chat │ ├── Makefile.am │ ├── ebin │ │ └── Makefile.am │ ├── src │ │ ├── Makefile.am │ │ └── chat.erl │ └── www │ │ ├── angel.png │ │ ├── bigsmile.png │ │ ├── burp.png │ │ ├── chat.js │ │ ├── chat.yaws │ │ ├── chat_read.yaws │ │ ├── chat_write.yaws │ │ ├── cool.png │ │ ├── crossedlips.png │ │ ├── cry.png │ │ ├── embarrassed.png │ │ ├── farted.png │ │ ├── index.yaws │ │ ├── kiss.png │ │ ├── login.yaws │ │ ├── moneymouth.png │ │ ├── oneeye.png │ │ ├── sad.png │ │ ├── scream.png │ │ ├── smile.png │ │ ├── think.png │ │ ├── tongue.png │ │ ├── wink.png │ │ └── yell.png ├── mail │ ├── Makefile.am │ ├── README │ ├── TODO │ ├── ebin │ │ └── Makefile.am │ ├── src │ │ ├── Makefile.am │ │ ├── attachment.erl │ │ ├── defs.hrl │ │ ├── mail.erl │ │ ├── mail_html.erl │ │ └── smtp.erl │ ├── www │ │ ├── compose.yaws │ │ ├── down.gif │ │ ├── headers.yaws │ │ ├── index.yaws │ │ ├── listop.yaws │ │ ├── login.yaws │ │ ├── logout.yaws │ │ ├── mail.js │ │ ├── mail.yaws │ │ ├── reply.yaws │ │ ├── send.yaws │ │ ├── showmail.yaws │ │ ├── spacer.gif │ │ ├── tab-bg_active.gif │ │ ├── tab-bg_inactive.gif │ │ ├── tab-hr.gif │ │ ├── tab-left_active.gif │ │ ├── tab-left_inactive.gif │ │ ├── tab-right_active.gif │ │ ├── tab-right_inactive.gif │ │ ├── tool-delete.gif │ │ ├── tool-div.gif │ │ ├── tool-newmail.gif │ │ ├── tool-send.gif │ │ ├── up.gif │ │ └── view-mark.gif │ └── yaws-webmail.conf ├── wiki │ ├── Makefile.am │ ├── README │ ├── ebin │ │ └── Makefile.am │ ├── scripts │ │ ├── addFile.in │ │ ├── getPassword.in │ │ ├── importFiles.in │ │ └── updateWiki.in │ ├── src │ │ ├── Makefile.am │ │ ├── utils.erl │ │ ├── wiki.erl │ │ ├── wiki_diff.erl │ │ ├── wiki_format_txt.erl │ │ ├── wiki_plugin_backlinks.erl │ │ ├── wiki_plugin_dummy.erl │ │ ├── wiki_plugin_menu.erl │ │ ├── wiki_split.erl │ │ ├── wiki_templates.erl │ │ ├── wiki_to_html.erl │ │ ├── wiki_utils.erl │ │ └── wiki_yaws.erl │ ├── start.sh │ ├── wiki.conf │ └── www │ │ ├── ALockedPage.wob │ │ ├── AnUnlockedPage.wob │ │ ├── Examples.wob │ │ ├── FormattingWikiPages.wob │ │ ├── WikiPreferences.files │ │ ├── allpages.gif │ │ ├── back.gif │ │ ├── custom.css │ │ ├── edit.gif │ │ ├── editfiles.gif │ │ ├── editme.gif │ │ ├── forward.gif │ │ ├── ftp.png │ │ ├── history.gif │ │ ├── home.gif │ │ ├── http.png │ │ ├── https.png │ │ ├── icon.gif │ │ ├── index.gif │ │ ├── interwiki.png │ │ ├── kamera.gif │ │ ├── lastedited.gif │ │ ├── mailto.png │ │ ├── template.html │ │ ├── template2.html │ │ ├── template_info.html │ │ ├── template_info2.html │ │ ├── url.png │ │ └── zombies.gif │ │ ├── WikiPreferences.wob │ │ ├── addFile.yaws │ │ ├── allPages.yaws │ │ ├── allRefsToMe.yaws │ │ ├── changePassword.yaws │ │ ├── changePassword2.yaws │ │ ├── copyFiles.yaws │ │ ├── createNewPage.yaws │ │ ├── deleteFiles.yaws │ │ ├── editFiles.yaws │ │ ├── editPage.yaws │ │ ├── editTag.yaws │ │ ├── finalDeletePage.yaws │ │ ├── getMidSize.yaws │ │ ├── getThumb.yaws │ │ ├── importFiles.yaws │ │ ├── index.yaws │ │ ├── lastEdited.yaws │ │ ├── previewNewPage.yaws │ │ ├── previewPage.yaws │ │ ├── previewTagged.yaws │ │ ├── putPassword.yaws │ │ ├── searchPage.yaws │ │ ├── sendMeThePassword.yaws │ │ ├── showHistory.yaws │ │ ├── showOldPage.yaws │ │ ├── showPage.yaws │ │ ├── slideShow.yaws │ │ ├── storeFiles.yaws │ │ ├── storeNewPage.yaws │ │ ├── storePage.yaws │ │ ├── storeTagged.yaws │ │ ├── thumbIndex.yaws │ │ └── wikiZombies.yaws └── yapp │ ├── Makefile.am │ ├── README │ ├── ebin │ └── Makefile.am │ ├── examples │ ├── README │ └── yapp_ex_1 │ │ ├── ebin │ │ └── yapp_ex_1.app │ │ └── priv │ │ └── docroot │ │ └── index.yaws │ ├── priv │ └── docroot │ │ ├── END.inc │ │ ├── HEAD.inc │ │ ├── add.yaws │ │ ├── add_post.yaws │ │ ├── index.yaws │ │ ├── remove.yaws │ │ ├── remove_post.yaws │ │ └── stil.css │ ├── src │ ├── Makefile.am │ ├── yapp.app.src │ ├── yapp.appup.src │ ├── yapp.erl │ ├── yapp_app.erl │ ├── yapp_ets_server.erl │ ├── yapp_event_handler.erl │ ├── yapp_handler.erl │ ├── yapp_mnesia_server.erl │ ├── yapp_registry.erl │ ├── yapp_server.erl │ └── yapp_sup.erl │ └── vsn.mk ├── c_src ├── Makefile.am ├── epam.c ├── hashtable.c ├── hashtable.h ├── hashtable_private.h └── setuid_drv.c ├── configure.ac ├── contrib ├── benchmarks │ ├── README │ ├── all.erl │ ├── bench.erl │ ├── bench.hrl │ ├── conc_path_bm.erl │ └── multipart_bm.erl ├── yaws_content_negotiation.erl ├── yaws_mnesia_session.erl ├── yaws_showarg.erl └── ymnesia.erl ├── dialyzer_checker ├── doc ├── Makefile.am ├── README.rss ├── a.eps ├── b.eps ├── layout.eps ├── overview.edoc ├── yaws.tex └── yaws_head.eps ├── ebin_src └── Makefile.am ├── erlang_deps.mk ├── examples ├── ebin │ ├── .empty │ └── Makefile.am ├── include │ └── Makefile.am └── src │ ├── Makefile.am │ ├── advanced_echo_callback.erl │ ├── authmod_gssapi.erl │ ├── basic_echo_callback.erl │ ├── basic_echo_callback_extended.erl │ └── server_sent_events.erl ├── include.mk.in ├── include ├── Makefile.am ├── soap-envelope.hrl ├── soap.hrl ├── wsdl11soap12.hrl ├── yaws.hrl ├── yaws_api.hrl ├── yaws_dav.hrl ├── yaws_lock.hrl └── yaws_soap.hrl ├── known_dialyzer_warnings ├── m4 ├── ax_compare_version.m4 ├── colored-echo.m4 └── erlang.m4 ├── man ├── Makefile.am ├── yaws.1 ├── yaws.conf.5 ├── yaws_api.5 └── yaws_soap_lib.5 ├── munin ├── README.munin ├── yaws_hits_ └── yaws_sent_ ├── priv ├── Makefile.am ├── envelope.xsd ├── mime.types ├── soap-envelope.xsd ├── soap.xsd ├── wsdl.xsd ├── wsdl11soap12.xsd └── xml.xsd ├── rebar.config ├── rebar.config.script ├── rebar.lock ├── rebar2-templates ├── yawsnode.erl.script ├── yawsnode.install.sh ├── yawsnode.nodetool ├── yawsnode.rebar.config ├── yawsnode.reltool.config ├── yawsnode.runner ├── yawsnode.sys.config ├── yawsnode.template ├── yawsnode.vm.args └── yawsnode.yaws.conf ├── rel.obsolete ├── files │ ├── erl │ ├── install_upgrade.escript │ ├── nodetool │ ├── start_erl.cmd │ ├── sys.config │ ├── vm.args │ ├── yaws │ └── yaws.cmd └── reltool.config ├── scripts ├── Makefile.am ├── Subst ├── darwin │ ├── README │ ├── Yaws.StartupItem │ └── Yaws.plist ├── debian │ └── yaws.init ├── freebsd │ ├── yaws │ └── yaws.sh ├── gen-yaws ├── gen-yaws-conf ├── gen-yaws-generated.in ├── gentoo │ ├── yaws-2.0.2.ebuild │ └── yaws.init ├── make-release.in ├── make-upload ├── netbsd │ └── yaws.sh ├── openbsd │ └── yaws.sh ├── rebar-pre-script ├── redhat │ └── yaws.init ├── regular-install ├── suse │ └── yaws.init ├── systemd │ └── yaws.service ├── update-gh-pages ├── yaws.conf.template └── yaws.template ├── src ├── Makefile.am ├── haxe.erl ├── json2.erl ├── jsonrpc.erl ├── mime_type_c.erl ├── yaws.app.src ├── yaws.app.src.script ├── yaws.appup.src ├── yaws.conf ├── yaws.erl ├── yaws_api.erl ├── yaws_app.erl ├── yaws_appdeps.hrl.in ├── yaws_appmod_cgi.erl ├── yaws_appmod_dav.erl ├── yaws_appmod_fcgi.erl ├── yaws_cgi.erl ├── yaws_charset.hrl.in ├── yaws_compile.erl ├── yaws_config.erl ├── yaws_ctl.erl ├── yaws_debug.erl ├── yaws_debug.hrl ├── yaws_dime.erl ├── yaws_dynopts.erl ├── yaws_exhtml.erl ├── yaws_generated.template ├── yaws_html.erl ├── yaws_jsonrpc.erl ├── yaws_log.erl ├── yaws_logger.erl ├── yaws_ls.erl ├── yaws_multipart.erl ├── yaws_outmod.erl ├── yaws_pam.erl ├── yaws_revproxy.erl ├── yaws_rpc.erl ├── yaws_rss.erl ├── yaws_runmod_lock.erl ├── yaws_sendfile.erl ├── yaws_server.erl ├── yaws_session_server.erl ├── yaws_shaper.erl ├── yaws_soap12_lib.erl ├── yaws_soap_lib.erl ├── yaws_soap_srv.erl ├── yaws_sse.erl ├── yaws_stats.erl ├── yaws_sup.erl ├── yaws_sup_restarts.erl ├── yaws_ticker.erl ├── yaws_trace.erl ├── yaws_vdir.erl ├── yaws_websockets.erl ├── yaws_ws_sup.erl ├── yaws_xmlrpc.erl └── yaws_zlib.erl ├── ssl ├── dhparams.pem ├── mkcert │ ├── README │ └── mkcert.sh ├── mkcert_altname │ ├── README │ ├── alice.sni.example.com-cert.pem │ ├── alice.sni.example.com-key.pem │ ├── openssl.cnf │ ├── yaws.sni.example.com-cert.pem │ └── yaws.sni.example.com-key.pem ├── mkdhparams │ ├── README │ └── mkdhparams.sh ├── yaws-cert.pem └── yaws-key.pem ├── test ├── Makefile.am ├── README.md ├── analyze_coverdata.escript.in ├── auth_SUITE.erl ├── auth_SUITE_data │ ├── authmodtest.erl │ ├── outmodtest.erl │ ├── rewritetest.erl │ ├── templates │ │ └── yaws.conf │ ├── www1 │ │ ├── test10 │ │ │ ├── .yaws_auth │ │ │ ├── a.txt │ │ │ ├── b.txt │ │ │ └── c.txt │ │ ├── test2 │ │ │ └── a.txt │ │ ├── test3 │ │ │ └── sub │ │ │ │ └── a.txt │ │ ├── test4 │ │ │ └── a.txt │ │ ├── test5 │ │ │ └── a.txt │ │ ├── test6 │ │ │ └── a.txt │ │ ├── test7 │ │ │ ├── a.txt │ │ │ └── b.txt │ │ ├── test8 │ │ │ ├── a.txt │ │ │ └── b.txt │ │ └── test9 │ │ │ └── a.txt │ └── www2 │ │ ├── test1 │ │ └── a.txt │ │ └── test2 │ │ └── b.txt ├── config_encoding_SUITE.erl ├── config_encoding_SUITE_data │ ├── templates │ │ └── yaws_unicode.conf │ └── ẅẅẅ │ │ └── empty ├── cookies_SUITE.erl ├── cookies_SUITE_data │ ├── cookies.dump │ └── setcookies.dump ├── copy_error_log_SUITE.erl ├── cover_to_html.sh.in ├── deflate_SUITE.erl ├── deflate_SUITE_data │ ├── bigtest.erl │ ├── binary_header.erl │ ├── emptytest.erl │ ├── smalltest.erl │ ├── streamtest.erl │ └── templates │ │ └── yaws.conf ├── dhfile_SUITE.erl ├── dhfile_SUITE_data │ ├── invalid-dhparams.pem │ └── templates │ │ └── yaws.conf ├── dynopts_SUITE.erl ├── ehtml_SUITE.erl ├── gconf_SUITE.erl ├── gconf_SUITE_data │ └── templates │ │ └── yaws.conf ├── headers_SUITE.erl ├── host_header_SUITE.erl ├── host_header_SUITE_data │ └── templates │ │ └── yaws.conf ├── ipmask_SUITE.erl ├── json2_SUITE.erl ├── json2_SUITE_data │ ├── invalid │ │ ├── apostrophe.json │ │ ├── array_close.json │ │ ├── array_open.json │ │ ├── ascii-unicode-identifier.json │ │ ├── bogus_char.json │ │ ├── brace-comma.json │ │ ├── bracket-comma.json │ │ ├── bracket-one-comma.json │ │ ├── extra-comma-in-array.json │ │ ├── extra-comma-in-multiline-array.json │ │ ├── false_then_garbage.json │ │ ├── garbage-after-newline.json │ │ ├── garbage-at-the-end.json │ │ ├── integer-starting-with-zero.json │ │ ├── invalid-escape.json │ │ ├── invalid-identifier.json │ │ ├── invalid-negative-integer.json │ │ ├── invalid-negative-real.json │ │ ├── invalid-second-surrogate.json │ │ ├── invalid-unicode-escape.json │ │ ├── isolated_surrogate_marker.json │ │ ├── leading_zero_in_number.json │ │ ├── lone-open-brace.json │ │ ├── lone-open-bracket.json │ │ ├── lone-second-surrogate.json │ │ ├── lonely_number.json │ │ ├── map_close.json │ │ ├── map_open.json │ │ ├── minus-sign-without-number.json │ │ ├── missing_integer_after_decimal_point.json │ │ ├── missing_integer_after_exponent.json │ │ ├── negative-integer-starting-with-zero.json │ │ ├── null-byte-in-object-key.json │ │ ├── null-byte-in-string.json │ │ ├── null-byte-outside-string.json │ │ ├── null-escape-in-string.json │ │ ├── null_then_garbage.json │ │ ├── object-apostrophes.json │ │ ├── object-garbage-at-end.json │ │ ├── object-in-unterminated-array.json │ │ ├── object-no-colon.json │ │ ├── object-no-value.json │ │ ├── object-unterminated-value.json │ │ ├── real-garbage-after-e.json │ │ ├── real-negative-overflow.json │ │ ├── real-positive-overflow.json │ │ ├── real-truncated-at-e.json │ │ ├── real-truncated-at-point.json │ │ ├── string_invalid_escape.json │ │ ├── string_invalid_hex_char.json │ │ ├── string_with_invalid_newline.json │ │ ├── tab-character-in-string.json │ │ ├── true_then_garbage.json │ │ ├── truncated-unicode-surrogate.json │ │ ├── unicode-identifier.json │ │ ├── unterminated-array-and-object.json │ │ ├── unterminated-array.json │ │ ├── unterminated-empty-key.json │ │ ├── unterminated-key.json │ │ ├── unterminated-object-and-array.json │ │ └── unterminated-string.json │ └── valid │ │ ├── array.json │ │ ├── codepoints_from_unicode_org.json │ │ ├── complex-array.json │ │ ├── deep_arrays.json │ │ ├── difficult_json_c_test_case.json │ │ ├── doubles.json │ │ ├── empty-array.json │ │ ├── empty-object-in-array.json │ │ ├── empty-object.json │ │ ├── empty-string.json │ │ ├── empty_array.json │ │ ├── empty_string.json │ │ ├── escaped-utf-control-char.json │ │ ├── escaped_bulgarian.json │ │ ├── escaped_foobar.json │ │ ├── false.json │ │ ├── four_byte_utf8.json │ │ ├── integers.json │ │ ├── negative-int.json │ │ ├── negative-one.json │ │ ├── negative-zero.json │ │ ├── null.json │ │ ├── nulls_and_bools.json │ │ ├── one-byte-utf-8.json │ │ ├── real-capital-e-negative-exponent.json │ │ ├── real-capital-e-positive-exponent.json │ │ ├── real-capital-e.json │ │ ├── real-exponent.json │ │ ├── real-fraction-exponent.json │ │ ├── real-negative-exponent.json │ │ ├── real-positive-exponent.json │ │ ├── real-subnormal-number.json │ │ ├── real-underflow.json │ │ ├── short-string.json │ │ ├── simple-ascii-string.json │ │ ├── simple-int-0.json │ │ ├── simple-int-1.json │ │ ├── simple-int-123.json │ │ ├── simple-object.json │ │ ├── simple-real.json │ │ ├── simple.json │ │ ├── string-escapes.json │ │ ├── string_with_escapes.json │ │ ├── three-byte-utf-8.json │ │ ├── three_byte_utf8.json │ │ ├── trailing-whitespace.json │ │ ├── true.json │ │ ├── two-byte-utf-8.json │ │ ├── unescaped_bulgarian.json │ │ ├── utf-8-string.json │ │ └── utf-surrogate-four-byte-encoding.json ├── jsonrpc_SUITE.erl ├── jsonrpc_SUITE_data │ ├── jsontest.erl │ └── templates │ │ └── yaws.conf ├── main_SUITE.erl ├── main_SUITE_data │ ├── app_test.erl │ ├── appmod1.erl │ ├── appmod2.erl │ ├── appmod3.erl │ ├── appmod_strip_undefined_bindings.erl │ ├── appmod_with_yssi.erl │ ├── appmod_with_yssi_strip_undefined_bindings.erl │ ├── cache_appmod_test.erl │ ├── dispatchmod_tester.erl │ ├── extra_resp_hdrs.erl │ ├── flushtest.erl │ ├── forwarded_for_test.erl │ ├── header_order.erl │ ├── phptest.erl │ ├── policies.erl │ ├── posttest.erl │ ├── reentranttest.erl │ ├── rewritetest.erl │ ├── shapertest.erl │ ├── status.erl │ ├── streamtest.erl │ ├── templates │ │ └── yaws.conf │ ├── throwtest.erl │ ├── wrap_log.erl │ └── www │ │ ├── accept_ranges1.yaws │ │ ├── accept_ranges2.yaws │ │ ├── appmod_with_yssi.yaws │ │ ├── appmod_with_yssi_strip_undefined_bindings.yaws │ │ ├── cache_appmod.yaws │ │ ├── cgi-bin │ │ └── redirect_test.cgi │ │ ├── chained.txt │ │ ├── exhtml.yaws │ │ ├── hello.txt │ │ ├── index.html │ │ ├── test.php │ │ ├── test_upload_ssl.yaws │ │ ├── variables.html │ │ └── yaws_head.gif ├── maxconn_SUITE.erl ├── maxconn_SUITE_data │ ├── max_connections.erl │ └── templates │ │ └── yaws.conf ├── mime_types_SUITE.erl ├── mime_types_SUITE_data │ ├── mime.types │ └── templates │ │ └── yaws.conf ├── multipart_post_parsing_SUITE.erl ├── no_docroot_SUITE.erl ├── no_docroot_SUITE_data │ └── templates │ │ ├── no_docroot_appmod.conf │ │ ├── no_docroot_fwdproxy.conf │ │ ├── no_docroot_redirect.conf │ │ └── no_docroot_revproxy.conf ├── proc_cleanup_SUITE.erl ├── redirect_SUITE.erl ├── redirect_SUITE_data │ ├── bad_redirect1.conf │ ├── bad_redirect2.conf │ ├── bad_redirect3.conf │ ├── bad_redirect4.conf │ ├── templates │ │ └── yaws.conf │ └── www │ │ ├── error404.yaws │ │ └── test │ │ └── index.yaws ├── revproxy_SUITE.erl ├── revproxy_SUITE_data │ ├── intercept1.erl │ ├── intercept2.erl │ ├── intercept3.erl │ ├── nolengthtest.erl │ ├── posttest.erl │ ├── rewritetest.erl │ ├── streamtest.erl │ └── templates │ │ └── yaws.conf ├── run_common_test.in ├── sconf_SUITE.erl ├── sconf_SUITE_data │ └── templates │ │ └── yaws.conf ├── srcdir_SUITE.erl ├── srcdir_SUITE_data │ ├── src │ │ └── srcdir_test.erl │ └── templates │ │ └── yaws.conf ├── ssl_sni_SUITE.erl ├── ssl_sni_SUITE_data │ ├── templates │ │ ├── yaws.conf │ │ ├── yaws_sni_disabled.conf │ │ ├── yaws_sni_enabled.conf │ │ ├── yaws_sni_not_enabled.conf │ │ ├── yaws_sni_required_on_vhost.conf │ │ ├── yaws_sni_strict.conf │ │ └── yaws_sni_without_tls.conf │ └── www │ │ └── index.yaws ├── subconfig_SUITE.erl ├── subconfig_SUITE_data │ └── templates │ │ ├── global_absolute_subconfig.conf │ │ ├── global_relative_subconfig.conf │ │ ├── global_subconfig.d │ │ ├── .hidden.conf │ │ ├── ignored │ │ ├── subconfig1.conf │ │ └── subconfig2.conf │ │ ├── global_subconfigdir.d │ │ ├── .hidden.conf │ │ ├── subconfigdir1.conf │ │ └── subconfigdir2.conf │ │ ├── server_subconfig.conf │ │ ├── server_subconfig.d │ │ ├── .hidden.conf │ │ ├── ignored │ │ ├── subconfig1.conf │ │ └── subconfig2.conf │ │ ├── server_subconfig_closing_tag.conf │ │ ├── server_subconfigdir.d │ │ ├── .hidden.conf │ │ ├── subconfigdir1.conf │ │ └── subconfigdir2.conf │ │ ├── yaws_absolute.conf │ │ ├── yaws_global_subconfig_notfound1.conf │ │ ├── yaws_global_subconfig_notfound2.conf │ │ ├── yaws_global_subconfig_notfound3.conf │ │ ├── yaws_relative.conf │ │ ├── yaws_server_subconfig_closing_tag.conf │ │ ├── yaws_server_subconfig_notfound1.conf │ │ ├── yaws_server_subconfig_notfound2.conf │ │ └── yaws_server_subconfig_notfound3.conf ├── testsuite.erl ├── testsuite.hrl.in ├── webdav_SUITE.erl ├── webdav_SUITE_data │ ├── commands │ └── templates │ │ ├── davtest │ │ └── yaws.conf ├── websockets_SUITE.erl ├── yaws.coverspec.in ├── yaws_api_SUITE.erl ├── yaws_compile_SUITE.erl ├── yaws_compile_SUITE_data │ ├── bad_module1.yaws │ ├── bad_module2.yaws │ ├── bad_module3.yaws │ ├── comments.yaws │ ├── compilation_error.yaws │ ├── empty_erl.yaws │ ├── empty_verbatim.yaws │ ├── erl_tag.yaws │ ├── hello.yaws │ ├── no_out_fun1.yaws │ ├── no_out_fun2.yaws │ ├── templates │ │ └── yaws.conf │ ├── var_bindings.yaws │ └── verbatim_tag.yaws ├── yaws_ls_SUITE.erl ├── yaws_rpc_SUITE.erl ├── yaws_sessions_server_SUITE.erl └── yaws_sessions_server_SUITE_data │ └── templates │ └── yaws.conf ├── two-mode-mode.el ├── vsn.mk ├── win32 ├── Makefile.am ├── README.developer ├── README.txt ├── build.xml.in ├── img │ └── yaws_head.gif ├── license.xml ├── yaws.c └── yaws.conf ├── www ├── END ├── END2 ├── HEAD ├── TAB.inc ├── appmods.yaws ├── arg.yaws ├── arg2.yaws ├── articles.yaws ├── bindings.yaws ├── cgi-bin │ └── foo.py ├── cgi.yaws ├── code.yaws ├── code │ ├── Makefile.am │ └── myappmod.erl ├── compile_layout.dia ├── compile_layout.png ├── configuration.yaws ├── contact.yaws ├── contributors.txt ├── cookies.yaws ├── doc.yaws ├── dynamic.yaws ├── embed.yaws ├── favicon.ico ├── form.yaws ├── haxe_intro.yaws ├── haxe_sample.html ├── haxe_sample.yaws ├── icons │ ├── README │ ├── a.gif │ ├── alert.black.gif │ ├── alert.red.gif │ ├── apache_pb.gif │ ├── back.gif │ ├── ball.gray.gif │ ├── ball.red.gif │ ├── binary.gif │ ├── binhex.gif │ ├── blank.gif │ ├── bomb.gif │ ├── box1.gif │ ├── box2.gif │ ├── broken.gif │ ├── burst.gif │ ├── c.gif │ ├── comp.blue.gif │ ├── comp.gray.gif │ ├── compressed.gif │ ├── continued.gif │ ├── dir.gif │ ├── down.gif │ ├── dvi.gif │ ├── erl.gif │ ├── f.gif │ ├── folder.gif │ ├── folder.open.gif │ ├── folder.sec.gif │ ├── forward.gif │ ├── generic.gif │ ├── generic.red.gif │ ├── generic.sec.gif │ ├── gnu-head-tiny.jpg │ ├── hand.right.gif │ ├── hand.up.gif │ ├── hrl.gif │ ├── icon.sheet.gif │ ├── image1.gif │ ├── image2.gif │ ├── image3.gif │ ├── index.gif │ ├── layout.gif │ ├── left.gif │ ├── link.gif │ ├── mailman-large.jpg │ ├── mailman.jpg │ ├── movie.gif │ ├── p.gif │ ├── patch.gif │ ├── pdf.gif │ ├── php4.gif │ ├── pie0.gif │ ├── pie1.gif │ ├── pie2.gif │ ├── pie3.gif │ ├── pie4.gif │ ├── pie5.gif │ ├── pie6.gif │ ├── pie7.gif │ ├── pie8.gif │ ├── portal.gif │ ├── ps.gif │ ├── quill.gif │ ├── right.gif │ ├── screw1.gif │ ├── screw2.gif │ ├── script.gif │ ├── small │ │ ├── README.txt │ │ ├── back.gif │ │ ├── binary.gif │ │ ├── binhex.gif │ │ ├── blank.gif │ │ ├── broken.gif │ │ ├── burst.gif │ │ ├── comp1.gif │ │ ├── comp2.gif │ │ ├── compressed.gif │ │ ├── continued.gif │ │ ├── dir.gif │ │ ├── dir2.gif │ │ ├── doc.gif │ │ ├── forward.gif │ │ ├── generic.gif │ │ ├── generic2.gif │ │ ├── generic3.gif │ │ ├── image.gif │ │ ├── image2.gif │ │ ├── index.gif │ │ ├── key.gif │ │ ├── movie.gif │ │ ├── patch.gif │ │ ├── ps.gif │ │ ├── rainbow.gif │ │ ├── sound.gif │ │ ├── sound2.gif │ │ ├── tar.gif │ │ ├── text.gif │ │ ├── transfer.gif │ │ ├── unknown.gif │ │ └── uu.gif │ ├── sound1.gif │ ├── sound2.gif │ ├── sphere1.gif │ ├── sphere2.gif │ ├── tar.gif │ ├── tex.gif │ ├── text.gif │ ├── transfer.gif │ ├── unknown.gif │ ├── up.gif │ ├── uu.gif │ ├── uuencoded.gif │ ├── world1.gif │ ├── world2.gif │ ├── yaws.gif │ ├── yawsY.gif │ ├── yaws_head.gif │ ├── yaws_pb.gif │ └── yaws_y.gif ├── index.yaws ├── internals.yaws ├── jsolait │ ├── jsolait.js │ └── lib │ │ ├── jsonrpc.js │ │ └── urllib.js ├── json_intro.yaws ├── json_sample.html ├── json_sample.yaws ├── logger_mod.yaws ├── man.yaws ├── multiple_accept_headers.yaws ├── news ├── pcookie.yaws ├── post.yaws ├── privbind.yaws ├── process_tree.dia ├── process_tree.png ├── query.yaws ├── readcookie.yaws ├── readpcookie.yaws ├── rebar_release.yaws ├── redirect.yaws ├── redirect2.yaws ├── redirect3.yaws ├── redirect4.yaws ├── server_sent_events.html ├── server_sent_events.yaws ├── session.yaws ├── session1.yaws ├── setcookie.yaws ├── setpcookie.yaws ├── shoppingcart │ ├── Makefile.am │ ├── buy.yaws │ ├── index.yaws │ ├── junk.png │ ├── loginpost.yaws │ ├── logout.yaws │ ├── shopcart.erl │ ├── shopcart_form.yaws │ ├── source.html │ └── style.css ├── simple.yaws ├── simple_ex1.yaws ├── simple_ex2.yaws ├── simple_ex3.yaws ├── simple_ex4.yaws ├── small.yaws ├── soap_intro.yaws ├── spacer.gif ├── ssi.yaws ├── ssi │ ├── dynamic.1 │ ├── dynamic.2 │ └── dynamic.3 ├── ssi_ex1 ├── static.html ├── stats_ex.yaws ├── stil.css ├── stream.yaws ├── testdir │ └── index.html ├── upload.yaws ├── upload0.yaws ├── urandom.yaws ├── urandom_from_pid.yaws ├── websockets.yaws ├── websockets_autobahn_endpoint.yaws ├── websockets_example.yaws ├── websockets_example_endpoint.yaws ├── yapp_intro.yaws ├── yaws-1.55_to_1.56.patch ├── yaws.eps ├── ybed.erl ├── ybed_sup.erl └── yman.yaws └── yaws.pc.in /ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/ChangeLog -------------------------------------------------------------------------------- /README.cygwin: -------------------------------------------------------------------------------- 1 | NOTE1: 2 | 3 | In latest version of cygwin, there is a known bug with make. It does 4 | not handle windows paths properly. So you need to downgrade it to 5 | get dos driver letter specification to work. (i.e. c:/foo/bar.): 6 | 7 | 1. get a patched version of make 3.81: http://www.cmake.org/files/cygwin/make.exe 8 | 2. replace /usr/bin/make.exe by this new one 9 | 3. install libintl3 10 | 11 | 12 | NOTE2: 13 | 14 | unix paths in configuration file (yaws.conf) are not supported, 15 | because on windows, erlang is not aware of cygwin and understands 16 | windows paths only. The generated file will be created using windows 17 | paths but tests are written for unix systems. So they will fail on 18 | cygwin. 19 | 20 | NOTE3: 21 | 22 | Yaws is not tested on cygwin. If possible, use the windows 23 | installer. See http://yaws.hyber.org/download. 24 | 25 | -------------------------------------------------------------------------------- /README.osx: -------------------------------------------------------------------------------- 1 | # Homebrew on OSX 2 | 3 | If you develols .gip on OS X, the Yaws formula works correctly for users of 4 | Erlang/OTP 24.2 and above. To install please run: 5 | 6 | brew install yaws 7 | 8 | To install the HEAD using Homebrew run: 9 | 10 | brew install --HEAD yaws 11 | 12 | This capability was made to work correctly with [this pull request 13 | merge](https://github.com/mxcl/homebrew/pull/23076). 14 | -------------------------------------------------------------------------------- /README.pkg-config: -------------------------------------------------------------------------------- 1 | ## 2 | ## pkg-config(1) support 3 | ## 4 | 5 | If you have pkg-config installed on your system, you can 6 | use it as shown below to obtain information about Yaws: 7 | 8 | $ pkg-config yaws --modversion 9 | 1.80 10 | 11 | $ pkg-config yaws --cflags 12 | -I/usr/local/lib/yaws/include 13 | 14 | $ pkg-config yaws --libs 15 | -pa /usr/local/lib/yaws/ebin 16 | -------------------------------------------------------------------------------- /_build.cfg: -------------------------------------------------------------------------------- 1 | project : { 2 | name : yaws 3 | vsn : "1.76" 4 | }, 5 | 6 | repositories : ["http://repo.erlware.org/pub"], 7 | 8 | -------------------------------------------------------------------------------- /applications/chat/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src ebin 2 | 3 | INSTDIR=$(DESTDIR)$(appsdir)/chat 4 | 5 | EXTRA_DIST = www 6 | 7 | install-data-local: 8 | $(AM_V_at)$(INSTALL) -d $(INSTDIR) 9 | $(AM_V_at)(cd @srcdir@; tar cf - www ) | (cd $(INSTDIR); tar xf - ) 10 | $(AM_V_at)chmod -R u+rw $(INSTDIR)/www 11 | 12 | uninstall-local: 13 | $(AM_V_at)rm -fr $(INSTDIR)/www 14 | 15 | # Local Variables: 16 | # tab-width: 8 17 | # End: 18 | -------------------------------------------------------------------------------- /applications/chat/ebin/Makefile.am: -------------------------------------------------------------------------------- 1 | beamdir = $(appsdir)/chat/ebin 2 | 3 | BEAM_FILES = *.beam 4 | 5 | beam_DATA = $(BEAM_FILES) 6 | 7 | 8 | clean-local: 9 | $(AM_V_at)rm -f $(BEAM_FILES) 10 | 11 | # Local Variables: 12 | # tab-width: 8 13 | # End: 14 | -------------------------------------------------------------------------------- /applications/chat/src/Makefile.am: -------------------------------------------------------------------------------- 1 | include @top_srcdir@/include.mk 2 | 3 | MODULES = chat.erl 4 | 5 | EXTRA_DIST = $(MODULES) 6 | 7 | EBIN_DIR=@builddir@/../ebin 8 | EBIN_FILES=$(MODULES:%.erl=$(EBIN_DIR)/%.beam) 9 | 10 | ERLC_FLAGS = $(ERLC_GENERIC_FLAGS) 11 | 12 | include @top_srcdir@/erlang_deps.mk 13 | 14 | all-local: $(EBIN_FILES) 15 | 16 | clean-local: 17 | $(AM_V_at)rm -f $(EBIN_FILES) 18 | 19 | $(EBIN_DIR)/%.beam: %.erl 20 | $(AM_V_at)$(ERLC) $(ERLC_FLAGS) -M $(PHONY_DEPS) -MF $(@:$(EBIN_DIR)/%.beam=$(DEPDIR)/%.Pbeam) -MT $@ $< 21 | $(AM_V_ERLC)$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $< 22 | 23 | 24 | distclean-local: 25 | $(AM_V_at)rm -fr $(DEPDIR) 26 | 27 | # Local Variables: 28 | # tab-width: 8 29 | # End: 30 | -------------------------------------------------------------------------------- /applications/chat/www/angel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/angel.png -------------------------------------------------------------------------------- /applications/chat/www/bigsmile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/bigsmile.png -------------------------------------------------------------------------------- /applications/chat/www/burp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/burp.png -------------------------------------------------------------------------------- /applications/chat/www/chat_read.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(A) -> 3 | chat:chat_read(A). 4 | 5 | -------------------------------------------------------------------------------- /applications/chat/www/chat_write.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(A) -> 3 | case chat:check_session(A) of 4 | Session -> 5 | chat:chat_write(A); 6 | Error -> 7 | Error 8 | end. 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/chat/www/cool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/cool.png -------------------------------------------------------------------------------- /applications/chat/www/crossedlips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/crossedlips.png -------------------------------------------------------------------------------- /applications/chat/www/cry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/cry.png -------------------------------------------------------------------------------- /applications/chat/www/embarrassed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/embarrassed.png -------------------------------------------------------------------------------- /applications/chat/www/farted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/farted.png -------------------------------------------------------------------------------- /applications/chat/www/index.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(A) -> 3 | {redirect_local, {rel_path, "chat.yaws"}}. 4 | 5 | -------------------------------------------------------------------------------- /applications/chat/www/kiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/kiss.png -------------------------------------------------------------------------------- /applications/chat/www/login.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | L = case (A#arg.req)#http_request.method of 5 | 'GET' -> 6 | yaws_api:parse_query(A); 7 | 'POST' -> 8 | yaws_api:parse_post(A) 9 | end, 10 | case {lists:keysearch("user", 1, L), 11 | lists:keysearch("password", 1, L)} of 12 | {{value, {_, User}}, {value, {_,Passwd}}} -> 13 | case chat:login(User, Passwd) of 14 | {ok, Cookie} -> 15 | [yaws_api:setcookie("sessionid", Cookie), 16 | {redirect_local, {rel_path,"chat.yaws"}}]; 17 | {error, Reason} -> 18 | chat:display_login(A, Reason) 19 | end; 20 | _ -> 21 | chat:display_login(A, "badly formated POST/GET") 22 | end. 23 | 24 | 25 | -------------------------------------------------------------------------------- /applications/chat/www/moneymouth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/moneymouth.png -------------------------------------------------------------------------------- /applications/chat/www/oneeye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/oneeye.png -------------------------------------------------------------------------------- /applications/chat/www/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/sad.png -------------------------------------------------------------------------------- /applications/chat/www/scream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/scream.png -------------------------------------------------------------------------------- /applications/chat/www/smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/smile.png -------------------------------------------------------------------------------- /applications/chat/www/think.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/think.png -------------------------------------------------------------------------------- /applications/chat/www/tongue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/tongue.png -------------------------------------------------------------------------------- /applications/chat/www/wink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/wink.png -------------------------------------------------------------------------------- /applications/chat/www/yell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/chat/www/yell.png -------------------------------------------------------------------------------- /applications/mail/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src ebin 2 | 3 | EXTRA_DIST = yaws-webmail.conf TODO README www 4 | 5 | INSTDIR=$(DESTDIR)$(appsdir)/mail 6 | 7 | install-data-local: 8 | $(AM_V_at)$(INSTALL) -d $(DESTDIR)$(sysconfdir)/mail 9 | $(AM_V_at)if [ -f $(DESTDIR)$(sysconfdir)/mail/yaws-webmail.conf ]; then \ 10 | echo "$(DESTDIR)$(sysconfdir)/mail/yaws-webmail.conf already exists"; \ 11 | else \ 12 | $(INSTALL) -m 644 @srcdir@/yaws-webmail.conf $(DESTDIR)$(sysconfdir)/mail; \ 13 | fi 14 | 15 | $(AM_V_at)$(INSTALL) -d $(INSTDIR) 16 | $(AM_V_at)(cd @srcdir@; tar cf - www ) | (cd $(INSTDIR); tar xf - ) 17 | $(AM_V_at)chmod -R u+rw $(INSTDIR)/www 18 | 19 | uninstall-local: 20 | $(AM_V_at)rm -f $(DESTDIR)$(sysconfdir)/mail/yaws-webmail.conf $(INSTDIR)/www 21 | 22 | # Local Variables: 23 | # tab-width: 8 24 | # End: 25 | -------------------------------------------------------------------------------- /applications/mail/TODO: -------------------------------------------------------------------------------- 1 | Things to do 2 | 3 | - handle attachments in received emails 4 | - optionally include old text as quoted text in reply. We 5 | need to select the text part for the quote if the email 6 | is of type multipart/alternative. We select text/html 7 | to display. 8 | - page large inboxes with 20 emails per page (sorted in 9 | reverse order with most recently received emails first) 10 | - write an attachement cache to limit the delays when 11 | fetching an attachement 12 | - code outgoing emails as quoted-printable (must limit max 13 | line length to 74 according to RFC ???) 14 | 15 | - Sort by 'From', 'Subject' and 'Nr' 16 | - Implement mail forwarding 17 | - Support imap mail backend system. 18 | - Properly decode encoded attachments. 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /applications/mail/ebin/Makefile.am: -------------------------------------------------------------------------------- 1 | beamdir = $(appsdir)/mail/ebin 2 | 3 | BEAM_FILES = *.beam 4 | 5 | beam_DATA = $(BEAM_FILES) 6 | 7 | 8 | clean-local: 9 | $(AM_V_at)rm -f $(BEAM_FILES) 10 | 11 | # Local Variables: 12 | # tab-width: 8 13 | # End: 14 | -------------------------------------------------------------------------------- /applications/mail/src/Makefile.am: -------------------------------------------------------------------------------- 1 | include @top_srcdir@/include.mk 2 | 3 | MODULES = mail.erl attachment.erl smtp.erl mail_html.erl 4 | 5 | EXTRA_DIST = $(MODULES) defs.hrl 6 | 7 | EBIN_DIR=@builddir@/../ebin 8 | EBIN_FILES=$(MODULES:%.erl=$(EBIN_DIR)/%.beam) 9 | 10 | ERLC_FLAGS = $(ERLC_GENERIC_FLAGS) -DETCDIR='"@sysconfdir@"' 11 | 12 | include @top_srcdir@/erlang_deps.mk 13 | 14 | all-local: $(EBIN_FILES) 15 | 16 | clean-local: 17 | $(AM_V_at)rm -f $(EBIN_FILES) 18 | 19 | $(EBIN_DIR)/%.beam: %.erl 20 | $(AM_V_at)$(ERLC) $(ERLC_FLAGS) -M $(PHONY_DEPS) -MF $(@:$(EBIN_DIR)/%.beam=$(DEPDIR)/%.Pbeam) -MT $@ $< 21 | $(AM_V_ERLC)$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $< 22 | 23 | 24 | distclean-local: 25 | $(AM_V_at)rm -fr $(DEPDIR) 26 | 27 | # Local Variables: 28 | # tab-width: 8 29 | # End: 30 | -------------------------------------------------------------------------------- /applications/mail/src/defs.hrl: -------------------------------------------------------------------------------- 1 | % -*- Erlang -*- 2 | % File: defs.hrl (/mnt/disk2/jb/work/yaws/yaws/applications/mail/src/defs.hrl) 3 | % Author: Johan Bevemyr 4 | % Created: Wed Oct 29 23:39:30 2003 5 | % Purpose: 6 | 7 | -ifndef(DEFS_HRL). 8 | -define(DEFS_HRL, true). 9 | 10 | 11 | %% Create config file in /etc/mail/yaws-webmail.conf 12 | 13 | -record(cfg, {ttl = 1800, % 30 minuter TTL 14 | popserver = "localhost", 15 | maildomain = "foo.bar", 16 | smtpserver = "localhost", 17 | sendtimeout = 3000}). 18 | 19 | 20 | -endif. 21 | -------------------------------------------------------------------------------- /applications/mail/www/compose.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case mail:check_session(A) of 5 | {ok, Session} -> 6 | mail:compose(Session); 7 | Error -> 8 | Error 9 | end. 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/mail/www/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/down.gif -------------------------------------------------------------------------------- /applications/mail/www/headers.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case mail:check_session(A) of 5 | {ok, Session} -> 6 | {ok, Nr} = queryvar(A, "nr"), 7 | mail:showheaders(Session, list_to_integer(Nr)); 8 | Error -> 9 | Error 10 | end. 11 | 12 | 13 | -------------------------------------------------------------------------------- /applications/mail/www/index.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(A) -> 3 | {redirect_local, {rel_path, "mail.yaws"}}. 4 | 5 | -------------------------------------------------------------------------------- /applications/mail/www/listop.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case mail:check_session(A) of 5 | {ok, Session} -> 6 | L = yaws_api:parse_post(A), 7 | Op = mail:get_val("cmd", L, ""), 8 | ToDelete = [M || {M,Op} <- L, Op=="yes"], 9 | mail:delete(Session, ToDelete); 10 | Error -> 11 | Error 12 | end. 13 | 14 | 15 | -------------------------------------------------------------------------------- /applications/mail/www/login.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | L = case (A#arg.req)#http_request.method of 5 | 'GET' -> 6 | yaws_api:parse_query(A); 7 | 'POST' -> 8 | yaws_api:parse_post(A) 9 | end, 10 | User = mail:getopt("user", L, ""), 11 | Passwd = mail:getopt("password", L, ""), 12 | case mail:login(User, Passwd) of 13 | {ok, Cookie} -> 14 | [yaws_api:setcookie("mailsession", Cookie), 15 | {redirect_local, {rel_path,"mail.yaws"}}]; 16 | {error, Reason} -> 17 | mail:display_login(A, Reason) 18 | end. 19 | 20 | 21 | -------------------------------------------------------------------------------- /applications/mail/www/logout.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case mail:check_session(A) of 5 | {ok, Session} -> 6 | mail:logout(Session); 7 | Error -> 8 | Error 9 | end. 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/mail/www/mail.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/mail.js -------------------------------------------------------------------------------- /applications/mail/www/mail.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case mail:check_session(A) of 5 | {ok, Session} -> 6 | L = yaws_api:parse_query(A), 7 | Refresh = 8 | case lists:keysearch("refresh",1,L) of 9 | {value, _} -> true; 10 | _ -> false 11 | end, 12 | Sort = 13 | case lists:keysearch("sort",1,L) of 14 | {value, {_,SortStr}} -> list_to_atom(SortStr); 15 | _ -> undefined 16 | end, 17 | mail:list(Session, {Refresh, Sort}); 18 | Error -> 19 | Error 20 | end. 21 | 22 | 23 | -------------------------------------------------------------------------------- /applications/mail/www/send.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case mail:check_session(A) of 5 | {ok, Session} -> 6 | mail:send(Session,A); 7 | Error -> 8 | Error 9 | end. 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/mail/www/showmail.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case mail:check_session(A) of 5 | {ok, Session} -> 6 | L = yaws_api:parse_query(A), 7 | {value, {_,Nr}} = lists:keysearch("nr",1,L), 8 | mail:showmail(Session, list_to_integer(Nr)); 9 | Error -> 10 | Error 11 | end. 12 | 13 | 14 | -------------------------------------------------------------------------------- /applications/mail/www/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/spacer.gif -------------------------------------------------------------------------------- /applications/mail/www/tab-bg_active.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tab-bg_active.gif -------------------------------------------------------------------------------- /applications/mail/www/tab-bg_inactive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tab-bg_inactive.gif -------------------------------------------------------------------------------- /applications/mail/www/tab-hr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tab-hr.gif -------------------------------------------------------------------------------- /applications/mail/www/tab-left_active.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tab-left_active.gif -------------------------------------------------------------------------------- /applications/mail/www/tab-left_inactive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tab-left_inactive.gif -------------------------------------------------------------------------------- /applications/mail/www/tab-right_active.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tab-right_active.gif -------------------------------------------------------------------------------- /applications/mail/www/tab-right_inactive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tab-right_inactive.gif -------------------------------------------------------------------------------- /applications/mail/www/tool-delete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tool-delete.gif -------------------------------------------------------------------------------- /applications/mail/www/tool-div.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tool-div.gif -------------------------------------------------------------------------------- /applications/mail/www/tool-newmail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tool-newmail.gif -------------------------------------------------------------------------------- /applications/mail/www/tool-send.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/tool-send.gif -------------------------------------------------------------------------------- /applications/mail/www/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/up.gif -------------------------------------------------------------------------------- /applications/mail/www/view-mark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/mail/www/view-mark.gif -------------------------------------------------------------------------------- /applications/mail/yaws-webmail.conf: -------------------------------------------------------------------------------- 1 | # This is the default Yaws webmail configuration file 2 | # It contains very few config items, ... 3 | 4 | 5 | 6 | # The time to live, a session is GC'ed by the server 7 | # when it has ben idle for more than this amount of seconds 8 | ttl = 1800 9 | 10 | # the popserver, either an IP or a FQDN is acceptable here 11 | popserver = localhost 12 | 13 | 14 | # same goes for the smtp server 15 | smtpserver = localhost 16 | 17 | 18 | ## maildomin must be set, 19 | maildomain = mydomain.org 20 | 21 | 22 | # The timeout in send operations, default should be fine here (ms) 23 | sendtimeout = 15000 24 | 25 | -------------------------------------------------------------------------------- /applications/wiki/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src ebin 2 | 3 | EXTRA_DIST = wiki.conf start.sh README www 4 | 5 | INSTDIR=$(DESTDIR)$(appsdir)/wiki 6 | install-data-local: 7 | $(AM_V_at)$(INSTALL) -d $(INSTDIR) 8 | $(AM_V_at)(cd @srcdir@; tar cf - www ) | (cd $(INSTDIR); tar xf - ) 9 | $(AM_V_at)chmod -R u+rw $(INSTDIR)/www 10 | 11 | uninstall-local: 12 | $(AM_V_at)rm -fr $(INSTDIR)/www 13 | -------------------------------------------------------------------------------- /applications/wiki/ebin/Makefile.am: -------------------------------------------------------------------------------- 1 | beamdir = $(appsdir)/wiki/ebin/ 2 | 3 | BEAM_FILES = *.beam 4 | 5 | beam_DATA = $(BEAM_FILES) 6 | 7 | 8 | clean-local: 9 | $(AM_V_at)rm -f $(BEAM_FILES) 10 | 11 | # Local Variables: 12 | # tab-width: 8 13 | # End: 14 | -------------------------------------------------------------------------------- /applications/wiki/scripts/addFile.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash -- 2 | 3 | progname=`basename $0` 4 | localstatedir=@localstatedir@ 5 | 6 | function usage () { 7 | cat < 9 | EOF 10 | exit 1 11 | } 12 | 13 | 14 | if test $# -ne 2 ; then 15 | usage 16 | fi 17 | 18 | erl -noinput -pa @appsdir@/wiki/ebin -s wiki addFile $1 $2 19 | -------------------------------------------------------------------------------- /applications/wiki/scripts/getPassword.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash -- 2 | 3 | progname=`basename $0` 4 | localstatedir=@localstatedir@ 5 | 6 | function usage () { 7 | cat < 9 | EOF 10 | exit 1 11 | } 12 | 13 | 14 | if test $# -ne 1 ; then 15 | usage 16 | fi 17 | 18 | erl -noinput -pa @appsdir@/wiki/ebin -s wiki getPassword $1 19 | -------------------------------------------------------------------------------- /applications/wiki/scripts/importFiles.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash -- 2 | 3 | progname=`basename $0` 4 | localstatedir=@localstatedir@ 5 | 6 | function usage () { 7 | cat < 9 | EOF 10 | exit 1 11 | } 12 | 13 | 14 | if test $# -ne 1 ; then 15 | usage 16 | fi 17 | 18 | erl -noinput -pa @appsdir@/wiki/ebin -s wiki importFiles $1 19 | -------------------------------------------------------------------------------- /applications/wiki/src/wiki_plugin_backlinks.erl: -------------------------------------------------------------------------------- 1 | %%% File : wiki_plugin_backlinks.erl 2 | %%% Author : Mickael Remond 3 | %%% Description : This plugin can show the list of backlinks inline 4 | %%% Created : 20 Oct 2003 by Mickael Remond 5 | %%% 6 | 7 | -module(wiki_plugin_backlinks). 8 | 9 | -export([run/2]). 10 | 11 | run(Page, _ArgList) -> 12 | %% TODO: Fixme 13 | %% This is working if there is only one virtual server. 14 | %% A way to handle this cleanly is needed. 15 | {ok, _Gconf, [[Sconf|_Others]]} = yaws_api:getconf(), 16 | Root = yaws:sconf_docroot(Sconf), 17 | 18 | AllRefs = wiki_utils:getallrefs(Page, Root), 19 | 20 | lists:map(fun(F) -> 21 | [wiki_to_html:format_link(F, Root),"
"] end, 22 | AllRefs). 23 | 24 | -------------------------------------------------------------------------------- /applications/wiki/src/wiki_plugin_dummy.erl: -------------------------------------------------------------------------------- 1 | %%% File : wiki_plugin_dummy.erl 2 | %%% Author : Mickael Remond 3 | %%% Description : Example "dummy" wiki plugin 4 | %%% Created : 20 Oct 2003 by Mickael Remond 5 | %%% 6 | 7 | -module(wiki_plugin_dummy). 8 | 9 | -export([run/2]). 10 | 11 | run(_Page, _ArgList) -> 12 | "

Using Dummy Wiki Plugin.

". 13 | -------------------------------------------------------------------------------- /applications/wiki/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | yaws -i -c wiki.conf 3 | -------------------------------------------------------------------------------- /applications/wiki/wiki.conf: -------------------------------------------------------------------------------- 1 | logdir = logs 2 | ebin_dir = ebin 3 | include_dir = include 4 | 5 | 6 | port = 8000 7 | listen = 127.0.0.1 8 | docroot = wiki 9 | 10 | -------------------------------------------------------------------------------- /applications/wiki/www/ALockedPage.wob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/ALockedPage.wob -------------------------------------------------------------------------------- /applications/wiki/www/AnUnlockedPage.wob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/AnUnlockedPage.wob -------------------------------------------------------------------------------- /applications/wiki/www/Examples.wob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/Examples.wob -------------------------------------------------------------------------------- /applications/wiki/www/FormattingWikiPages.wob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/FormattingWikiPages.wob -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/allpages.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/allpages.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/back.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/custom.css: -------------------------------------------------------------------------------- 1 | body, td { 2 | font-family : Verdana, Arial, sans-serif ; 3 | font-size : 9pt; 4 | } 5 | /* links without underline */ 6 | a { 7 | text-decoration: none; 8 | } 9 | /* visual link effect */ 10 | a:hover { 11 | text-decoration: underline; 12 | } 13 | 14 | TEXTAREA{ 15 | width : 100%; 16 | } 17 | 18 | #menu{ 19 | background: #BFEE90; 20 | } 21 | #lockedmenu{ 22 | background: #EF0000; 23 | } 24 | #lockedmenuframe { 25 | background: #FF1010; 26 | } 27 | #menuframe { 28 | background: #90EE91; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/edit.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/editfiles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/editfiles.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/editme.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/editme.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/forward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/forward.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/ftp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/ftp.png -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/history.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/history.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/home.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/http.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/http.png -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/https.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/https.png -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/icon.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/index.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/index.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/interwiki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/interwiki.png -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/kamera.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/kamera.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/lastedited.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/lastedited.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/mailto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/mailto.png -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/template2.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/template2.html -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/template_info.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | @@TITLE@@ 4 | 9 | 10 | 11 | 12 | 13 | 31 | 32 | 33 | 34 | 35 |
14 | 15 | 16 | 17 | 19 | 20 | 21 | 28 | 29 |
18 |
22 |

 

23 | 24 | 25 |

@@HEADER@@

26 | @@DATA@@ 27 |
30 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/url.png -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.files/zombies.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.files/zombies.gif -------------------------------------------------------------------------------- /applications/wiki/www/WikiPreferences.wob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/applications/wiki/www/WikiPreferences.wob -------------------------------------------------------------------------------- /applications/wiki/www/addFile.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | WikiRoot = filename:dirname(Arg#arg.fullpath), 7 | {abs_path, P} = (Arg#arg.req)#http_request.path, 8 | Path = yaws_api:url_decode(P), 9 | Prefix = wiki_yaws:get_path_prefix(Path), 10 | wiki:addFile(Arg, WikiRoot, Prefix). 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /applications/wiki/www/allPages.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = allPages, 7 | wiki_yaws:call_wiki(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/allRefsToMe.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | out(Arg) -> 5 | F = allRefsToMe, 6 | wiki_yaws:call_with_query(wiki, F, Arg). 7 | 8 | 9 | -------------------------------------------------------------------------------- /applications/wiki/www/changePassword.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = changePassword, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/changePassword2.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = changePassword2, 7 | wiki_yaws:call_with_multiquery(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/copyFiles.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = copyFiles, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/wiki/www/createNewPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = createNewPage, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/deleteFiles.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = deleteFiles, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/wiki/www/editFiles.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = editFiles, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/editPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = editPage, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/editTag.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = editTag, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/finalDeletePage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = finalDeletePage, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/getMidSize.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(Arg) -> 4 | F = getMidSize, 5 | wiki_yaws:call_with_query(wiki, F, Arg). 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /applications/wiki/www/getThumb.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(Arg) -> 4 | F = getThumb, 5 | wiki_yaws:call_with_query(wiki, F, Arg). 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /applications/wiki/www/importFiles.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = fixupFiles, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/index.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(Arg) -> 4 | {abs_path, P} = (Arg#arg.req)#http_request.path, 5 | Path = yaws_api:url_decode(P), 6 | Prefix = wiki_yaws:get_path_prefix(Path), 7 | {redirect_local, Prefix ++ "showPage.yaws?node=home"}. 8 | 9 | 10 | -------------------------------------------------------------------------------- /applications/wiki/www/lastEdited.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = lastEdited, 7 | wiki_yaws:call_wiki(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/previewNewPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = previewNewPage, 7 | wiki_yaws:call_with_multiquery(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/previewPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = previewPage, 7 | wiki_yaws:call_with_multiquery(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/previewTagged.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = previewTagged, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/putPassword.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = putPassword, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/wiki/www/searchPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = searchPages, 7 | if 8 | Arg#arg.clidata /= undefined -> 9 | %% io:format("post~n"), 10 | wiki_yaws:call_with_post(wiki, F, Arg); 11 | length(Arg#arg.querydata) > 0 -> 12 | %% io:format("query~n"), 13 | wiki_yaws:call_with_query(wiki, F, Arg); 14 | true -> 15 | wiki_yaws:call_wiki(wiki, F, Arg) 16 | end. 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /applications/wiki/www/sendMeThePassword.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = sendMeThePassword, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/showHistory.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = showHistory, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/showOldPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = showOldPage, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/showPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = showPage, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/wiki/www/slideShow.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = slideShow, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/wiki/www/storeFiles.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = storeFiles, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/storeNewPage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = storeNewPage, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/storePage.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | out(Arg) -> 5 | F = storePage, 6 | wiki_yaws:call_with_multiquery(wiki, F, Arg). 7 | 8 | 9 | -------------------------------------------------------------------------------- /applications/wiki/www/storeTagged.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = storeTagged, 7 | wiki_yaws:call_with_multi(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/wiki/www/thumbIndex.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = thumbIndex, 7 | wiki_yaws:call_with_query(wiki, F, Arg). 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /applications/wiki/www/wikiZombies.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | out(Arg) -> 6 | F = wikiZombies, 7 | wiki_yaws:call_wiki(wiki, F, Arg). 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/yapp/README: -------------------------------------------------------------------------------- 1 | An easy way to deploy Yaws applications (Yapps) independently of 2 | each other. 3 | 4 | To compile : 5 | make 6 | Generate edoc documents : 7 | make docs 8 | Install: 9 | make install 10 | 11 | You need to have compiled (configured) the Yaws application before 12 | making yapp. 13 | See the generated documents for more info in how to use the yapp 14 | application. 15 | The current application uses mnesia so a precondition is that a 16 | schema is generated for the node Yaws is running on. 17 | 18 | Known problems 19 | - You need a trailing "/" to your path when doing directory 20 | based access to the yapp. 21 | 22 | 23 | TODO 24 | 25 | - subscribe on mnesia events so that the yapp registry can be 26 | updated and used in a cluster of yaws nodes. 27 | 28 | - Support to create .boot and relup scripts so that Yapps can be 29 | added/upgraded/downgraded/removed on a running Yaws server. 30 | 31 | - Cluster support for the point above. 32 | 33 | -------------------------------------------------------------------------------- /applications/yapp/ebin/Makefile.am: -------------------------------------------------------------------------------- 1 | beamdir = $(ERLANG_INSTALL_LIB_DIR_yapp)/ebin 2 | 3 | APP_FILES = yapp.app yapp.appup 4 | BEAM_FILES = *.beam 5 | 6 | beam_DATA = $(APP_FILES) $(BEAM_FILES) 7 | 8 | 9 | clean-local: 10 | $(AM_V_at)rm -f $(APP_FILES) $(BEAM_FILES) 11 | 12 | # Local Variables: 13 | # tab-width: 8 14 | # End: 15 | -------------------------------------------------------------------------------- /applications/yapp/examples/README: -------------------------------------------------------------------------------- 1 | 2 | Modify yaws.conf as: 3 | %% add path to yapp and yapp example - modify to your own installation directory 4 | ebin_dir = $(prefix)/lib/yapp/ebin 5 | ebin_dir = $(prefix)/lib/yapp/examples/yapp_ex_1/ebin 6 | 7 | %% add yapp runmod 8 | runmod = yapp 9 | 10 | %% add to first 11 | arg_rewrite_mod = yapp 12 | 13 | yapp_server_id = external 14 | 15 | 16 | %% add to second , that is to 17 | %% note you will only be able to access the yapp admin interface from http://localhost[:port]/yapp/ 18 | arg_rewrite_mod = yapp 19 | 20 | yapp_server_id = internal 21 | bootstrap_yapps = yapp 22 | 23 | 24 | -------------------------------------------------------------------------------- /applications/yapp/examples/yapp_ex_1/ebin/yapp_ex_1.app: -------------------------------------------------------------------------------- 1 | {application, yapp_ex_1, 2 | [{description,"Simple yaws application"}, 3 | {vsn,"1.0.0"}, 4 | {modules,[]}, 5 | {registered, []}, 6 | {applications,[kernel, stdlib, yaws, yapp]}]}. 7 | -------------------------------------------------------------------------------- /applications/yapp/priv/docroot/END.inc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /applications/yapp/priv/docroot/HEAD.inc: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | Yapp 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 29 | 30 |
31 |

Yapp admin console

32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /applications/yapp/priv/docroot/index.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> {ssi, "HEAD.inc","%%",[{"list", "choosen"}]}. 4 | 5 | 6 |

Yapp list

7 | 8 | 9 | 10 | format_yapp_tables([]) -> []; 11 | format_yapp_tables([{ServId,Yapps}|T]) -> 12 | [{h3,[], ["Server id : ", ServId]}, [{p,[],format_yapp_table(Yapps)}] | 13 | format_yapp_tables(T)]. 14 | 15 | format_yapp_table(Yapps) -> 16 | {table,[{border,"1"}], 17 | [{tr,[],[{th,[],"Application"},{th,[],"Url"},{th,[],"Docroot"}]} | 18 | format_yapps(Yapps)] 19 | }. 20 | 21 | format_yapps([]) -> 22 | []; 23 | format_yapps([{yapp, Urlpath, Docroot, Appname, Appmods, _Opaque}|T]) -> 24 | [{tr,[],[{td,[],atom_to_list(Appname)}, {td,[], Urlpath},{td,[],Docroot}]} | 25 | format_yapps(T)]. 26 | 27 | out(A) -> 28 | Header = "Cache-Control:no-store", 29 | [{header, Header}, 30 | {ehtml, format_yapp_tables(yapp:get_yapps())}]. 31 | 32 | 33 | 34 | 35 | out(A) -> {ssi,"END.inc",[],[]}. 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /applications/yapp/src/yapp.app.src: -------------------------------------------------------------------------------- 1 | {application, yapp, 2 | [{description,"Yaws applications handler"}, 3 | {vsn, {cmd, "sed -ne '1,/^YAPP_VSN=/s/^YAPP_VSN=//p' vsn.mk 2>/dev/null"}}, 4 | {modules,[]}, 5 | {registered, [yapp_handler]}, 6 | {mod,{yapp_app,[]}}, 7 | {env, [{yapp_registry_impl, yapp_mnesia_server}]}, 8 | {applications,[kernel, stdlib, yaws]}]}. 9 | -------------------------------------------------------------------------------- /applications/yapp/src/yapp.appup.src: -------------------------------------------------------------------------------- 1 | {"%VSN%", 2 | [ 3 | ], 4 | [ 5 | ]}. 6 | -------------------------------------------------------------------------------- /applications/yapp/vsn.mk: -------------------------------------------------------------------------------- 1 | YAPP_VSN=0.4.2 2 | -------------------------------------------------------------------------------- /c_src/Makefile.am: -------------------------------------------------------------------------------- 1 | bindir = $(ERLANG_INSTALL_LIB_DIR_yaws)/priv 2 | libdir = $(ERLANG_INSTALL_LIB_DIR_yaws)/priv/lib 3 | 4 | if WITH_EPAM 5 | bin_PROGRAMS = epam 6 | epam_CFLAGS = $(EPAM_CFLAGS) $(EXTRAINCLUDE) -I$(ERLANG_ERTS_DIR)/include 7 | epam_LDFLAGS = 8 | epam_LDADD = 9 | epam_SOURCES = epam.c 10 | endif 11 | 12 | lib_LTLIBRARIES = setuid_drv.la 13 | 14 | setuid_drv_la_CFLAGS = $(EXTRAINCLUDE) -I$(ERLANG_ERTS_DIR)/include 15 | setuid_drv_la_LDFLAGS = -module -avoid-version 16 | setuid_drv_la_SOURCES = setuid_drv.c 17 | 18 | all-local: post-build 19 | 20 | clean-local: 21 | $(AM_V_at)rm -f @top_builddir@/priv/epam 22 | $(AM_V_at)rm -fr @top_builddir@/priv/lib 23 | 24 | post-build: $(bin_PROGRAMS) $(lib_LTLIBRARIES) 25 | $(AM_V_at)$(INSTALL) -d @top_builddir@/priv/lib 26 | if WITH_EPAM 27 | $(AM_V_at)$(INSTALL) -m 644 epam @top_builddir@/priv 28 | endif 29 | $(AM_V_at)$(INSTALL) -m 644 .libs/setuid_drv.so @top_builddir@/priv/lib 30 | 31 | # Local Variables: 32 | # tab-width: 8 33 | # End: 34 | -------------------------------------------------------------------------------- /contrib/benchmarks/README: -------------------------------------------------------------------------------- 1 | Benchmarks for yaws_server as discussed in the 'Benchmarking' section of the OTP 'Efficiency Guide' 2 | 3 | In an erl shell run from the benchmarks folder: 4 | -------------------------- 5 | 1> c(bench). 6 | {ok,bench} 7 | 2> bench:run(). 8 | Compiling conc_path_bm.erl... 9 | Compiling bench.erl... 10 | Compiling all.erl... 11 | Running conc_path_bm: conc_path_orig conc_path_tail conc_path_lappend conc_path_lflatten conc_path_lconcat 12 | ok 13 | -------------------------- 14 | This should generate an index.html file in this folder showing the relative performance. 15 | 16 | 17 | See conc_path_bm.erl for a trivial example that may be useful as a base. 18 | 19 | 20 | -------------------------------------------------------------------------------- /doc/overview.edoc: -------------------------------------------------------------------------------- 1 | @title Yaws -An Erlang Web Server 2 | @doc 3 |

4 | This is a very rough import of Yaws into Erlware. 5 | In particular -disable-pam was used to create 6 | the configure script. It is uncertain what the effects 7 | of this are. Also some modules was not included in the 8 | yaws.app file and may therefore not be compiled. 9 |

10 |

11 | They were: ymnesia, yaws_showarg, yaws_vdir, yaws_content_negotiation 12 | It is unclear if they were intentionally left out or not. 13 |

14 |

15 | Finally some files, that normally is generated at build time 16 | was included already generated. 17 | They were: mime_types.erl, yaws_generated.erl. 18 |

19 | 20 | @author Torbjorn Tornkvist 21 | @copyright 2008 Torbjorn Tornkvist 22 | -------------------------------------------------------------------------------- /ebin_src/Makefile.am: -------------------------------------------------------------------------------- 1 | beamdir = $(ERLANG_INSTALL_LIB_DIR_yaws)/ebin 2 | EBIN_DIR=@top_builddir@/ebin 3 | 4 | APP_FILES = $(EBIN_DIR)/yaws.app $(EBIN_DIR)/yaws.appup 5 | BEAM_FILES = $(EBIN_DIR)/*.beam 6 | 7 | beam_DATA = $(APP_FILES) $(BEAM_FILES) 8 | 9 | 10 | clean-local: 11 | $(AM_V_at)rm -f $(APP_FILES) $(BEAM_FILES) 12 | 13 | # Local Variables: 14 | # tab-width: 8 15 | # End: 16 | -------------------------------------------------------------------------------- /erlang_deps.mk: -------------------------------------------------------------------------------- 1 | incdep = include $(DEPDIR)/$(1) 2 | $(foreach module,$(MODULES), $(shell $(MKDIR_P) $(shell dirname $(DEPDIR)/$(module)))) 3 | $(foreach module,$(MODULES), $(shell touch $(DEPDIR)/$(module:%.erl=%.Pbeam))) 4 | $(foreach module,$(MODULES), $(eval $(call incdep,$(module:%.erl=%.Pbeam)))) 5 | 6 | 7 | # Local Variables: 8 | # tab-width: 8 9 | # End: 10 | -------------------------------------------------------------------------------- /examples/ebin/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/examples/ebin/.empty -------------------------------------------------------------------------------- /examples/ebin/Makefile.am: -------------------------------------------------------------------------------- 1 | beamdir = $(ERLANG_INSTALL_LIB_DIR_yaws)/examples/ebin 2 | 3 | BEAM_FILES = *.beam 4 | 5 | beam_DATA = $(BEAM_FILES) 6 | 7 | 8 | clean-local: 9 | $(AM_V_at)rm -f $(BEAM_FILES) 10 | 11 | # Local Variables: 12 | # tab-width: 8 13 | # End: 14 | -------------------------------------------------------------------------------- /examples/include/Makefile.am: -------------------------------------------------------------------------------- 1 | incdir = $(ERLANG_INSTALL_LIB_DIR_yaws)/examples/include 2 | 3 | dist_inc_DATA = 4 | 5 | # Add custom install target because there is no header to install 6 | install-data-local: 7 | $(AM_V_at)$(INSTALL) -d $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_yaws)/examples/include 8 | # Local Variables: 9 | # tab-width: 8 10 | # End: 11 | -------------------------------------------------------------------------------- /examples/src/Makefile.am: -------------------------------------------------------------------------------- 1 | include @top_srcdir@/include.mk 2 | 3 | MODULES = advanced_echo_callback.erl \ 4 | authmod_gssapi.erl \ 5 | basic_echo_callback.erl \ 6 | basic_echo_callback_extended.erl \ 7 | server_sent_events.erl 8 | 9 | EXTRA_DIST = $(MODULES) 10 | 11 | EBIN_DIR=@builddir@/../ebin 12 | EBIN_FILES=$(MODULES:%.erl=$(EBIN_DIR)/%.beam) 13 | 14 | ERLC_FLAGS = $(ERLC_GENERIC_FLAGS) 15 | 16 | include @top_srcdir@/erlang_deps.mk 17 | 18 | all-local: $(EBIN_FILES) 19 | 20 | $(EBIN_DIR)/%.beam: %.erl 21 | $(AM_V_at)$(ERLC) $(ERLC_FLAGS) -M $(PHONY_DEPS) -MF $(@:$(EBIN_DIR)/%.beam=$(DEPDIR)/%.Pbeam) -MT $@ $< 22 | $(AM_V_ERLC)$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $< 23 | 24 | 25 | distclean-local: 26 | $(AM_V_at)rm -fr $(DEPDIR) 27 | 28 | # Local Variables: 29 | # tab-width: 8 30 | # End: 31 | -------------------------------------------------------------------------------- /include.mk.in: -------------------------------------------------------------------------------- 1 | AM_V_ERLC = $(am__v_ERLC_$(V)) 2 | am__v_ERLC_ = $(am__v_ERLC_$(AM_DEFAULT_VERBOSITY)) 3 | am__v_ERLC_0 = @echo " ERLC " $@; 4 | am__v_ERLC_1 = 5 | 6 | WARNINGS_AS_ERRORS = -Werror 7 | 8 | DEBUGINFO_OR_DETERMINISTIC = @DEBUGINFO_OR_DETERMINISTIC@ 9 | DETERMINISTIC_MACRO = @DETERMINISTIC_MACRO@ 10 | PHONY_DEPS = @PHONY_DEPS@ 11 | SOURCE_DATE_EPOCH ?= @SOURCE_DATE_EPOCH@ 12 | 13 | ERLC_GENERIC_BASE_FLAGS = $(WARNINGS_AS_ERRORS) $(DEBUG_ERLC_FLAGS) \ 14 | $(DETERMINISTIC_MACRO) \ 15 | -pa $(top_srcdir) -pa $(top_builddir) \ 16 | -pa $(top_builddir)/ebin \ 17 | -I $(top_srcdir)/include -I $(srcdir)/../include \ 18 | -I $(top_builddir)/include -I $(builddir)/../include 19 | ERLC_GENERIC_FLAGS = $(ERLC_GENERIC_BASE_FLAGS) $(DEBUGINFO_OR_DETERMINISTIC) 20 | ERLC_GENERIC_TEST_FLAGS = $(ERLC_GENERIC_BASE_FLAGS) 21 | 22 | # Local Variables: 23 | # tab-width: 8 24 | # End: 25 | -------------------------------------------------------------------------------- /include/Makefile.am: -------------------------------------------------------------------------------- 1 | incdir = $(ERLANG_INSTALL_LIB_DIR_yaws)/include 2 | 3 | dist_inc_DATA = yaws_api.hrl \ 4 | yaws_dav.hrl \ 5 | yaws.hrl \ 6 | yaws_lock.hrl \ 7 | yaws_soap.hrl \ 8 | soap.hrl \ 9 | wsdl11soap12.hrl \ 10 | soap-envelope.hrl 11 | 12 | # Local Variables: 13 | # tab-width: 8 14 | # End: 15 | -------------------------------------------------------------------------------- /include/soap-envelope.hrl: -------------------------------------------------------------------------------- 1 | %% HRL file generated by ERLSOM 2 | %% 3 | %% It is possible to change the name of the record fields. 4 | %% 5 | %% It is possible to add default values, but be aware that these will 6 | %% only be used when *writing* an xml document. 7 | 8 | -record('soap:UpgradeType', {anyAttribs, 'SupportedEnvelope'}). 9 | -record('soap:SupportedEnvType', {anyAttribs, 'qname'}). 10 | -record('soap:NotUnderstoodType', {anyAttribs, 'qname'}). 11 | -record('soap:detail', {anyAttribs, choice}). 12 | -record('soap:subcode', {anyAttribs, 'Value', 'Subcode'}). 13 | -record('soap:faultcode', {anyAttribs, 'Value', 'Subcode'}). 14 | -record('soap:reasontext', {anyAttribs, 'P:lang', '#text'}). 15 | -record('soap:faultreason', {anyAttribs, 'Text'}). 16 | -record('soap:Fault', {anyAttribs, 'Code', 'Reason', 'Node', 'Role', 'Detail'}). 17 | -record('soap:Body', {anyAttribs, choice}). 18 | -record('soap:Header', {anyAttribs, choice}). 19 | -record('soap:Envelope', {anyAttribs, 'Header', 'Body'}). 20 | -------------------------------------------------------------------------------- /include/yaws_dav.hrl: -------------------------------------------------------------------------------- 1 | -ifndef(_YAWS_DAV). 2 | -define(_YAWS_DAV, true). 3 | 4 | -record(resource,{ 5 | name, % normalized name of resource 6 | info % file_info record of mapped file 7 | }). 8 | -record(upload, { 9 | fd, 10 | tempname, 11 | filename 12 | }). 13 | 14 | -endif. 15 | -------------------------------------------------------------------------------- /include/yaws_lock.hrl: -------------------------------------------------------------------------------- 1 | -ifndef(_YAWS_LOCK). 2 | -define(_YAWS_LOCK, true). 3 | 4 | -define(LOCK_LIFETIME, 900). % lock lifetime in seconds: 15 minutes 5 | -define(CLEANUP_INTERVAL, 60). % cleanup interval in seconds: 1 minute 6 | 7 | -record(lock,{ 8 | path=undefined, % resource path 9 | id=undefined, % uid 10 | owner=anonymous, % lock owner if submitted 11 | depth=infinity, % 0|infinity 12 | scope=exclusive, % exclusive|shared 13 | type=write, % write 14 | timeout=0, % ?LOCK_LIFETIME or shorter 15 | timestamp=0 % erlang:now() 16 | }). 17 | 18 | -endif. 19 | -------------------------------------------------------------------------------- /include/yaws_soap.hrl: -------------------------------------------------------------------------------- 1 | -record(wsdl, {operations, model, module}). 2 | -record(port, {service, port, binding, address}). 3 | -record(operation, {service, port, operation, binding, address, action}). 4 | -------------------------------------------------------------------------------- /munin/README.munin: -------------------------------------------------------------------------------- 1 | Usage: 2 | 3 | 1. Copy the scripts to /usr/share/munin/plugins 4 | 5 | 2. To graph statistics for the server "SERVER": 6 | 7 | # ln -s /usr/share/munin/plugins/yaws_hits_ /etc/munin/plugins/yaws_hits_SERVER 8 | # ln -s /usr/share/munin/plugins/yaws_sent_ /etc/munin/plugins/yaws_sent_SERVER 9 | 10 | 3. Change /etc/munin/plugin-conf.d/munin-node and add: 11 | 12 | [yaws*] 13 | user root 14 | 15 | 4. Restart munin-node 16 | -------------------------------------------------------------------------------- /priv/Makefile.am: -------------------------------------------------------------------------------- 1 | privdir = $(ERLANG_INSTALL_LIB_DIR_yaws)/priv 2 | 3 | dist_priv_DATA = mime.types $(wildcard @srcdir@/*.xsd) 4 | 5 | # Local Variables: 6 | # tab-width: 8 7 | # End: 8 | -------------------------------------------------------------------------------- /rebar.lock: -------------------------------------------------------------------------------- 1 | []. 2 | -------------------------------------------------------------------------------- /rebar2-templates/yawsnode.install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | wd=$PWD 4 | for file in releases/*/sys.config etc/yaws/yaws.conf; do 5 | mv $file ${file}.bak 6 | sed -e "s:%YAWSNODE%:$wd:" ${file}.bak > $file 7 | rm ${file}.bak 8 | done 9 | exit 0 10 | -------------------------------------------------------------------------------- /rebar2-templates/yawsnode.rebar.config: -------------------------------------------------------------------------------- 1 | %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- 2 | %% ex: ft=erlang ts=4 sw=4 et 3 | {sub_dirs, ["apps/{{appid}}", "rel"]}. 4 | {lib_dirs, ["apps"]}. 5 | {deps, 6 | [{yaws, ".*", {git, "git://github.com/klacke/yaws.git", {tag, "yaws-1.99"}}}] 7 | }. 8 | -------------------------------------------------------------------------------- /rebar2-templates/yawsnode.sys.config: -------------------------------------------------------------------------------- 1 | [ 2 | %% SASL config 3 | {sasl, [ 4 | {sasl_error_logger, {file, "log/sasl-error.log"}}, 5 | {errlog_type, error}, 6 | {error_logger_mf_dir, "log/sasl"}, % Log directory 7 | {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size 8 | {error_logger_mf_maxfiles, 5} % 5 files max 9 | ]}, 10 | 11 | {yaws, [ 12 | {conf, "%YAWSNODE%/etc/yaws/yaws.conf"} 13 | ]} 14 | ]. 15 | 16 | -------------------------------------------------------------------------------- /rebar2-templates/yawsnode.template: -------------------------------------------------------------------------------- 1 | %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- 2 | %% ex: ft=erlang ts=4 sw=4 et 3 | {variables, 4 | [ 5 | {nodeid, "yawsnode"}, 6 | {appid, "yawsapp"} 7 | ]}. 8 | {dir, "apps"}. 9 | {dir, "apps/{{appid}}"}. 10 | {dir, "rel"}. 11 | {dir, "rel/files"}. 12 | {template, "yawsnode.rebar.config", "rebar.config"}. 13 | {template, "yawsnode.install.sh", "rel/files/install.sh"}. 14 | {chmod, 8#744, "rel/files/install.sh"}. 15 | {template, "yawsnode.reltool.config", "rel/reltool.config"}. 16 | {file, "yawsnode.erl.script", "rel/files/erl"}. 17 | {chmod, 8#744, "rel/files/erl"}. 18 | {file, "yawsnode.nodetool", "rel/files/nodetool"}. 19 | {chmod, 8#744, "rel/files/nodetool"}. 20 | {file, "yawsnode.runner", "rel/files/{{nodeid}}"}. 21 | {chmod, 8#744, "rel/files/{{nodeid}}"}. 22 | {file, "yawsnode.sys.config", "rel/files/sys.config"}. 23 | {template, "yawsnode.vm.args", "rel/files/vm.args"}. 24 | {template, "yawsnode.yaws.conf", "rel/files/yaws.conf"}. 25 | 26 | 27 | -------------------------------------------------------------------------------- /rebar2-templates/yawsnode.vm.args: -------------------------------------------------------------------------------- 1 | ## Name of the node 2 | -name {{nodeid}}@127.0.0.1 3 | 4 | ## Cookie for distributed erlang 5 | -setcookie {{nodeid}} 6 | 7 | ## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive 8 | ## (Disabled by default..use with caution!) 9 | ##-heart 10 | 11 | ## Enable kernel poll and a few async threads 12 | +K true 13 | ##+A 5 14 | 15 | ## Increase number of concurrent ports/sockets 16 | ##-env ERL_MAX_PORTS 4096 17 | 18 | ## Tweak GC to run more often 19 | ##-env ERL_FULLSWEEP_AFTER 10 20 | -------------------------------------------------------------------------------- /rel.obsolete/files/sys.config: -------------------------------------------------------------------------------- 1 | [ 2 | %% SASL config 3 | {sasl, [ 4 | {sasl_error_logger, {file, "log/sasl-error.log"}}, 5 | {errlog_type, error}, 6 | {error_logger_mf_dir, "log/sasl"}, % Log directory 7 | {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size 8 | {error_logger_mf_maxfiles, 5} % 5 files max 9 | ]} 10 | ]. 11 | 12 | -------------------------------------------------------------------------------- /rel.obsolete/files/vm.args: -------------------------------------------------------------------------------- 1 | ## Name of the node 2 | -name yaws@127.0.0.1 3 | 4 | ## Cookie for distributed erlang 5 | -setcookie yaws 6 | 7 | ## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive 8 | ## (Disabled by default..use with caution!) 9 | ##-heart 10 | 11 | ## Enable kernel poll and a few async threads 12 | +K true 13 | +A 5 14 | 15 | ## Increase number of concurrent ports/sockets 16 | -env ERL_MAX_PORTS 4096 17 | 18 | ## Tweak GC to run more often 19 | ## -env ERL_FULLSWEEP_AFTER 10 20 | -------------------------------------------------------------------------------- /scripts/Subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | p=$1 5 | 6 | if [ `uname -a | grep -F -c Cygwin` != 0 ]; then 7 | d=`cygpath -m "$2"` 8 | else 9 | d=$2 10 | fi 11 | 12 | sed -e "s;$p;$d;g" 13 | 14 | -------------------------------------------------------------------------------- /scripts/darwin/README: -------------------------------------------------------------------------------- 1 | Yaws startup on MacOS X / Darwin 2 | 3 | Doing `make install' as root will create a `Yaws' StartupItem in 4 | /Library/StartupItems. 5 | 6 | By default, yaws startup is disabled. To enable it, edit (as root) 7 | /etc/hostconfig and add the line 8 | 9 | YAWS=-YES- 10 | 11 | Yaws startup can be disabled by changing the line to 12 | 13 | YAWS=-NO- 14 | 15 | Yaws will start automatically on reboot. You can manually test the 16 | startup without rebooting by issuing the command (as root) in a 17 | terminal window 18 | 19 | $ SystemStarter start Yaws 20 | 21 | 22 | Stop the server by issuing: 23 | 24 | $ SystemStarter stop Yaws 25 | 26 | Reload the server with the command 27 | 28 | $ SystemStarter restart Yaws 29 | 30 | -------------------------------------------------------------------------------- /scripts/darwin/Yaws.plist: -------------------------------------------------------------------------------- 1 | { 2 | Description = "Yaws web server"; 3 | Provides = ("Yaws"); 4 | Requires = ("DirectoryServices"); 5 | Uses = ("Disks", "NFS", "Network Time"); 6 | OrderPreference = "None"; 7 | } 8 | -------------------------------------------------------------------------------- /scripts/gen-yaws: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Used by scripts/Makefile and scripts/rebar-pre-script to generate 4 | # the yaws execution script 5 | 6 | set -e 7 | 8 | cat yaws.template | \ 9 | ./Subst %yawsdir% "${YAWSDIR}" | \ 10 | ./Subst %vardir% "${VARDIR}" | \ 11 | ./Subst %run_erl% "${ERLBINDIR}/run_erl" | \ 12 | ./Subst %to_erl% "${ERLBINDIR}/to_erl" | \ 13 | ./Subst %erl% "${ERL}" | \ 14 | ./Subst %werl% "${WERL}" 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /scripts/gen-yaws-conf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Used by scripts/Makefile and scripts/rebar-pre-script to create 4 | # the yaws.conf file 5 | 6 | set -e 7 | 8 | if [ ! -n "$PORT" ]; then 9 | echo 'error: PORT environment variable must be set' >&2 10 | exit 1 11 | fi 12 | if [ ! -n "$SSLPORT" ]; then 13 | echo 'error: SSLPORT environment variable must be set' >&2 14 | exit 1 15 | fi 16 | 17 | cat yaws.conf.template | \ 18 | ./Subst %yawsdir% "$YAWSDIR" | \ 19 | ./Subst %logdir% "$LOGDIR" | \ 20 | ./Subst %vardir% "$VARDIR" | \ 21 | ./Subst %port% $PORT | \ 22 | ./Subst %docroot% "$DOCROOT" | \ 23 | ./Subst %tmpdir% "${TMPDIR:-/tmp}" | \ 24 | ./Subst %certdir% "$CERTDIR" | \ 25 | ./Subst %sslport% $SSLPORT 26 | 27 | exit 0 28 | -------------------------------------------------------------------------------- /scripts/gen-yaws-generated.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Used by src/Makefile and scripts/rebar-pre-script to create the 4 | # yaws_generated.erl file 5 | 6 | set -e 7 | 8 | if [ x"@YAWS_DETERMINISTIC_BUILD@" = x ]; then 9 | subst_vardir="${VARDIR}" 10 | subst_etcdir="${ETCDIR}" 11 | else 12 | subst_vardir=undefined 13 | subst_etcdir=undefined 14 | fi 15 | cat yaws_generated.template | \ 16 | ../scripts/Subst %VSN% "${YAWS_VSN}" | \ 17 | ../scripts/Subst %VARDIR% "${subst_vardir}" | \ 18 | ../scripts/Subst %ETCDIR% "${subst_etcdir}" 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /scripts/gentoo/yaws-2.0.2.ebuild: -------------------------------------------------------------------------------- 1 | # $Header: $ 2 | 3 | EAPI="2" 4 | 5 | inherit eutils 6 | 7 | DESCRIPTION="Yaws is a high performance HTTP 1.1 web server." 8 | HOMEPAGE="http://yaws.hyber.org/" 9 | SRC_URI="http://yaws.hyber.org/download/${P}.tar.gz" 10 | LICENSE="BSD" 11 | SLOT="0" 12 | KEYWORDS="x86 amd64" 13 | IUSE="" 14 | 15 | DEPEND="dev-lang/erlang" 16 | 17 | src_install() { 18 | make DESTDIR=${D} install || edie 19 | keepdir /var/log/yaws 20 | rmdir ${D}var/lib/log/yaws 21 | rmdir ${D}var/lib/log 22 | # We need to keep these directories so that the example yaws.conf works 23 | # properly 24 | keepdir /usr/lib/yaws/examples/ebin 25 | keepdir /usr/lib/yaws/examples/include 26 | dodoc ChangeLog LICENSE README 27 | } 28 | 29 | pkg_postinst() { 30 | einfo "An example YAWS configuration has been setup to run on" 31 | einfo "Please edit /etc/yaws/yaws.conf to suit your needs." 32 | } 33 | -------------------------------------------------------------------------------- /scripts/make-release.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SRCDIR=@abs_top_srcdir@ 4 | BUILDDIR=@abs_top_builddir@ 5 | YAWS_VSN=@YAWS_VSN@ 6 | INSTALL_BUILDER=${INSTALL_BUILDER:-@INSTALL_BUILDER@} 7 | 8 | 9 | echo packing release ${YAWS_VSN} 10 | 11 | TAG="yaws-${YAWS_VSN}" 12 | NAME_VERSION="yaws-${YAWS_VSN}" 13 | 14 | # Add/update release tag 15 | (cd ${SRCDIR} && git tag -f -a -m "version ${YAWS_VSN}" "$TAG") 16 | 17 | # Create windows installer 18 | #(cd ${BUILDDIR} && make mkinstaller INSTALL_BUILDER=${INSTALL_BUILDER} >/dev/null) 19 | 20 | # Create distribution tarball 21 | (cd ${BUILDDIR} && make dist > /dev/null) 22 | 23 | echo release resides in ${BUILDDIR}/$NAME_VERSION.tar.gz 24 | #echo release resides in ${BUILDDIR}/Yaws-${YAWS_VSN}-windows-installer.exe 25 | 26 | echo "To push this do:" 27 | #echo "git push origin revs/tags/yaws-${version}:revs/tags/yaws-${version}" 28 | echo "git push --tags" 29 | 30 | exit 0 31 | -------------------------------------------------------------------------------- /scripts/make-upload: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This is make it a wee bit more convenient for 4 | # me to publish the tar balls 5 | # set -x 6 | 7 | if [ $# != 1 ]; then 8 | echo 'usage: make-upload ' 9 | exit 1 10 | fi 11 | 12 | 13 | echo "cd incoming " > /tmp/cmds.$$ 14 | echo "put $1 " >> /tmp/cmds.$$ 15 | ncftp -u anonymous -p klacke@hyber.org upload.sourceforge.net < /tmp/cmds.$$ 16 | rm /tmp/cmds.$$ 17 | 18 | 19 | 20 | echo "Now login at sourceforge at go the page" 21 | echo "http://sourceforge.net/project/admin/editpackages.php?group_id=45637" 22 | echo "and create the new package ... " 23 | 24 | -------------------------------------------------------------------------------- /scripts/openbsd/yaws.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | daemon="${TRUEPREFIX}/bin/yaws --daemon" 4 | daemon_flags="--conf ${SYSCONFDIR}/yaws/yaws.conf" 5 | 6 | . /etc/rc.d/rc.subr 7 | 8 | pexp="${LOCALBASE}/lib/erlang/erts.*${TRUEPREFIX}/lib/yaws/ebin -run yaws" 9 | 10 | rc_reload() { 11 | ${rcexec} "${daemon} --hup" 12 | } 13 | 14 | rc_stop() { 15 | ${rcexec} "${daemon} --stop" 16 | } 17 | 18 | rc_cmd $1 19 | -------------------------------------------------------------------------------- /scripts/systemd/yaws.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=High performance HTTP 1.1 webserver written in Erlang 3 | After=network.target remote-fs.target 4 | 5 | [Service] 6 | Type=forking 7 | GuessMainPID=no 8 | 9 | Environment="YAWS_CONF=--conf %etcdir%/yaws/yaws.conf" 10 | #Environment="YAWS_ID=--id myserverid" 11 | 12 | ExecStart=%bindir%/yaws --daemon --heart $YAWS_CONF $YAWS_ID 13 | ExecStartPost=%bindir%/yaws $YAWS_ID --wait-started=10 14 | 15 | ExecReload=%bindir%/yaws $YAWS_ID --hup 16 | 17 | ExecStop=%bindir%/yaws $YAWS_ID --stop 18 | ExecStopPost=%bindir%/yaws $YAWS_ID --wait-stopped=10 19 | 20 | Restart=on-failure 21 | RestartSec=5 22 | 23 | [Install] 24 | WantedBy=multi-user.target 25 | -------------------------------------------------------------------------------- /src/yaws.appup.src: -------------------------------------------------------------------------------- 1 | {"%VSN%", 2 | [ 3 | ], 4 | [ 5 | ]}. 6 | -------------------------------------------------------------------------------- /src/yaws.conf: -------------------------------------------------------------------------------- 1 | 2 | # conf for yaws 3 | 4 | # first we have a set of globals 5 | 6 | # logdir = . 7 | # ebin_dir = . 8 | # include_dir = . 9 | # keep_alive_timeout = 15000 10 | 11 | #end then a set of servers 12 | 13 | 14 | port = 8000 15 | listen = 192.168.128.24 16 | docroot = /home/klacke/yaws/www 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/yaws_app.erl: -------------------------------------------------------------------------------- 1 | %%%---------------------------------------------------------------------- 2 | %%% File : yaws_app.erl 3 | %%% Author : Claes Wikstrom 4 | %%% Purpose : 5 | %%% Created : 16 Jan 2002 by Claes Wikstrom 6 | %%%---------------------------------------------------------------------- 7 | 8 | -module(yaws_app). 9 | -author('klacke@hyber.org'). 10 | 11 | 12 | -behaviour(application). 13 | -export([start/2,stop/1]). 14 | 15 | %% start 16 | 17 | start(_Type, _StartArgs) -> 18 | yaws_sup:start_link(). 19 | 20 | %% stop 21 | 22 | stop(_State) -> 23 | ok. 24 | -------------------------------------------------------------------------------- /src/yaws_appdeps.hrl.in: -------------------------------------------------------------------------------- 1 | -define(YAWS_APPDEPS, "@APPDEPS@"). 2 | -------------------------------------------------------------------------------- /src/yaws_appmod_cgi.erl: -------------------------------------------------------------------------------- 1 | %%% File : yaws_appmod_cgi.erl 2 | %%% Author : Claes Wikstrom 3 | %%% Description : 4 | %%% Created : 10 Mar 2008 by Claes Wikstrom 5 | 6 | -module(yaws_appmod_cgi). 7 | -export([out/1]). 8 | -include("../include/yaws_api.hrl"). 9 | 10 | out(Arg) -> 11 | yaws_cgi:call_cgi(Arg, lists:flatten(Arg#arg.fullpath)). 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/yaws_appmod_fcgi.erl: -------------------------------------------------------------------------------- 1 | %%% File : yaws_appmod_fcgi.erl 2 | %%% Author : Bruno Rijsman 3 | %%% Description : Application module for FastCGI virtual paths. 4 | %%% Created : 9 Jul 2009 5 | 6 | -module(yaws_appmod_fcgi). 7 | -export([out/1]). 8 | -include("../include/yaws_api.hrl"). 9 | 10 | out(Arg) -> 11 | yaws_cgi:call_fcgi_responder(Arg). 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/yaws_charset.hrl.in: -------------------------------------------------------------------------------- 1 | -define(YAWS_CHARSET, @DEFAULT_CHARSET@). 2 | -------------------------------------------------------------------------------- /src/yaws_generated.template: -------------------------------------------------------------------------------- 1 | %%%---------------------------------------------------------------------- 2 | %%% File : yaws_generated.template 3 | %%% Author : Klacke 4 | %%% Purpose : 5 | %%% Created : 10 Jun 2002 by Klacke 6 | %%%---------------------------------------------------------------------- 7 | 8 | %% generated code from some environment variables 9 | 10 | -module(yaws_generated). 11 | -author('klacke@bluetail.com'). 12 | 13 | -export([version/0, 14 | vardir/0, 15 | etcdir/0]). 16 | 17 | version() -> "%VSN%". 18 | 19 | vardir() -> 20 | case "%VARDIR%" of 21 | "undefined" -> undefined; 22 | VarDir -> VarDir 23 | end. 24 | 25 | etcdir() -> 26 | case "%ETCDIR%" of 27 | "undefined" -> undefined; 28 | EtcDir -> EtcDir 29 | end. 30 | -------------------------------------------------------------------------------- /src/yaws_ticker.erl: -------------------------------------------------------------------------------- 1 | -module(yaws_ticker). 2 | -author('klacke@bluetail.com'). 3 | 4 | -export([ticker/3]). 5 | 6 | %% Moved here from module yaws to ease purging of yaws. 7 | %% cschultz 8 | 9 | ticker(Time, To, Msg) -> 10 | receive 11 | {'EXIT', _, _} -> 12 | exit(normal) 13 | after Time -> 14 | To ! Msg 15 | end, 16 | ?MODULE:ticker(Time, To, Msg). 17 | -------------------------------------------------------------------------------- /src/yaws_ws_sup.erl: -------------------------------------------------------------------------------- 1 | %%%---------------------------------------------------------------------- 2 | %%% File : yaws_ws_sup.erl 3 | %%% Author : Steve Vinoski 4 | %%% Purpose : Supervise websocket callback processes 5 | %%% Created : 22 Dec 2016 by Steve Vinoski 6 | %%%---------------------------------------------------------------------- 7 | 8 | -module(yaws_ws_sup). 9 | -author('vinoski@ieee.org'). 10 | -behaviour(supervisor). 11 | 12 | -export([start_link/0, init/1]). 13 | 14 | start_link() -> 15 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 16 | 17 | init([]) -> 18 | {ok, {{simple_one_for_one, 0, 1}, 19 | [{yaws_websockets, 20 | {yaws_websockets, start_link, []}, 21 | temporary, 2000, worker, [yaws_websockets]}]}}. 22 | -------------------------------------------------------------------------------- /ssl/dhparams.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBCAKCAQEArTWf5IbXr+jWpZjCZCqaMN2H9v6oziEy1E6rU9eIIkWlCcKh556/ 3 | b8lYoZ/zuVR8aJ2o0m+o/tlOLfrgH7jkCYZEjFGLzs7W2PMv7b5liCYqRpSk2u/7 4 | LMxuOTfT3YppNnFmAXz3PtGD0kozoO9tUHRDCrxBM7Vr+Ets76sIoutXQyS7SZ87 5 | 8WUpd3jQ3a//AMPzQ5h5daceAlXzmDBYjzDhiy+zahGLXQ7EDRJrwL6PPjGYvPog 6 | sPXtjmJDf7P8o/AapU2zQQBOVVD3pZ/ZKQ3Iy0MXshq3QhyVDZuogJ84zHsFJyDc 7 | XwRAjdx+/+12NV3P3jpZj8wreOyoRaZy4wIBAg== 8 | -----END DH PARAMETERS----- 9 | -------------------------------------------------------------------------------- /ssl/mkcert/README: -------------------------------------------------------------------------------- 1 | 2 | Small script to generate a selfsigned cert. To make it a wildcard 3 | cert, just enter *.mydomain.com for the common name 4 | -------------------------------------------------------------------------------- /ssl/mkcert/mkcert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | umask 077 && touch host.key host.cert host.info host.pem 3 | openssl genrsa 2048 > host.key 4 | openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert 5 | openssl x509 -noout -fingerprint -text < host.cert > host.info 6 | cat host.cert host.key > host.pem 7 | -------------------------------------------------------------------------------- /ssl/mkcert_altname/README: -------------------------------------------------------------------------------- 1 | This is a small README describing how to 2 | generate selfsigned certs with multiple 3 | subjectAltName which is required if we want to 4 | virthost several ssl servers on the same ip. 5 | 6 | Edit he openssl.cfg here - especially the part 7 | where we define a set of subjectAltName 8 | 9 | [sslserver] 10 | subjectAltName = @aliases 11 | 12 | [aliases] 13 | DNS.1 = bla.com 14 | DNS.2 = super.bla.com 15 | 16 | 17 | 18 | 19 | 20 | Create a new CA using 21 | 22 | # /usr/lib/ssl/misc/CA.pl -newca 23 | 24 | Create a CSR 25 | 26 | # openssl req -new -config ./openssl.cnf -newkey rsa:2048 -nodes -keyout yaws.ppk -out yaws.csr 27 | 28 | Sign the csr 29 | 30 | # openssl ca -config ./openssl.cnf -extensions sslserver -in yaws.csr -out yaws-cert.pem 31 | -------------------------------------------------------------------------------- /ssl/mkdhparams/README: -------------------------------------------------------------------------------- 1 | Small script to generate a unique 2048-bit Diffie-Hellman group. 2 | -------------------------------------------------------------------------------- /ssl/mkdhparams/mkdhparams.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | openssl dhparam -out dhparams.pem 2048 3 | -------------------------------------------------------------------------------- /test/auth_SUITE_data/authmodtest.erl: -------------------------------------------------------------------------------- 1 | -module(authmodtest). 2 | -export([auth/2]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | 8 | auth(#arg{}=Arg, #auth{}) -> 9 | H = Arg#arg.headers, 10 | case H#headers.authorization of 11 | {"foo", "bar", _} -> 12 | true; 13 | _ -> 14 | false 15 | end. 16 | -------------------------------------------------------------------------------- /test/auth_SUITE_data/outmodtest.erl: -------------------------------------------------------------------------------- 1 | -module(outmodtest). 2 | -export([auth/2, out401/3]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | 8 | auth(#arg{}, #auth{}) -> 9 | {appmod, ?MODULE}. 10 | 11 | out401(#arg{}, #auth{}, Realm) -> 12 | [{status, 200}, {header, "X-Outmod-Test: true"}, 13 | {content, "text/plain", Realm}]. 14 | -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test10/.yaws_auth: -------------------------------------------------------------------------------- 1 | %% only check authorization for a.txt and b.txt 2 | {realm, "test10"}. 3 | {file, "a.txt"}. 4 | {file, "b.txt"}. 5 | {"foo", "bar"}. 6 | {"foo", "sha256", "szTXjROUAlPTDWcL0pxczKpZCGFPK0W5qa0EAkp8l5Q="}. %% sha256baz 7 | {"foo", "md5", "C5GxiXRrcq9Eih5W1CqNaA=="}. %% md5baz 8 | {"foo", "sha256", "WaKEFH0eG+l60yB2VpaIp+27flw6Hhm2NLrnV/mZopA=", "x0RbTgVEu0QiL/DRvtoXRYcU6hfX/Ir3LPkwVJLjwBw="}. %% sha256baz_with_salt 9 | -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test10/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test10/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test10/b.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test10/b.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test10/c.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test10/c.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test2/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test2/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test3/sub/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test3/sub/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test4/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test4/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test5/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test5/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test6/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test6/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test7/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test7/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test7/b.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test7/b.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test8/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test8/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test8/b.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test8/b.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www1/test9/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www1/test9/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www2/test1/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www2/test1/a.txt -------------------------------------------------------------------------------- /test/auth_SUITE_data/www2/test2/b.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/auth_SUITE_data/www2/test2/b.txt -------------------------------------------------------------------------------- /test/config_encoding_SUITE_data/templates/yaws_unicode.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | ebin_dir = $data_builddir$ 4 | 5 | trace = false 6 | copy_error_log = true 7 | log_wrap_size = 1000000 8 | log_resolve_hostname = false 9 | fail_on_bind_err = true 10 | pick_first_virthost_on_nomatch = true 11 | keepalive_timeout = 10000 12 | 13 | 14 | listen = 127.0.0.1 15 | port = $yaws_port1$ 16 | deflate = true 17 | auth_log = true 18 | docroot = "$data_srcdir$/ẅẅẅ" 19 | 20 | -------------------------------------------------------------------------------- /test/config_encoding_SUITE_data/ẅẅẅ/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/config_encoding_SUITE_data/ẅẅẅ/empty -------------------------------------------------------------------------------- /test/deflate_SUITE_data/bigtest.erl: -------------------------------------------------------------------------------- 1 | -module(bigtest). 2 | -export([out/1]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | out(_Arg) -> 8 | [{status, 200}, {page, "/3000.txt"}]. 9 | 10 | -------------------------------------------------------------------------------- /test/deflate_SUITE_data/binary_header.erl: -------------------------------------------------------------------------------- 1 | -module(binary_header). 2 | -export([out/1]). 3 | 4 | out(_Arg) -> 5 | %% Regression test for github issue 367, where returning a binary 6 | %% header with deflate on would cause a crash. 7 | %% https://github.com/erlyaws/yaws/issues/367 8 | [{status, 200}, 9 | {header, {content_type, <<"application/octet">>}}, 10 | {ehtml, {pre,[],<<"ABCDEFGHIJKLMNOPQRSTUVWXYZ\n">>}}]. 11 | -------------------------------------------------------------------------------- /test/deflate_SUITE_data/emptytest.erl: -------------------------------------------------------------------------------- 1 | -module(emptytest). 2 | -export([out/1]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | out(_Arg) -> 8 | {status, 200}. 9 | 10 | -------------------------------------------------------------------------------- /test/deflate_SUITE_data/smalltest.erl: -------------------------------------------------------------------------------- 1 | -module(smalltest). 2 | -export([out/1]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | out(_Arg) -> 8 | [{status, 200}, {page, "/1000.txt"}]. 9 | 10 | -------------------------------------------------------------------------------- /test/deflate_SUITE_data/streamtest.erl: -------------------------------------------------------------------------------- 1 | -module(streamtest). 2 | -export([out/1]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | out(_Arg) -> 8 | yaws_api:stream_chunk_deliver(self(), "and this is the second one\n"), 9 | yaws_api:stream_chunk_deliver(self(), "con"), 10 | yaws_api:stream_chunk_deliver(self(), "sequence"), 11 | yaws_api:stream_chunk_end(self()), 12 | {streamcontent, "text/plain", "This is the data in the first chunk\n"}. 13 | -------------------------------------------------------------------------------- /test/dhfile_SUITE_data/invalid-dhparams.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | -----END DH PARAMETERS----- 3 | -------------------------------------------------------------------------------- /test/gconf_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | ebin_dir = $data_builddir$ 4 | 5 | # Verify 0 as a valid log_wrap_size (bug #473) 6 | log_wrap_size = 0 7 | log_resolve_hostname = false 8 | fail_on_bind_err = true 9 | pick_first_virthost_on_nomatch = true 10 | keepalive_timeout = 10000 11 | 12 | 13 | listen = 127.0.0.1 14 | port = $yaws_port1$ 15 | docroot = $tempdir$/www 16 | 17 | -------------------------------------------------------------------------------- /test/host_header_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | # For the Host header tests, the following must be false: 9 | pick_first_virthost_on_nomatch = false 10 | keepalive_timeout = 10000 11 | 12 | 13 | listen = 127.0.0.1 14 | port = $yaws_port1$ 15 | docroot = $wwwdir$ 16 | 17 | 18 | 19 | listen = 127.0.0.1 20 | port = $yaws_port2$ 21 | docroot = $wwwdir$ 22 | 23 | -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/apostrophe.json: -------------------------------------------------------------------------------- 1 | [' -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/array_close.json: -------------------------------------------------------------------------------- 1 | ] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/array_open.json: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/ascii-unicode-identifier.json: -------------------------------------------------------------------------------- 1 | aå -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/bogus_char.json: -------------------------------------------------------------------------------- 1 | ["this","is","what","should","be", 2 | "a happy bit of json", 3 | "but someone, misspelled \"true\"", ture, 4 | "who says JSON is easy for humans to generate?"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/brace-comma.json: -------------------------------------------------------------------------------- 1 | {, -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/bracket-comma.json: -------------------------------------------------------------------------------- 1 | [, -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/bracket-one-comma.json: -------------------------------------------------------------------------------- 1 | [1, -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/extra-comma-in-array.json: -------------------------------------------------------------------------------- 1 | [1,] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/extra-comma-in-multiline-array.json: -------------------------------------------------------------------------------- 1 | [1, 2 | 2, 3 | 3, 4 | 4, 5 | 5, 6 | ] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/false_then_garbage.json: -------------------------------------------------------------------------------- 1 | falsex -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/garbage-after-newline.json: -------------------------------------------------------------------------------- 1 | [1,2,3] 2 | foo -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/garbage-at-the-end.json: -------------------------------------------------------------------------------- 1 | [1,2,3]foo -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/integer-starting-with-zero.json: -------------------------------------------------------------------------------- 1 | [012] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/invalid-escape.json: -------------------------------------------------------------------------------- 1 | ["\a <-- invalid escape"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/invalid-identifier.json: -------------------------------------------------------------------------------- 1 | [troo -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/invalid-negative-integer.json: -------------------------------------------------------------------------------- 1 | [-123foo] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/invalid-negative-real.json: -------------------------------------------------------------------------------- 1 | [-123.123foo] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/invalid-second-surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uD888\u3210 (first surrogate and invalid second surrogate)"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/invalid-unicode-escape.json: -------------------------------------------------------------------------------- 1 | ["\uqqqq <-- invalid unicode escape"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/isolated_surrogate_marker.json: -------------------------------------------------------------------------------- 1 | "\ud800" -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/leading_zero_in_number.json: -------------------------------------------------------------------------------- 1 | { "bad thing": 01 } -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/lone-open-brace.json: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/lone-open-bracket.json: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/lone-second-surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uDFAA (second surrogate on it's own)"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/lonely_number.json: -------------------------------------------------------------------------------- 1 | [ 2 | "foo", true, 3 | true, "blue", 4 | "baby where are you?", "oh boo hoo!", 5 | - 6 | ] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/map_close.json: -------------------------------------------------------------------------------- 1 | } -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/map_open.json: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/minus-sign-without-number.json: -------------------------------------------------------------------------------- 1 | [-foo] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/missing_integer_after_decimal_point.json: -------------------------------------------------------------------------------- 1 | 10.e2 -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/missing_integer_after_exponent.json: -------------------------------------------------------------------------------- 1 | 10e -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/negative-integer-starting-with-zero.json: -------------------------------------------------------------------------------- 1 | [-012] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/null-byte-in-object-key.json: -------------------------------------------------------------------------------- 1 | {"foo\u0000bar": 42} -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/null-byte-in-string.json: -------------------------------------------------------------------------------- 1 | ["null byte not allowed"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/null-byte-outside-string.json: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/null-escape-in-string.json: -------------------------------------------------------------------------------- 1 | ["null escape \u0000 not allowed"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/null_then_garbage.json: -------------------------------------------------------------------------------- 1 | nullx -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/object-apostrophes.json: -------------------------------------------------------------------------------- 1 | {'a' -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/object-garbage-at-end.json: -------------------------------------------------------------------------------- 1 | {"a":"a" 123} -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/object-in-unterminated-array.json: -------------------------------------------------------------------------------- 1 | [{} -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/object-no-colon.json: -------------------------------------------------------------------------------- 1 | {"a" -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/object-no-value.json: -------------------------------------------------------------------------------- 1 | {"a": -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/object-unterminated-value.json: -------------------------------------------------------------------------------- 1 | {"a":"a -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/real-garbage-after-e.json: -------------------------------------------------------------------------------- 1 | [1ea] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/real-negative-overflow.json: -------------------------------------------------------------------------------- 1 | [-123123e100000] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/real-positive-overflow.json: -------------------------------------------------------------------------------- 1 | [123123e100000] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/real-truncated-at-e.json: -------------------------------------------------------------------------------- 1 | [1e] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/real-truncated-at-point.json: -------------------------------------------------------------------------------- 1 | [1.] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/string_invalid_escape.json: -------------------------------------------------------------------------------- 1 | ["\n foo \/ bar \r\f\\\ufffd\t\b\"\\ and you can't escape thi\s"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/string_invalid_hex_char.json: -------------------------------------------------------------------------------- 1 | "foo foo, blah blah \u0123 \u4567 \u89ab \uc/ef \uABCD \uEFFE bar baz bing" -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/string_with_invalid_newline.json: -------------------------------------------------------------------------------- 1 | "la di dah. this is a string, and I can do this, \n, but not this 2 | " -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/tab-character-in-string.json: -------------------------------------------------------------------------------- 1 | [" <-- tab character"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/true_then_garbage.json: -------------------------------------------------------------------------------- 1 | truex -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/truncated-unicode-surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uDADA (first surrogate without the second)"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/unicode-identifier.json: -------------------------------------------------------------------------------- 1 | å -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/unterminated-array-and-object.json: -------------------------------------------------------------------------------- 1 | [{ -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/unterminated-array.json: -------------------------------------------------------------------------------- 1 | ["a" -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/unterminated-empty-key.json: -------------------------------------------------------------------------------- 1 | {" -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/unterminated-key.json: -------------------------------------------------------------------------------- 1 | {"a -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/unterminated-object-and-array.json: -------------------------------------------------------------------------------- 1 | {[ -------------------------------------------------------------------------------- /test/json2_SUITE_data/invalid/unterminated-string.json: -------------------------------------------------------------------------------- 1 | ["a -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/array.json: -------------------------------------------------------------------------------- 1 | ["foo", 2 | "bar", "baz", 3 | true,false,null,{"key":"value"}, 4 | [null,null,null,[]], 5 | "\n\r\\" 6 | ] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/codepoints_from_unicode_org.json: -------------------------------------------------------------------------------- 1 | "\u004d\u0430\u4e8c\ud800\udf02" -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/complex-array.json: -------------------------------------------------------------------------------- 1 | [1,2,3,4, 2 | "a", "b", "c", 3 | {"foo": "bar", "core": "dump"}, 4 | true, false, true, true, null, false 5 | ] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/difficult_json_c_test_case.json: -------------------------------------------------------------------------------- 1 | { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": [ { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": "A meta-markup language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML", "markup"] } ] } } } -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/doubles.json: -------------------------------------------------------------------------------- 1 | [ 0.1e2, 1e1, 3.141569, 10000000000000e-10] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/empty-array.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/empty-object-in-array.json: -------------------------------------------------------------------------------- 1 | [{}] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/empty-object.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/empty-string.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/empty_array.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/empty_string.json: -------------------------------------------------------------------------------- 1 | "" -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/escaped-utf-control-char.json: -------------------------------------------------------------------------------- 1 | ["\u0012 escaped control character"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/escaped_bulgarian.json: -------------------------------------------------------------------------------- 1 | ["\u0414\u0430", 2 | "\u041c\u0443", 3 | "\u0415\u0431\u0430", 4 | "\u041c\u0430\u0439\u043a\u0430\u0442\u0430"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/escaped_foobar.json: -------------------------------------------------------------------------------- 1 | "\u0066\u006f\u006f\u0062\u0061\u0072" -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/false.json: -------------------------------------------------------------------------------- 1 | [false] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/four_byte_utf8.json: -------------------------------------------------------------------------------- 1 | { "U+10ABCD": "􊯍" } -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/integers.json: -------------------------------------------------------------------------------- 1 | [ 1,2,3,4,5,6,7, 2 | 123456789 , -123456789, 3 | 2147483647, -2147483647 ] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/negative-int.json: -------------------------------------------------------------------------------- 1 | [-123] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/negative-one.json: -------------------------------------------------------------------------------- 1 | [-1] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/negative-zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/null.json: -------------------------------------------------------------------------------- 1 | [null] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/nulls_and_bools.json: -------------------------------------------------------------------------------- 1 | { 2 | "boolean, true": true, 3 | "boolean, false": false, 4 | "null": null 5 | } -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/one-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u002c one-byte UTF-8"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-capital-e-negative-exponent.json: -------------------------------------------------------------------------------- 1 | [1E-2] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-capital-e-positive-exponent.json: -------------------------------------------------------------------------------- 1 | [1E+2] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-capital-e.json: -------------------------------------------------------------------------------- 1 | [1E22] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-exponent.json: -------------------------------------------------------------------------------- 1 | [123e45] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-fraction-exponent.json: -------------------------------------------------------------------------------- 1 | [123.456e78] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-negative-exponent.json: -------------------------------------------------------------------------------- 1 | [1e-2] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-positive-exponent.json: -------------------------------------------------------------------------------- 1 | [1e+2] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-subnormal-number.json: -------------------------------------------------------------------------------- 1 | [1.8011670033376514e-308] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/real-underflow.json: -------------------------------------------------------------------------------- 1 | [123e-10000000] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/short-string.json: -------------------------------------------------------------------------------- 1 | ["a"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/simple-ascii-string.json: -------------------------------------------------------------------------------- 1 | ["abcdefghijklmnopqrstuvwxyz1234567890 "] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/simple-int-0.json: -------------------------------------------------------------------------------- 1 | [0] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/simple-int-1.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/simple-int-123.json: -------------------------------------------------------------------------------- 1 | [123] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/simple-object.json: -------------------------------------------------------------------------------- 1 | {"a":[]} -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/simple-real.json: -------------------------------------------------------------------------------- 1 | [123.456789] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "this": "is", 3 | "really": "simple", 4 | "json": "right?" 5 | } -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/string-escapes.json: -------------------------------------------------------------------------------- 1 | ["\"\\\/\b\f\n\r\t"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/string_with_escapes.json: -------------------------------------------------------------------------------- 1 | ["\n foo \/ bar \r\f\\\ufffa\t\b\"\\", 2 | "\"and this string has an escape at the beginning", 3 | "and this string has no escapes" ] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/three-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0821 three-byte UTF-8"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/three_byte_utf8.json: -------------------------------------------------------------------------------- 1 | {"matzue": "松江", "asakusa": "浅草"} -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/trailing-whitespace.json: -------------------------------------------------------------------------------- 1 | { 2 | "this": "is", 3 | "really": "simple", 4 | "json": "right?" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/true.json: -------------------------------------------------------------------------------- 1 | [true] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/two-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0123 two-byte UTF-8"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/unescaped_bulgarian.json: -------------------------------------------------------------------------------- 1 | ["Да Му Еба Майката"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/utf-8-string.json: -------------------------------------------------------------------------------- 1 | ["€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞"] -------------------------------------------------------------------------------- /test/json2_SUITE_data/valid/utf-surrogate-four-byte-encoding.json: -------------------------------------------------------------------------------- 1 | ["\uD834\uDD1E surrogate, four-byte UTF-8"] -------------------------------------------------------------------------------- /test/jsonrpc_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | ebin_dir = $data_builddir$ 4 | 5 | trace = false 6 | copy_error_log = true 7 | log_wrap_size = 1000000 8 | log_resolve_hostname = false 9 | fail_on_bind_err = true 10 | pick_first_virthost_on_nomatch = true 11 | keepalive_timeout = 10000 12 | 13 | 14 | 15 | port = $yaws_port1$ 16 | listen = 127.0.0.1 17 | appmods = 18 | 19 | -------------------------------------------------------------------------------- /test/main_SUITE_data/app_test.erl: -------------------------------------------------------------------------------- 1 | -module(app_test). 2 | -export([out/1]). 3 | 4 | -include("yaws_api.hrl"). 5 | 6 | -define(APPMOD_HEADER, "Appmod-Called"). 7 | 8 | out(#arg{appmod_name=?MODULE}) -> 9 | %% add our special header to mark that we were here 10 | [{status, 200}, 11 | {header, {?APPMOD_HEADER, "true"}}]. 12 | -------------------------------------------------------------------------------- /test/main_SUITE_data/appmod1.erl: -------------------------------------------------------------------------------- 1 | -module(appmod1). 2 | -export([out/1]). 3 | 4 | -include("yaws_api.hrl"). 5 | 6 | out(#arg{appmod_name=?MODULE}=Arg) -> 7 | case yaws_api:arg_server_path(Arg) of 8 | "/chained" -> 9 | put(appmod_stack, "appmod1[/chained]"), 10 | {page, "/appmod2"}; 11 | Path -> 12 | Stack = get(appmod_stack), 13 | put(appmod_stack, Stack++", appmod1["++Path++"]"), 14 | {page, "/chained.txt"} 15 | end. 16 | -------------------------------------------------------------------------------- /test/main_SUITE_data/appmod2.erl: -------------------------------------------------------------------------------- 1 | -module(appmod2). 2 | -export([out/1]). 3 | 4 | out(Arg) -> 5 | Path = yaws_api:arg_server_path(Arg), 6 | Stack = get(appmod_stack), 7 | put(appmod_stack, Stack++", appmod2["++Path++"]"), 8 | {page, "/appmod1"}. 9 | -------------------------------------------------------------------------------- /test/main_SUITE_data/appmod3.erl: -------------------------------------------------------------------------------- 1 | -module(appmod3). 2 | -export([out/1]). 3 | 4 | out(Arg) -> 5 | Path = yaws_api:arg_server_path(Arg), 6 | Stack = get(appmod_stack), 7 | Options = [{header, {"X-AppMods", Stack++", appmod3["++Path++"]"}}], 8 | {page, {Options, "/chained.txt"}}. 9 | -------------------------------------------------------------------------------- /test/main_SUITE_data/appmod_strip_undefined_bindings.erl: -------------------------------------------------------------------------------- 1 | -module(appmod_strip_undefined_bindings). 2 | -export([out/1]). 3 | 4 | out(_) -> 5 | [{bindings, [{"HelloWorld", "hello world!"}]}, 6 | {yssi, "appmod_with_yssi_strip_undefined_bindings.yaws"}]. 7 | -------------------------------------------------------------------------------- /test/main_SUITE_data/appmod_with_yssi.erl: -------------------------------------------------------------------------------- 1 | -module(appmod_with_yssi). 2 | -export([out/1]). 3 | 4 | -include("yaws_api.hrl"). 5 | 6 | out(Arg) -> 7 | [Arg#arg{state=yssi}, 8 | {yssi, "appmod_with_yssi.yaws"}]. 9 | -------------------------------------------------------------------------------- /test/main_SUITE_data/appmod_with_yssi_strip_undefined_bindings.erl: -------------------------------------------------------------------------------- 1 | -module(appmod_with_yssi_strip_undefined_bindings). 2 | -export([out/1]). 3 | 4 | out(_) -> 5 | [{bindings, [strip_undefined, {"HelloWorld", "hello world!"}]}, 6 | {yssi, "appmod_with_yssi_strip_undefined_bindings.yaws"}]. 7 | -------------------------------------------------------------------------------- /test/main_SUITE_data/cache_appmod_test.erl: -------------------------------------------------------------------------------- 1 | -module(cache_appmod_test). 2 | -export([out/1]). 3 | 4 | -include("yaws_api.hrl"). 5 | 6 | out(Arg) -> 7 | {abs_path, Path} = (Arg#arg.req)#http_request.path, 8 | Opts0 = case yaws_api:queryvar(Arg, "no-cache") of 9 | {ok, "1"} -> [{disable_cache, true}]; 10 | _ -> [] 11 | end, 12 | Opts1 = [{header, {"X-Appmod", "cache_appmod_test"}}|Opts0], 13 | {page, {Opts1, Path}}. 14 | 15 | -------------------------------------------------------------------------------- /test/main_SUITE_data/dispatchmod_tester.erl: -------------------------------------------------------------------------------- 1 | -module(dispatchmod_tester). 2 | -export([dispatch/1]). 3 | 4 | -include("yaws_api.hrl"). 5 | 6 | dispatch(#arg{clisock=Sock}=A) -> 7 | {abs_path, Path} = (A#arg.req)#http_request.path, 8 | case Path of 9 | "/done" -> 10 | ok = gen_tcp:send(Sock, <<"HTTP/1.1 204 No Content\r\nX-DispatchMod: true\r\n\r\n">>), 11 | done; 12 | "/closed" -> 13 | ok = gen_tcp:send(Sock, <<"HTTP/1.1 200 OK\r\nX-DispatchMod: true\r\nConnection: close\r\n\r\n">>), 14 | gen_tcp:close(Sock), 15 | closed; 16 | _ -> 17 | continue 18 | end. 19 | -------------------------------------------------------------------------------- /test/main_SUITE_data/flushtest.erl: -------------------------------------------------------------------------------- 1 | -module(flushtest). 2 | -export([out/1]). 3 | 4 | -include("yaws.hrl"). 5 | -include("yaws_api.hrl"). 6 | 7 | out(_Arg) -> 8 | [{status, 200}, {html, "break"}, flush, break]. 9 | -------------------------------------------------------------------------------- /test/main_SUITE_data/forwarded_for_test.erl: -------------------------------------------------------------------------------- 1 | -module(forwarded_for_test). 2 | -export([out/1]). 3 | 4 | -include("yaws_api.hrl"). 5 | 6 | out(Arg) -> 7 | Fwd = yaws_api:headers_x_forwarded_for(Arg#arg.headers), 8 | Status = case string:tokens(Fwd, ", ") of 9 | ["192.168.1.1","192.168.1.2"] -> 200; 10 | _ -> 400 11 | end, 12 | [{status, Status}, {header, {"X-Result", Fwd}}]. 13 | 14 | -------------------------------------------------------------------------------- /test/main_SUITE_data/header_order.erl: -------------------------------------------------------------------------------- 1 | -module(header_order). 2 | -export([out/1]). 3 | 4 | %% This test verifies that Yaws doesn't unnecessarily reorder headers 5 | %% returned by an appmod. We use a header known to Yaws in the #outh 6 | %% record, Cache-Control, along with fabricated user headers, which 7 | %% are stored in the #outh "other" field, to verify ordering between 8 | %% "known" and "other" and also ordering among "other" headers. See 9 | %% main_SUITE:header_order/1. 10 | out(_) -> 11 | [{header, {"Cache-Control", "no-cache"}}, 12 | {header, {"X-Test-Header1", "1"}}, 13 | {header, {"X-Test-Header2", "2"}}]. 14 | -------------------------------------------------------------------------------- /test/main_SUITE_data/phptest.erl: -------------------------------------------------------------------------------- 1 | -module(phptest). 2 | -export([out/1]). 3 | 4 | -include("yaws.hrl"). 5 | -include("yaws_api.hrl"). 6 | 7 | out(Arg) -> 8 | File = Arg#arg.fullpath, 9 | case filelib:is_file(File) of 10 | true -> 11 | case file:read_file(File) of 12 | {ok, Content} -> 13 | [{status, 200}, {content, "text/plain", Content}]; 14 | {error, Reason} -> 15 | [{status, 500}, {html, file:format_error(Reason)}] 16 | end; 17 | false -> 18 | Reason = "file not found: " ++ File, 19 | [{status, 500}, {html, Reason}] 20 | end. 21 | -------------------------------------------------------------------------------- /test/main_SUITE_data/policies.erl: -------------------------------------------------------------------------------- 1 | -module(policies). 2 | -export([out/1]). 3 | 4 | -include("yaws_api.hrl"). 5 | 6 | out(Arg) -> 7 | {abs_path, OrigReqPath} = Arg#arg.orig_req#http_request.path, 8 | {abs_path, ReqPath} = Arg#arg.req#http_request.path, 9 | [{status, 200}, 10 | {header, {"X-OrigReqPath", OrigReqPath}}, 11 | {header, {"X-ReqPath", ReqPath}}, 12 | {header, {"X-ServerPath", Arg#arg.server_path}}, 13 | {header, {"X-Pathinfo", Arg#arg.pathinfo}}]. 14 | -------------------------------------------------------------------------------- /test/main_SUITE_data/reentranttest.erl: -------------------------------------------------------------------------------- 1 | -module(reentranttest). 2 | -export([out/1]). 3 | 4 | -include("yaws.hrl"). 5 | -include("yaws_api.hrl"). 6 | 7 | out(Arg) -> 8 | Url = yaws_api:request_url(Arg), 9 | case Url#url.path of 10 | "/reentranttest/status" -> 11 | {page, {[{status, 201}], "/hello.txt"}}; 12 | "/reentranttest/delayed_headers" -> 13 | Hdrs = [{header, {cache_control, "no-cache"}}, 14 | {header, "Etag: static-tag"}, 15 | {header, "X-Delayed-Header: true"}], 16 | {page, {Hdrs, "/hello.txt"}}; 17 | _ -> 18 | Reason = "unknown path: " ++ Url#url.path, 19 | [{status, 500}, {html, Reason}] 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /test/main_SUITE_data/rewritetest.erl: -------------------------------------------------------------------------------- 1 | -module(rewritetest). 2 | -export([arg_rewrite/1]). 3 | 4 | -include("yaws.hrl"). 5 | -include("yaws_api.hrl"). 6 | 7 | 8 | arg_rewrite(Arg) -> 9 | Url = yaws_api:request_url(Arg), 10 | case Url#url.path of 11 | "/rewrite" -> 12 | Req0 = Arg#arg.req, 13 | Req1 = Req0#http_request{path={abs_path,"/hello.txt"}}, 14 | Arg#arg{req=Req1}; 15 | "/redirect" -> 16 | L = "http://www.yakaz.com", 17 | H = [{header, {location, L}}], 18 | RwResp = #rewrite_response{status=301, headers=H}, 19 | Arg#arg{state=RwResp}; 20 | "/response" -> 21 | H = [{header, {content_type, "text/plain"}}], 22 | C = <<"Goodbye, Cruel World!">>, 23 | RwResp = #rewrite_response{status=200, headers=H, content=C}, 24 | Arg#arg{state=RwResp}; 25 | _ -> 26 | Arg 27 | end. 28 | -------------------------------------------------------------------------------- /test/main_SUITE_data/status.erl: -------------------------------------------------------------------------------- 1 | -module(status). 2 | -export([out/1]). 3 | 4 | out(Arg) -> 5 | [{"code", Status}] = yaws_api:parse_query(Arg), 6 | {status, list_to_integer(Status)}. 7 | -------------------------------------------------------------------------------- /test/main_SUITE_data/throwtest.erl: -------------------------------------------------------------------------------- 1 | -module(throwtest). 2 | -export([out/1]). 3 | 4 | out(_Arg) -> 5 | throw({status, 200}). 6 | -------------------------------------------------------------------------------- /test/main_SUITE_data/wrap_log.erl: -------------------------------------------------------------------------------- 1 | -module(wrap_log). 2 | -export([out/1]). 3 | 4 | out(_Arg) -> 5 | yaws_log ! minute10, 6 | {status, 200}. 7 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/accept_ranges1.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_Arg) -> 3 | {header, {"Accept-Ranges", <<"bytes">>}}. 4 | 5 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/accept_ranges2.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_Arg) -> 3 | {header, {accept_ranges, "bytes"}}. 4 | 5 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/appmod_with_yssi.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | {header, "x-yssi: " ++ f("state=~p", [A#arg.state])}. 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/appmod_with_yssi_strip_undefined_bindings.yaws: -------------------------------------------------------------------------------- 1 |

%%TESTBINDING%%

2 |

%%HelloWorld%%

3 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/cache_appmod.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(A) -> 3 | {html, "Cache Appmod!"}. 4 | 5 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/cgi-bin/redirect_test.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Used to verify that Yaws augments the client response with 5 | # a 302 status code as required by the CGI 1.1 spec when only 6 | # a Location header is returned without a status code. 7 | # 8 | echo 'Location: http://localhost:1234/redirect' 9 | echo 10 | exit 0 11 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/chained.txt: -------------------------------------------------------------------------------- 1 | Chained Appmods! 2 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/exhtml.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_Arg) -> 3 | Struct = {p, [{id, <<"foo">>}], <<"bar">>}, 4 | {exhtml, Struct}. 5 | 6 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/hello.txt: -------------------------------------------------------------------------------- 1 | Hello, World! 2 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/index.html: -------------------------------------------------------------------------------- 1 |

Hello World!

2 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/test.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/variables.html: -------------------------------------------------------------------------------- 1 |

%%TESTBINDING%%

2 |

%%HelloWorld%%

3 | -------------------------------------------------------------------------------- /test/main_SUITE_data/www/yaws_head.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/test/main_SUITE_data/www/yaws_head.gif -------------------------------------------------------------------------------- /test/maxconn_SUITE_data/max_connections.erl: -------------------------------------------------------------------------------- 1 | -module(max_connections). 2 | -export([out/1]). 3 | 4 | out(_Arg) -> 5 | [{status, 204}]. 6 | -------------------------------------------------------------------------------- /test/maxconn_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | ebin_dir = $data_builddir$ 4 | 5 | trace = false 6 | copy_error_log = true 7 | log_wrap_size = 1000000 8 | log_resolve_hostname = false 9 | fail_on_bind_err = true 10 | pick_first_virthost_on_nomatch = true 11 | keepalive_timeout = 10000 12 | 13 | max_connections = 2 14 | 15 | 16 | listen = 127.0.0.1 17 | port = $yaws_port1$ 18 | appmods = 19 | 20 | -------------------------------------------------------------------------------- /test/mime_types_SUITE_data/mime.types: -------------------------------------------------------------------------------- 1 | text/x-erlang erl 2 | application/x-httpd-php php 3 | application/x-httpd-php5 php5 4 | -------------------------------------------------------------------------------- /test/no_docroot_SUITE_data/templates/no_docroot_appmod.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | pick_first_virthost_on_nomatch = true 9 | keepalive_timeout = 10000 10 | 11 | 12 | listen = 127.0.0.1 13 | port = $yaws_port1$ 14 | appmods = <"/", app_module> 15 | 16 | -------------------------------------------------------------------------------- /test/no_docroot_SUITE_data/templates/no_docroot_fwdproxy.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | pick_first_virthost_on_nomatch = true 9 | keepalive_timeout = 10000 10 | 11 | 12 | listen = 127.0.0.1 13 | port = $yaws_port1$ 14 | fwdproxy = true 15 | 16 | -------------------------------------------------------------------------------- /test/no_docroot_SUITE_data/templates/no_docroot_redirect.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | pick_first_virthost_on_nomatch = true 9 | keepalive_timeout = 10000 10 | 11 | 12 | listen = 127.0.0.1 13 | port = $yaws_port1$ 14 | 15 | "/" == http://www.example.org/ 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/no_docroot_SUITE_data/templates/no_docroot_revproxy.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | pick_first_virthost_on_nomatch = true 9 | keepalive_timeout = 10000 10 | 11 | 12 | listen = 127.0.0.1 13 | port = $yaws_port1$ 14 | revproxy = "/" http://www.example.org 15 | 16 | -------------------------------------------------------------------------------- /test/redirect_SUITE_data/bad_redirect1.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | /bad_redirect = 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/redirect_SUITE_data/bad_redirect2.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | /bad_redirect = 301 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/redirect_SUITE_data/bad_redirect3.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | /bad_redirect = 404 http://www.example.org 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/redirect_SUITE_data/bad_redirect4.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | /bad_redirect = 601 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/redirect_SUITE_data/www/error404.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(Arg) -> 3 | {abs_path, Path} = (Arg#arg.req)#http_request.path, 4 | {content, "text/plain", Path}. 5 | 6 | -------------------------------------------------------------------------------- /test/redirect_SUITE_data/www/test/index.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(Arg) -> 3 | case Arg#arg.clidata of 4 | undefined -> 5 | {html, "no data"}; 6 | {partial, Bin} -> 7 | case Arg#arg.cont of 8 | undefined -> {get_more, [Bin], Arg#arg.state}; 9 | Cont -> {get_more, [Bin|Cont], Arg#arg.state} 10 | end; 11 | Bin -> 12 | case Arg#arg.cont of 13 | undefined -> {content, "text/plain", Bin}; 14 | Cont -> {content, "text/plain", lists:reverse([Bin|Cont])} 15 | end 16 | end. 17 | 18 | -------------------------------------------------------------------------------- /test/revproxy_SUITE_data/intercept1.erl: -------------------------------------------------------------------------------- 1 | -module(intercept1). 2 | -export([rewrite_request/2, rewrite_response/2]). 3 | 4 | %% Test that returning an incorrect return value from rewrite_request 5 | %% is handled correctly by the reverse proxy. 6 | rewrite_request(_, _) -> 7 | error. 8 | 9 | rewrite_response(Resp, Hdrs) -> 10 | {ok, Resp, Hdrs}. 11 | -------------------------------------------------------------------------------- /test/revproxy_SUITE_data/intercept2.erl: -------------------------------------------------------------------------------- 1 | -module(intercept2). 2 | -export([rewrite_request/2, rewrite_response/2]). 3 | 4 | rewrite_request(Req, Hdrs) -> 5 | {ok, Req, Hdrs}. 6 | 7 | %% Test that returning an incorrect return value from rewrite_request 8 | %% is handled correctly by the reverse proxy. 9 | rewrite_response(_, _) -> 10 | error. 11 | -------------------------------------------------------------------------------- /test/revproxy_SUITE_data/intercept3.erl: -------------------------------------------------------------------------------- 1 | -module(intercept3). 2 | -export([rewrite_request/2, rewrite_response/2]). 3 | 4 | -include("../../include/yaws_api.hrl"). 5 | 6 | rewrite_request(Req, Hdrs) -> 7 | {ok, Req, yaws_api:set_header(Hdrs, accept, "text/plain")}. 8 | 9 | rewrite_response(Resp, Hdrs) -> 10 | {ok, Resp, yaws_api:set_header(Hdrs, "X-Test-Interception", "true")}. 11 | -------------------------------------------------------------------------------- /test/revproxy_SUITE_data/nolengthtest.erl: -------------------------------------------------------------------------------- 1 | -module(nolengthtest). 2 | -export([out/1]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | out(_Arg) -> 8 | yaws_api:stream_chunk_deliver(self(), lists:duplicate(256, $A)), 9 | yaws_api:stream_chunk_end(self()), 10 | [ 11 | {header, {transfer_encoding, erase}}, 12 | {header, {content_length, erase}}, 13 | {header, {connection, "close"}}, 14 | {streamcontent, "text/plain", lists:duplicate(256, $A)} 15 | ]. 16 | -------------------------------------------------------------------------------- /test/revproxy_SUITE_data/rewritetest.erl: -------------------------------------------------------------------------------- 1 | -module(rewritetest). 2 | -export([arg_rewrite/1]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | 8 | arg_rewrite(Arg) -> 9 | Url = yaws_api:request_url(Arg), 10 | case Url#url.path of 11 | "/rewrite" ++ Rest -> 12 | Req0 = Arg#arg.req, 13 | Req1 = Req0#http_request{path={abs_path,Rest}}, 14 | Arg#arg{req=Req1}; 15 | _ -> 16 | Arg 17 | end. 18 | -------------------------------------------------------------------------------- /test/revproxy_SUITE_data/streamtest.erl: -------------------------------------------------------------------------------- 1 | -module(streamtest). 2 | -export([out/1]). 3 | 4 | -include("../../include/yaws.hrl"). 5 | -include("../../include/yaws_api.hrl"). 6 | 7 | out(_Arg) -> 8 | yaws_api:stream_chunk_deliver(self(), "and this is the second one\n"), 9 | yaws_api:stream_chunk_deliver(self(), "con"), 10 | yaws_api:stream_chunk_deliver(self(), "sequence"), 11 | yaws_api:stream_chunk_end(self()), 12 | {streamcontent, "text/plain", "This is the data in the first chunk\n"}. 13 | -------------------------------------------------------------------------------- /test/sconf_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | pick_first_virthost_on_nomatch = true 9 | keepalive_timeout = 10000 10 | 11 | 12 | port = $yaws_port1$ 13 | listen = 127.0.0.1 14 | docroot = $tempdir$/www 15 | 16 | keyfile = $top_srcdir$/ssl/yaws-key.pem 17 | certfile = $top_srcdir$/ssl/yaws-cert.pem 18 | depth = 0 19 | protocol_version = tlsv1.3 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/srcdir_SUITE_data/src/srcdir_test.erl: -------------------------------------------------------------------------------- 1 | -module(srcdir_test). 2 | -export([out/1]). 3 | 4 | -include("srcdir_test.hrl"). 5 | 6 | out(_Arg) -> 7 | Content = ?SRCDIR_VERSION, 8 | [{status, 200}, {content, "text/plain", Content}]. 9 | -------------------------------------------------------------------------------- /test/srcdir_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | src_dir = $data_srcdir$/src 4 | include_dir = $tempdir$/include 5 | 6 | trace = false 7 | copy_error_log = true 8 | log_wrap_size = 1000000 9 | log_resolve_hostname = false 10 | fail_on_bind_err = true 11 | pick_first_virthost_on_nomatch = true 12 | keepalive_timeout = 10000 13 | 14 | 15 | listen = 127.0.0.1 16 | port = $yaws_port1$ 17 | appmods = <"/", srcdir_test> 18 | 19 | -------------------------------------------------------------------------------- /test/ssl_sni_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | pick_first_virthost_on_nomatch = true 9 | keepalive_timeout = 10000 10 | -------------------------------------------------------------------------------- /test/ssl_sni_SUITE_data/www/index.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(Arg) -> 3 | SC = get(sc), 4 | {html, ["servername: ", yaws:sconf_servername(SC)]}. 5 | 6 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_absolute_subconfig.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8000 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | subconfigdir = $tempdir$/server_subconfigdir.d 7 | subconfig = $tempdir$/server_subconfig.conf 8 | subconfig = $tempdir$/server_subconfig.d/*.conf 9 | 10 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_relative_subconfig.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8000 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | subconfigdir = server_subconfigdir.d 7 | subconfig = server_subconfig.conf 8 | subconfig = server_subconfig.d/*.conf 9 | 10 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_subconfig.d/.hidden.conf: -------------------------------------------------------------------------------- 1 | invalid_param = error 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_subconfig.d/ignored: -------------------------------------------------------------------------------- 1 | invalid_param = error 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_subconfig.d/subconfig1.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8001 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_subconfig.d/subconfig2.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8002 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_subconfigdir.d/.hidden.conf: -------------------------------------------------------------------------------- 1 | invalid_param = error 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_subconfigdir.d/subconfigdir1.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8003 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/global_subconfigdir.d/subconfigdir2.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8004 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfig.conf: -------------------------------------------------------------------------------- 1 | serveralias = server_subconfig 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfig.d/.hidden.conf: -------------------------------------------------------------------------------- 1 | invalid_param = error 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfig.d/ignored: -------------------------------------------------------------------------------- 1 | invalid_param = error 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfig.d/subconfig1.conf: -------------------------------------------------------------------------------- 1 | serveralias = server_subconfig1 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfig.d/subconfig2.conf: -------------------------------------------------------------------------------- 1 | serveralias = server_subconfig2 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfig_closing_tag.conf: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfigdir.d/.hidden.conf: -------------------------------------------------------------------------------- 1 | invalid_param = error 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfigdir.d/subconfigdir1.conf: -------------------------------------------------------------------------------- 1 | serveralias = server_subconfigdir1 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/server_subconfigdir.d/subconfigdir2.conf: -------------------------------------------------------------------------------- 1 | serveralias = server_subconfigdir2 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_absolute.conf: -------------------------------------------------------------------------------- 1 | subconfigdir = $tempdir$/global_subconfigdir.d 2 | subconfig = $tempdir$/global_absolute_subconfig.conf 3 | subconfig = $tempdir$/global_subconfig.d/*.conf 4 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_global_subconfig_notfound1.conf: -------------------------------------------------------------------------------- 1 | subconfig = /tmp/global_subconfig_notfound.conf 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_global_subconfig_notfound2.conf: -------------------------------------------------------------------------------- 1 | subconfig = global_subconfig_notfound.conf 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_global_subconfig_notfound3.conf: -------------------------------------------------------------------------------- 1 | subconfigdir = /notfound/global_subconfig.conf 2 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_relative.conf: -------------------------------------------------------------------------------- 1 | subconfigdir = global_subconfigdir.d 2 | subconfig = global_relative_subconfig.conf 3 | subconfig = global_subconfig.d/*.conf 4 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_server_subconfig_closing_tag.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8000 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | subconfig = server_subconfig_closing_tag.conf 7 | 8 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_server_subconfig_notfound1.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8000 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | subconfig = /tmp/server_subconfig_notfound.conf 7 | 8 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_server_subconfig_notfound2.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8000 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | subconfig = server_subconfig_notfound.conf 7 | 8 | -------------------------------------------------------------------------------- /test/subconfig_SUITE_data/templates/yaws_server_subconfig_notfound3.conf: -------------------------------------------------------------------------------- 1 | 2 | port = 8000 3 | listen = 0.0.0.0 4 | docroot = /tmp 5 | 6 | subconfigdir = /notfound/server_subconfig.conf 7 | 8 | -------------------------------------------------------------------------------- /test/webdav_SUITE_data/commands: -------------------------------------------------------------------------------- 1 | unset tolerant 2 | set namespace DAV: 3 | ls 4 | propnames test 5 | put tst-file 6 | rm tst-file 7 | mkcol locked 8 | lock locked 9 | cd locked 10 | put tst-file 11 | cd .. 12 | unlock locked 13 | rmcol locked 14 | -------------------------------------------------------------------------------- /test/webdav_SUITE_data/templates/davtest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | input=$data_srcdir$/commands 4 | output=$tempdir$/output 5 | 6 | cd $tempdir$ && cadaver http://127.0.0.1:$yaws_port1$ < $input > $output 2>&1 7 | 8 | success=`grep -c succeeded. $output` 9 | if [ $success -ne 9 ]; then 10 | echo "- not all cadaver actions succeeded, see $output for details" 11 | cat $output 12 | exit 1 13 | fi 14 | printf "\n** All "`pwd`" tests completed successfully.\n\n" 15 | exit 0 16 | 17 | -------------------------------------------------------------------------------- /test/webdav_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | trace = false 4 | copy_error_log = true 5 | log_wrap_size = 1000000 6 | log_resolve_hostname = false 7 | fail_on_bind_err = true 8 | pick_first_virthost_on_nomatch = true 9 | keepalive_timeout = 10000 10 | 11 | 12 | listen = 127.0.0.1 13 | port = $yaws_port1$ 14 | docroot = $tempdir$/www 15 | dav = true 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/bad_module1.yaws: -------------------------------------------------------------------------------- 1 | 2 | %% yaws module already exists ! 3 | out(_A) -> 4 | ok. 5 | 6 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/bad_module2.yaws: -------------------------------------------------------------------------------- 1 | 2 | %% Module defined by script hello.yaws (hello.yaws must be requested first) 3 | out(_A) -> 4 | ok. 5 | 6 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/bad_module3.yaws: -------------------------------------------------------------------------------- 1 | 2 | %% empty module name 3 | out(_A) -> 4 | ok. 5 | 6 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/comments.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_A) -> 3 | %% Simple comment 1 4 | % Simple comment 2 5 | %% Comment with special characters or string: ', ", <, >, , 6 | % Comment with special characters or string: ', ", <, >, , 7 | {html, "Hello World! % this is not a comment %"}. 8 | 9 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/compilation_error.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_A) -> 3 | function_not_found(). 4 | 5 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/empty_erl.yaws: -------------------------------------------------------------------------------- 1 | Empty erl: 2 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/empty_verbatim.yaws: -------------------------------------------------------------------------------- 1 | Empty verbatim: 2 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/hello.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_A) -> 3 | {html, "Hello World!"}. 4 | 5 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/no_out_fun1.yaws: -------------------------------------------------------------------------------- 1 | 2 | -export([test/0]). 3 | 4 | test() -> ok. 5 | 6 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/no_out_fun2.yaws: -------------------------------------------------------------------------------- 1 | 2 | -export([test/0]). 3 | 4 | test() -> ok. 5 | 6 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | ebin_dir = $data_builddir$ 4 | 5 | trace = false 6 | copy_error_log = true 7 | log_wrap_size = 1000000 8 | log_resolve_hostname = false 9 | fail_on_bind_err = true 10 | pick_first_virthost_on_nomatch = true 11 | keepalive_timeout = 10000 12 | 13 | 14 | listen = 127.0.0.1 15 | port = $yaws_port1$ 16 | deflate = true 17 | auth_log = true 18 | docroot = $wwwdir$ $data_srcdir$ 19 | 20 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/var_bindings.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_A) -> 3 | {bindings, [{"bold", "b"}, {"text", "binding_value"}]}. 4 | 5 | 6 | %%%%<%%bold%%>%%text%%%%%% 7 | 8 | %% %%not_a_binding %% 9 | -------------------------------------------------------------------------------- /test/yaws_compile_SUITE_data/verbatim_tag.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 20 | 21 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/yaws_sessions_server_SUITE_data/templates/yaws.conf: -------------------------------------------------------------------------------- 1 | logdir = $logdir$ 2 | 3 | ebin_dir = $data_builddir$ 4 | 5 | trace = false 6 | copy_error_log = true 7 | log_wrap_size = 1000000 8 | log_resolve_hostname = false 9 | fail_on_bind_err = true 10 | pick_first_virthost_on_nomatch = true 11 | keepalive_timeout = 10000 12 | 13 | 14 | listen = 127.0.0.1 15 | port = $yaws_port1$ 16 | deflate = true 17 | auth_log = true 18 | docroot = $wwwdir$ $data_srcdir$ 19 | 20 | -------------------------------------------------------------------------------- /vsn.mk: -------------------------------------------------------------------------------- 1 | YAWS_VSN=2.2.0 2 | -------------------------------------------------------------------------------- /win32/README.developer: -------------------------------------------------------------------------------- 1 | To cross-compile Yaws for windows, we need to install mingw32 compiler then run 2 | the configure script with --host option: 3 | 4 | $> ./configure --host i586-mingw32msvc && make 5 | 6 | 7 | To create an installer, we need a copy of the install-builder. Since yaws is an 8 | open source project. We have a free license of bitrock installer. Download the 9 | bitrock installer and install it somewhere 10 | (http://www.bitrock.com/download_installbuilder_download.html), Then run: 11 | 12 | $> make mkinstaller INSTALL_BUILDER=/path/to/installbuilder 13 | 14 | By default INSTALL_BUILDER variable points on '${HOME}/installbuilder-5.4.14'. 15 | 16 | Here, 'mkinstaller' target will use a distribution directory to build Yaws 17 | installer, so you don't need to run configure script with --host option. This 18 | will produce the installer 'Yaws-{VSN}-windows-installer.exe' 19 | 20 | -------------------------------------------------------------------------------- /win32/README.txt: -------------------------------------------------------------------------------- 1 | 2 | win32 version of yaws 3 | 4 | For just running yaws, it works pretty much the same as on UNIX. 5 | Commands that don't work are --id, --heart and some more 6 | Try yaws --help for available options. 7 | 8 | Just starting 9 | 10 | > yaws -i 11 | 12 | Starts a basic yaws system with a yaws.conf taken from 13 | the install dir. 14 | 15 | It's actually possible to develop and edit yaws inside windows. 16 | Required tools are unxutils and perl installed. 17 | 18 | 19 | Enjoy, 20 | 21 | /klacke 22 | 23 | -------------------------------------------------------------------------------- /win32/img/yaws_head.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/win32/img/yaws_head.gif -------------------------------------------------------------------------------- /win32/license.xml: -------------------------------------------------------------------------------- 1 | 2 | 2008-04-14 3 | 1.2 4 | standard 5 | 5 6 | 4 7 | Claes Wikstrom - Open Source License 8 | 5 9 | BitRock InstallBuilder Multiplatform Enterprise 10 | yaws 11 | b0f43380b13adfdb16e2cc2cfa330463 12 | 13 | -------------------------------------------------------------------------------- /www/END: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | -------------------------------------------------------------------------------- /www/END2: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 |

7 | Valid XHTML 1.0! 10 |

11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /www/HEAD: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Yaws 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /www/cgi-bin/foo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import cgi 4 | 5 | print("Content-type: text/html\n\n") 6 | print("

hi there

") 7 | -------------------------------------------------------------------------------- /www/code.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | out(A) -> 5 | {Code, F} = case queryvar(A, "file") of 6 | {ok, Fname} -> 7 | File = A#arg.docroot ++ 8 | yaws_api:sanitize_file_name(Fname), 9 | case file:read_file(File) of 10 | {ok, B} -> 11 | C = {'div', 12 | [], 13 | {pre, [], B}}, 14 | {C, Fname}; 15 | _ -> 16 | {[], "Can't read " ++ Fname } 17 | end; 18 | undefined -> 19 | {[], "Bad request"} 20 | end, 21 | {ehtml, {html, [], 22 | {'div', 23 | [], 24 | [{h2, [], F}, 25 | Code]}}}. 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /www/code/myappmod.erl: -------------------------------------------------------------------------------- 1 | -module(myappmod). 2 | -author('klacke@bluetail.com'). 3 | 4 | -include("../../include/yaws_api.hrl"). 5 | 6 | -export([out/1]). 7 | 8 | box(Str) -> 9 | {'div',[{class,"box"}], 10 | {pre,[],Str}}. 11 | 12 | out(A) -> 13 | {ehtml, 14 | [{p,[], 15 | box(io_lib:format("A#arg.appmoddata = ~p~n" 16 | "A#arg.appmod_prepath = ~p~n" 17 | "A#arg.querydata = ~p~n", 18 | [A#arg.appmoddata, 19 | A#arg.appmod_prepath, 20 | A#arg.querydata]))}]}. 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /www/compile_layout.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/compile_layout.dia -------------------------------------------------------------------------------- /www/compile_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/compile_layout.png -------------------------------------------------------------------------------- /www/contact.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | out(A) -> 5 | {ssi, "TAB.inc","%%",[{"contact", "choosen"}]}. 6 | 7 | 8 | 9 |
10 | 11 |

Contact

12 | 13 |

There is a mailinglist which is used to discuss yaws. 14 | The list is called 15 | erlyaws-list 16 | and it is run by Sourceforge.

17 | 18 |

19 | The URL to the list is: https://lists.sourceforge.net/lists/listinfo/erlyaws-list

20 | 21 | 22 |
23 | 24 | 25 | out(A) -> {ssi, "END2",[],[]}. 26 | 27 | -------------------------------------------------------------------------------- /www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/favicon.ico -------------------------------------------------------------------------------- /www/haxe_sample.html: -------------------------------------------------------------------------------- 1 | // To try this sample out using haXe and neko, 2 | // save this file as Application.hx and run the following to compile it: 3 | // haxe Application -neko Application.n -main Application.hx 4 | // and the following to execute it: 5 | // neko Application.n 6 | class Application { 7 | 8 | public static function main():Void { 9 | var URL = "http://localhost:8000/haxe_sample.yaws"; 10 | var cnx = haxe.remoting.HttpAsyncConnection.urlConnect(URL); 11 | cnx.setErrorHandler( function(err) { 12 | trace("Exception : " + Std.string(err)); 13 | } ); 14 | var a = {a:"foo", b:"bar", c:[1,2,3]}; 15 | var b = "hello, Erlang!"; 16 | cnx.echo.call([a, b], display); 17 | cnx.failure.call([a, b], display); 18 | } 19 | 20 | static function display(v) { 21 | trace(v); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /www/haxe_sample.yaws: -------------------------------------------------------------------------------- 1 | 2 | -export([respond/2]). 3 | 4 | out(A) -> 5 | A1 = A#arg{state = {new_state, "alive and kicking"}}, 6 | yaws_rpc:handler(A1, {haxe_sample, respond}). 7 | 8 | respond(State, {call, failure, Value} = _Request) -> 9 | { false, { error, { struct, [ { message, "Failure" }, { code, 500 } ] } } }; 10 | 11 | respond(State, {call, echo, Value} = _Request) -> 12 | {new_state, StateVal} = State, 13 | {array, [First, Second]} = Value, 14 | Response = 15 | {response, 16 | {struct, [ 17 | {you_sent_first, First}, 18 | {btw, "Hello haXe!"}, 19 | {also, {array, ["take", "this", 4, "array"]}}, 20 | {my_state_is, StateVal} 21 | ] 22 | }}, 23 | {true, 0, null, Response}. 24 | 25 | -------------------------------------------------------------------------------- /www/icons/a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/a.gif -------------------------------------------------------------------------------- /www/icons/alert.black.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/alert.black.gif -------------------------------------------------------------------------------- /www/icons/alert.red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/alert.red.gif -------------------------------------------------------------------------------- /www/icons/apache_pb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/apache_pb.gif -------------------------------------------------------------------------------- /www/icons/back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/back.gif -------------------------------------------------------------------------------- /www/icons/ball.gray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/ball.gray.gif -------------------------------------------------------------------------------- /www/icons/ball.red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/ball.red.gif -------------------------------------------------------------------------------- /www/icons/binary.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/binary.gif -------------------------------------------------------------------------------- /www/icons/binhex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/binhex.gif -------------------------------------------------------------------------------- /www/icons/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/blank.gif -------------------------------------------------------------------------------- /www/icons/bomb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/bomb.gif -------------------------------------------------------------------------------- /www/icons/box1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/box1.gif -------------------------------------------------------------------------------- /www/icons/box2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/box2.gif -------------------------------------------------------------------------------- /www/icons/broken.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/broken.gif -------------------------------------------------------------------------------- /www/icons/burst.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/burst.gif -------------------------------------------------------------------------------- /www/icons/c.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/c.gif -------------------------------------------------------------------------------- /www/icons/comp.blue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/comp.blue.gif -------------------------------------------------------------------------------- /www/icons/comp.gray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/comp.gray.gif -------------------------------------------------------------------------------- /www/icons/compressed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/compressed.gif -------------------------------------------------------------------------------- /www/icons/continued.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/continued.gif -------------------------------------------------------------------------------- /www/icons/dir.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/dir.gif -------------------------------------------------------------------------------- /www/icons/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/down.gif -------------------------------------------------------------------------------- /www/icons/dvi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/dvi.gif -------------------------------------------------------------------------------- /www/icons/erl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/erl.gif -------------------------------------------------------------------------------- /www/icons/f.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/f.gif -------------------------------------------------------------------------------- /www/icons/folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/folder.gif -------------------------------------------------------------------------------- /www/icons/folder.open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/folder.open.gif -------------------------------------------------------------------------------- /www/icons/folder.sec.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/folder.sec.gif -------------------------------------------------------------------------------- /www/icons/forward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/forward.gif -------------------------------------------------------------------------------- /www/icons/generic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/generic.gif -------------------------------------------------------------------------------- /www/icons/generic.red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/generic.red.gif -------------------------------------------------------------------------------- /www/icons/generic.sec.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/generic.sec.gif -------------------------------------------------------------------------------- /www/icons/gnu-head-tiny.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/gnu-head-tiny.jpg -------------------------------------------------------------------------------- /www/icons/hand.right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/hand.right.gif -------------------------------------------------------------------------------- /www/icons/hand.up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/hand.up.gif -------------------------------------------------------------------------------- /www/icons/hrl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/hrl.gif -------------------------------------------------------------------------------- /www/icons/icon.sheet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/icon.sheet.gif -------------------------------------------------------------------------------- /www/icons/image1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/image1.gif -------------------------------------------------------------------------------- /www/icons/image2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/image2.gif -------------------------------------------------------------------------------- /www/icons/image3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/image3.gif -------------------------------------------------------------------------------- /www/icons/index.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/index.gif -------------------------------------------------------------------------------- /www/icons/layout.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/layout.gif -------------------------------------------------------------------------------- /www/icons/left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/left.gif -------------------------------------------------------------------------------- /www/icons/link.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/link.gif -------------------------------------------------------------------------------- /www/icons/mailman-large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/mailman-large.jpg -------------------------------------------------------------------------------- /www/icons/mailman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/mailman.jpg -------------------------------------------------------------------------------- /www/icons/movie.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/movie.gif -------------------------------------------------------------------------------- /www/icons/p.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/p.gif -------------------------------------------------------------------------------- /www/icons/patch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/patch.gif -------------------------------------------------------------------------------- /www/icons/pdf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pdf.gif -------------------------------------------------------------------------------- /www/icons/php4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/php4.gif -------------------------------------------------------------------------------- /www/icons/pie0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie0.gif -------------------------------------------------------------------------------- /www/icons/pie1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie1.gif -------------------------------------------------------------------------------- /www/icons/pie2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie2.gif -------------------------------------------------------------------------------- /www/icons/pie3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie3.gif -------------------------------------------------------------------------------- /www/icons/pie4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie4.gif -------------------------------------------------------------------------------- /www/icons/pie5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie5.gif -------------------------------------------------------------------------------- /www/icons/pie6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie6.gif -------------------------------------------------------------------------------- /www/icons/pie7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie7.gif -------------------------------------------------------------------------------- /www/icons/pie8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/pie8.gif -------------------------------------------------------------------------------- /www/icons/portal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/portal.gif -------------------------------------------------------------------------------- /www/icons/ps.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/ps.gif -------------------------------------------------------------------------------- /www/icons/quill.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/quill.gif -------------------------------------------------------------------------------- /www/icons/right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/right.gif -------------------------------------------------------------------------------- /www/icons/screw1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/screw1.gif -------------------------------------------------------------------------------- /www/icons/screw2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/screw2.gif -------------------------------------------------------------------------------- /www/icons/script.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/script.gif -------------------------------------------------------------------------------- /www/icons/small/README.txt: -------------------------------------------------------------------------------- 1 | 2 | These icons are provided as an alternative to the standard Apache 3 | icon graphics. All graphics in this directory, with the exception 4 | of rainbow.gif, are 16x16 pixels in size, rather than the 20x22 5 | dimension icons which are the normal defaults for Apache and are 6 | in the parent directory of this one. 7 | -------------------------------------------------------------------------------- /www/icons/small/back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/back.gif -------------------------------------------------------------------------------- /www/icons/small/binary.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/binary.gif -------------------------------------------------------------------------------- /www/icons/small/binhex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/binhex.gif -------------------------------------------------------------------------------- /www/icons/small/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/blank.gif -------------------------------------------------------------------------------- /www/icons/small/broken.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/broken.gif -------------------------------------------------------------------------------- /www/icons/small/burst.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/burst.gif -------------------------------------------------------------------------------- /www/icons/small/comp1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/comp1.gif -------------------------------------------------------------------------------- /www/icons/small/comp2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/comp2.gif -------------------------------------------------------------------------------- /www/icons/small/compressed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/compressed.gif -------------------------------------------------------------------------------- /www/icons/small/continued.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/continued.gif -------------------------------------------------------------------------------- /www/icons/small/dir.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/dir.gif -------------------------------------------------------------------------------- /www/icons/small/dir2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/dir2.gif -------------------------------------------------------------------------------- /www/icons/small/doc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/doc.gif -------------------------------------------------------------------------------- /www/icons/small/forward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/forward.gif -------------------------------------------------------------------------------- /www/icons/small/generic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/generic.gif -------------------------------------------------------------------------------- /www/icons/small/generic2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/generic2.gif -------------------------------------------------------------------------------- /www/icons/small/generic3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/generic3.gif -------------------------------------------------------------------------------- /www/icons/small/image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/image.gif -------------------------------------------------------------------------------- /www/icons/small/image2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/image2.gif -------------------------------------------------------------------------------- /www/icons/small/index.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/index.gif -------------------------------------------------------------------------------- /www/icons/small/key.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/key.gif -------------------------------------------------------------------------------- /www/icons/small/movie.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/movie.gif -------------------------------------------------------------------------------- /www/icons/small/patch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/patch.gif -------------------------------------------------------------------------------- /www/icons/small/ps.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/ps.gif -------------------------------------------------------------------------------- /www/icons/small/rainbow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/rainbow.gif -------------------------------------------------------------------------------- /www/icons/small/sound.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/sound.gif -------------------------------------------------------------------------------- /www/icons/small/sound2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/sound2.gif -------------------------------------------------------------------------------- /www/icons/small/tar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/tar.gif -------------------------------------------------------------------------------- /www/icons/small/text.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/text.gif -------------------------------------------------------------------------------- /www/icons/small/transfer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/transfer.gif -------------------------------------------------------------------------------- /www/icons/small/unknown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/unknown.gif -------------------------------------------------------------------------------- /www/icons/small/uu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/small/uu.gif -------------------------------------------------------------------------------- /www/icons/sound1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/sound1.gif -------------------------------------------------------------------------------- /www/icons/sound2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/sound2.gif -------------------------------------------------------------------------------- /www/icons/sphere1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/sphere1.gif -------------------------------------------------------------------------------- /www/icons/sphere2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/sphere2.gif -------------------------------------------------------------------------------- /www/icons/tar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/tar.gif -------------------------------------------------------------------------------- /www/icons/tex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/tex.gif -------------------------------------------------------------------------------- /www/icons/text.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/text.gif -------------------------------------------------------------------------------- /www/icons/transfer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/transfer.gif -------------------------------------------------------------------------------- /www/icons/unknown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/unknown.gif -------------------------------------------------------------------------------- /www/icons/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/up.gif -------------------------------------------------------------------------------- /www/icons/uu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/uu.gif -------------------------------------------------------------------------------- /www/icons/uuencoded.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/uuencoded.gif -------------------------------------------------------------------------------- /www/icons/world1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/world1.gif -------------------------------------------------------------------------------- /www/icons/world2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/world2.gif -------------------------------------------------------------------------------- /www/icons/yaws.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/yaws.gif -------------------------------------------------------------------------------- /www/icons/yawsY.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/yawsY.gif -------------------------------------------------------------------------------- /www/icons/yaws_head.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/yaws_head.gif -------------------------------------------------------------------------------- /www/icons/yaws_pb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/yaws_pb.gif -------------------------------------------------------------------------------- /www/icons/yaws_y.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/icons/yaws_y.gif -------------------------------------------------------------------------------- /www/multiple_accept_headers.yaws: -------------------------------------------------------------------------------- 1 | 2 | %% @doc Extract the first mime-type from the Accept header list and respond 3 | %% with it as Content-Type header. 4 | out(A) -> 5 | AcceptHdr = yaws_api:headers_accept(yaws_api:arg_headers(A)), 6 | [ContentType|_] = string:tokens(AcceptHdr, ","), 7 | 8 | [{status, 200}, 9 | {header, {"Content-Type", ContentType}}, 10 | {header, {"X-Test-Request-Accept", AcceptHdr}}]. 11 | 12 | -------------------------------------------------------------------------------- /www/process_tree.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/process_tree.dia -------------------------------------------------------------------------------- /www/process_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/process_tree.png -------------------------------------------------------------------------------- /www/redirect2.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | %% redirect2.yaws 4 | 5 | out(_Arg) -> 6 | L="https://www.google.com/search?num=20&hl=en&lr=lang_en%7Clang_sv&q=yaws", 7 | {redirect, L}. 8 | 9 | -------------------------------------------------------------------------------- /www/redirect3.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | %% redirect 3 yaws 4 | 5 | out(_Arg) -> 6 | {redirect_local, "/redirect2.yaws"}. 7 | 8 | -------------------------------------------------------------------------------- /www/redirect4.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | %% redirect4.yaws 4 | 5 | out(_Arg) -> 6 | {redirect_local, {any_path, "redirect2.yaws"}}. 7 | 8 | -------------------------------------------------------------------------------- /www/server_sent_events.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 12 | 13 | 14 |
15 |

Yaws Server-Sent Events Time of Day

16 |

17 |

18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /www/session.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(A) -> 3 | {ssi, "TAB.inc", "%%",[{"session", "choosen"}]}. 4 | 5 | 6 |
7 | 8 | 9 |

The session server

10 |

11 | The Yaws session server is ideal (and recommended) 12 | for maintaining cookie state 13 | in a server side application. 14 |

15 | 16 |

The code in session1.yaws 17 | shows a minimalistic way to handle sessions. 18 | To run it click here 19 |

20 | 21 |

22 | The actual session API is documented in the man page for yaws_api. 23 |

24 | 25 |
26 | 27 | 28 | 29 | out(A) -> {ssi, "END2",[],[]}. 30 | 31 | 32 | -------------------------------------------------------------------------------- /www/shoppingcart/buy.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case shopcart:top(A) of 5 | ok -> 6 | shopcart:buy(A); 7 | X -> 8 | X 9 | end. 10 | 11 | 12 | -------------------------------------------------------------------------------- /www/shoppingcart/index.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case shopcart:top(A) of 5 | ok -> 6 | shopcart:index(A); 7 | X -> 8 | X 9 | end. 10 | 11 | 12 | -------------------------------------------------------------------------------- /www/shoppingcart/junk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/shoppingcart/junk.png -------------------------------------------------------------------------------- /www/shoppingcart/loginpost.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | out(A) -> 5 | shopcart:loginpost(A). 6 | 7 | 8 | -------------------------------------------------------------------------------- /www/shoppingcart/logout.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | out(A) -> 5 | case shopcart:top(A) of 6 | ok -> 7 | shopcart:logout(A); 8 | X -> 9 | X 10 | end. 11 | 12 | 13 | -------------------------------------------------------------------------------- /www/shoppingcart/shopcart_form.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | case shopcart:top(A) of 5 | ok -> 6 | shopcart:formupdate(A); 7 | X -> 8 | X 9 | end. 10 | 11 | 12 | -------------------------------------------------------------------------------- /www/simple_ex1.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello world

4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /www/simple_ex2.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Yesssssss

5 | 6 | 7 | out(Arg) -> {html, "

Hello again

"}. 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /www/simple_ex3.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Yesssssss

5 | 6 | 7 | out(Arg) -> {ehtml, [{h2, [{class, "foo"}], "Hello yet again"}]}. 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /www/simple_ex4.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

simple ex 3

5 | 6 | 7 | out(Arg) -> {html, f("Printing the arg structure :" 8 | "~n
~p~n
~n", [Arg])}. 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /www/small.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(_) -> {html, "XXXX"}. 3 | 4 | -------------------------------------------------------------------------------- /www/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/spacer.gif -------------------------------------------------------------------------------- /www/ssi/dynamic.1: -------------------------------------------------------------------------------- 1 | 2 |

Foobar

3 | 4 | 5 | 6 | out(Arg) -> 7 | {html, "Funky Stuff"}. 8 | 9 | 10 | 11 |

Baz

12 | 13 | 14 | -------------------------------------------------------------------------------- /www/ssi/dynamic.2: -------------------------------------------------------------------------------- 1 | -record(arg, { 2 | clisock, %% the socket leading to the peer client 3 | headers, %% #headers{} record 4 | req, %% #http_request{} record 5 | clidata, %% The client data (as a binary in POST requests) 6 | querydata, %% Was the URL on the form of ....?query (GET reqs) 7 | docroot, %% where is the data 8 | fullpath, %% absolute path to requested yaws file 9 | server_path, %% The normalized server path 10 | pid, %% pid of the yaws worker process 11 | opaque %% useful to pass static data 12 | 13 | }). 14 | 15 | 16 | -------------------------------------------------------------------------------- /www/ssi/dynamic.3: -------------------------------------------------------------------------------- 1 | 2 | -record(http_request, {method, 3 | path, 4 | version}). 5 | 6 | 7 | -record(headers, { 8 | connection, 9 | accept, 10 | host, 11 | if_modified_since, 12 | if_match, 13 | if_none_match, 14 | if_range, 15 | if_unmodified_since, 16 | range, 17 | referer, 18 | user_agent, 19 | accept_ranges, 20 | cookie = [], 21 | keep_alive, 22 | content_length}). 23 | 24 | -------------------------------------------------------------------------------- /www/ssi_ex1: -------------------------------------------------------------------------------- 1 | variable a = %a% 2 | -------------------------------------------------------------------------------- /www/static.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Hyber 7 | 8 | 10 | 11 | 12 | HYBER LOGO 13 |

nano content

14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /www/testdir/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erlyaws/yaws/bacff31d6ae6965b20622a1e193f386a6fe60068/www/testdir/index.html -------------------------------------------------------------------------------- /www/upload0.yaws: -------------------------------------------------------------------------------- 1 | 2 | 3 | out(A) -> 4 | [{ssi, "TAB.inc", "%%",[{"upload0", "choosen"}]}, 5 | {ehtml, 6 | {html, [], 7 | {'div',[{id, "entry"}], 8 | [{h1, [], "Upload a file to the webserver"}, 9 | {p, [], ["The code that parses the multipart form data resides in ", 10 | {a, [{href, "code.yaws?file=/upload.yaws"}], "upload.yaws"}, 11 | "."]}, 12 | {br,[],[]}, 13 | {hr,[],[]}, 14 | {form, [{enctype, "multipart/form-data"}, 15 | {method, post}, 16 | {action, "/upload.yaws"} 17 | ], 18 | [{input, [{type, submit}, {value, "Upload"}] ,[]}, 19 | {input, [{type,file}, {width, "50"}, {name, "foo"}], []} 20 | ]}]}}}, 21 | {ssi, "END2",[],[]}]. 22 | 23 | 24 | -------------------------------------------------------------------------------- /www/websockets_autobahn_endpoint.yaws: -------------------------------------------------------------------------------- 1 | 2 | out(A) -> 3 | CallbackMod = advanced_echo_callback, 4 | InitialState = {state, none, <<>>}, 5 | Opts = [{callback, {advanced, InitialState}}], 6 | {websocket, CallbackMod, Opts}. 7 | 8 | -------------------------------------------------------------------------------- /www/yaws-1.55_to_1.56.patch: -------------------------------------------------------------------------------- 1 | 2 | Index: yaws_api.erl 3 | =================================================================== 4 | RCS file: /cvsroot/erlyaws/yaws/src/yaws_api.erl,v 5 | retrieving revision 1.126 6 | retrieving revision 1.128 7 | diff -u -b -r1.126 -r1.128 8 | --- yaws_api.erl 16 May 2005 21:12:03 -0000 1.126 9 | +++ yaws_api.erl 16 Jun 2005 11:36:57 -0000 1.128 10 | @@ -741,11 +741,14 @@ 11 | 12 | url_decode_q_split([$%, Hi, Lo | Tail], Ack) -> 13 | Hex = yaws:hex_to_integer([Hi, Lo]), 14 | + if Hex == 0 -> exit(badurl); 15 | + true -> ok 16 | + end, 17 | url_decode_q_split(Tail, [Hex|Ack]); 18 | url_decode_q_split([$?|T], Ack) -> 19 | %% Don't decode the query string here, that is parsed separately. 20 | {path_norm_reverse(Ack), T}; 21 | -url_decode_q_split([H|T], Ack) -> 22 | +url_decode_q_split([H|T], Ack) when H /= 0 -> 23 | url_decode_q_split(T, [H|Ack]); 24 | url_decode_q_split([], Ack) -> 25 | {path_norm_reverse(Ack), []}. 26 | 27 | -------------------------------------------------------------------------------- /www/ybed.erl: -------------------------------------------------------------------------------- 1 | -module(ybed). 2 | -compile(nowarn_export_all). 3 | -compile(export_all). 4 | 5 | start() -> 6 | {ok, spawn_link(?MODULE, run, [])}. 7 | 8 | run() -> 9 | Id = "embedded", 10 | GconfList = [{id, Id}], 11 | Docroot = "/tmp", 12 | SconfList = [{port, 8888}, 13 | {servername, "foobar"}, 14 | {listen, {0,0,0,0}}, 15 | {docroot, Docroot}], 16 | {ok, SCList, GC, ChildSpecs} = 17 | yaws_api:embedded_start_conf(Docroot, SconfList, GconfList, Id), 18 | [supervisor:start_child(ybed_sup, Ch) || Ch <- ChildSpecs], 19 | yaws_api:setconf(GC, SCList), 20 | exit(normal). 21 | -------------------------------------------------------------------------------- /www/ybed_sup.erl: -------------------------------------------------------------------------------- 1 | -module(ybed_sup). 2 | -behaviour(supervisor). 3 | 4 | %% API 5 | -export([start_link/0]). 6 | 7 | %% Supervisor callbacks 8 | -export([init/1]). 9 | 10 | start_link() -> 11 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 12 | 13 | init([]) -> 14 | YBed = {ybed, {ybed,start,[]}, 15 | temporary,2000,worker,[ybed]}, 16 | {ok,{{one_for_all,0,1}, [YBed]}}. 17 | -------------------------------------------------------------------------------- /yaws.pc.in: -------------------------------------------------------------------------------- 1 | ## 2 | ## yaws.pc: pkg-config(1) specification 3 | ## 4 | 5 | prefix=@prefix@ 6 | exec_prefix=${prefix} 7 | libdir=${exec_prefix}/lib/yaws/ebin 8 | includedir=${prefix}/lib/yaws/include 9 | 10 | Name: yaws 11 | Description: Yet Another Web Server 12 | Version: @YAWS_VSN@ 13 | URL: https://erlyaws.github.io/ 14 | Libs: -pa ${libdir} 15 | Cflags: -I${includedir} 16 | --------------------------------------------------------------------------------