diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..c1e66d77 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,142 @@ +# Contributing to this project + +Please take a moment to review this document in order to make the contribution +process easy and effective for everyone involved. + +Following these guidelines helps to communicate that you respect the time of +the developers managing and developing this open source project. In return, +they should reciprocate that respect in addressing your issue or assessing +patches and features. + + +## Using the issue tracker + +The issue tracker is the preferred channel for [bug reports](#bugs), +[features requests](#features) and [submitting pull +requests](#pull-requests), but please respect the following restrictions: + +* Please **do not** use the issue tracker for personal support requests (use + [Stack Overflow](http://stackoverflow.com) or IRC). + +* Please **do not** derail or troll issues. Keep the discussion on topic and + respect the opinions of others. + + + +## Bug reports + +A bug is a _demonstrable problem_ that is caused by the code in the repository. +Good bug reports are extremely helpful - thank you! + +Guidelines for bug reports: + +1. **Use the GitHub issue search** — check if the issue has already been + reported. + +2. **Check if the issue has been fixed** — try to reproduce it using the + latest `master` or development branch in the repository. + +3. **Isolate the problem** — ideally create a [reduced test + case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. + +A good bug report shouldn't leave others needing to chase you up for more +information. Please try to be as detailed as possible in your report. What is +your environment? What steps will reproduce the issue? What browser(s) and OS +experience the problem? What would you expect to be the outcome? All these +details will help people to fix any potential bugs. + +Example: + +> Short and descriptive example bug report title +> +> A summary of the issue and the browser/OS environment in which it occurs. If +> suitable, include the steps required to reproduce the bug. +> +> 1. This is the first step +> 2. This is the second step +> 3. Further steps, etc. +> +> `` - a link to the reduced test case +> +> Any other information you want to share that is relevant to the issue being +> reported. This might include the lines of code that you have identified as +> causing the bug, and potential solutions (and your opinions on their +> merits). + + + +## Feature requests + +Feature requests are welcome. But take a moment to find out whether your idea +fits with the scope and aims of the project. It's up to *you* to make a strong +case to convince the project's developers of the merits of this feature. Please +provide as much detail and context as possible. + + + +## Pull requests + +Good pull requests - patches, improvements, new features - are a fantastic +help. They should remain focused in scope and avoid containing unrelated +commits. + +**Please ask first** before embarking on any significant pull request (e.g. +implementing features, refactoring code, porting to a different language), +otherwise you risk spending a lot of time working on something that the +project's developers might not want to merge into the project. + +Please adhere to the coding conventions used throughout a project (indentation, +accurate comments, etc.) and any other requirements (such as test coverage). + +Adhering to the following this process is the best way to get your work +included in the project: + +1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, + and configure the remotes: + + ```bash + # Clone your fork of the repo into the current directory + git clone https://github.com// + # Navigate to the newly cloned directory + cd + # Assign the original repo to a remote called "upstream" + git remote add upstream https://github.com// + ``` + +2. If you cloned a while ago, get the latest changes from upstream: + + ```bash + git checkout + git pull upstream + ``` + +3. Create a new topic branch (off the main project development branch) to + contain your feature, change, or fix: + + ```bash + git checkout -b + ``` + +4. Commit your changes in logical chunks. Please adhere to these [git commit + message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) + or your code is unlikely be merged into the main project. Use Git's + [interactive rebase](https://help.github.com/articles/interactive-rebase) + feature to tidy up your commits before making them public. + +5. Locally merge (or rebase) the upstream development branch into your topic branch: + + ```bash + git pull [--rebase] upstream + ``` + +6. Push your topic branch up to your fork: + + ```bash + git push origin + ``` + +7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) + with a clear title and description. + +**IMPORTANT**: By submitting a patch, you agree to allow the project owner to +license your work under the same license as that used by the project. diff --git a/README.md b/README.md index 282d281e..53ef5ca0 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,15 @@ Using git ## Examples .. +## Contributing to this project + +Anyone and everyone is welcome to contribute. Please take a moment to +review the [guidelines for contributing](CONTRIBUTING.md). + +* [Bug reports](CONTRIBUTING.md#bugs) +* [Feature requests](CONTRIBUTING.md#features) +* [Pull requests](CONTRIBUTING.md#pull-requests) + For more information please have a look at the related wiki: * https://github.com/EiffelWebFramework/EWF/wiki diff --git a/library/server/wsf/extension/filter/wsf_debug_filter.e b/library/server/wsf/extension/filter/wsf_debug_filter.e new file mode 100644 index 00000000..6563f425 --- /dev/null +++ b/library/server/wsf/extension/filter/wsf_debug_filter.e @@ -0,0 +1,117 @@ +note + description: "Summary description for {WSF_DEBUG_FILTER}." + date: "$Date: 2013-05-23 21:54:29 +0200 (jeu., 23 mai 2013) $" + revision: "$Revision: 92585 $" + +class + WSF_DEBUG_FILTER + +inherit + WSF_FILTER + +create + default_create, + make + +feature {NONE} -- Initialization + + make (a_output: FILE) + do + output := a_output + end + + output: detachable FILE + +feature -- Basic operations + + execute (req: WSF_REQUEST; res: WSF_RESPONSE) + -- Execute the filter + local + s: STRING_8 + do + create s.make (2048) + if attached req.content_type as l_type then + s.append ("[length=") + s.append_natural_64 (req.content_length_value) + s.append_character (']') + s.append_character (' ') + s.append (l_type.debug_output) + s.append_character ('%N') + end + + append_iterable_to ("Path parameters", req.path_parameters, s) + append_iterable_to ("Query parameters", req.query_parameters, s) + append_iterable_to ("Form parameters", req.form_parameters, s) + + if not s.is_empty then + s.prepend ("**DEBUG**%N") + if attached output as o then + o.put_string (s) + else + res.put_error (s) + end + end + execute_next (req, res) + end + + append_iterable_to (a_title: READABLE_STRING_8; it: detachable ITERABLE [WSF_VALUE]; s: STRING_8) + local + n: INTEGER + do + if it /= Void then + across it as c loop + n := n + 1 + end + if n > 0 then + s.append (a_title) + s.append_character (':') + s.append_character ('%N') + across + it as c + loop + s.append (" - ") + s.append (c.item.url_encoded_name) + s.append_character (' ') + s.append_character ('{') + s.append (c.item.generating_type) + s.append_character ('}') + s.append_character ('=') + s.append (c.item.debug_output.as_string_8) + s.append_character ('%N') + end + end + end + end + +note + copyright: "Copyright (c) 1984-2013, Eiffel Software" + license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" + licensing_options: "http://www.eiffel.com/licensing" + copying: "[ + This file is part of Eiffel Software's Eiffel Development Environment. + + Eiffel Software's Eiffel Development Environment is free + software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published + by the Free Software Foundation, version 2 of the License + (available at the URL listed under "license" above). + + Eiffel Software's Eiffel Development Environment is + distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with Eiffel Software's Eiffel Development + Environment; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + ]" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" +end diff --git a/library/server/wsf/extension/handler/wsf_debug_handler.e b/library/server/wsf/extension/handler/wsf_debug_handler.e new file mode 100644 index 00000000..196a3aff --- /dev/null +++ b/library/server/wsf/extension/handler/wsf_debug_handler.e @@ -0,0 +1,174 @@ +note + description: "Summary description for {WSF_DEBUG_HANDLER}." + author: "" + date: "$Date: 2013-06-28 16:14:02 +0200 (ven., 28 juin 2013) $" + revision: "$Revision: 92754 $" + +class + WSF_DEBUG_HANDLER + +inherit + WSF_STARTS_WITH_HANDLER + rename + execute as execute_starts_with + end + + WSF_SELF_DOCUMENTED_HANDLER + + SHARED_HTML_ENCODER + + SHARED_WSF_PERCENT_ENCODER + rename + percent_encoder as url_encoder + export + {NONE} all + end + + SHARED_EXECUTION_ENVIRONMENT + export + {NONE} all + end + +create + make, + make_hidden + +feature {NONE} -- Initialization + + make + do + end + + make_hidden + do + make + is_hidden := True + end + + is_hidden: BOOLEAN + -- Current mapped handler should be hidden from self documentation + +feature -- Documentation + + mapping_documentation (m: WSF_ROUTER_MAPPING; a_request_methods: detachable WSF_REQUEST_METHODS): WSF_ROUTER_MAPPING_DOCUMENTATION + -- + do + create Result.make (m) + Result.set_is_hidden (is_hidden) + Result.add_description ("Debug handler (mainly to return request information)") + end + +feature -- Access + + execute_starts_with (a_path: READABLE_STRING_8; req: WSF_REQUEST; res: WSF_RESPONSE) + local + s: STRING_8 + p: WSF_PAGE_RESPONSE + v: STRING_8 + do + if (create {RT_DEBUGGER}).rt_workbench_wait_for_debugger (1050) then + end + create s.make (2048) + s.append ("**DEBUG**%N") + req.set_raw_input_data_recorded (True) + + append_iterable_to ("Meta variables:", req.meta_variables, s) + s.append_character ('%N') + + append_iterable_to ("Path parameters", req.path_parameters, s) + s.append_character ('%N') + + append_iterable_to ("Query parameters", req.query_parameters, s) + s.append_character ('%N') + + append_iterable_to ("Form parameters", req.form_parameters, s) + s.append_character ('%N') + + if attached req.content_type as l_type then + s.append ("Content: type=" + l_type.debug_output) + s.append (" length=") + s.append_natural_64 (req.content_length_value) + s.append_character ('%N') + create v.make (req.content_length_value.to_integer_32) + req.read_input_data_into (v) + across + v.split ('%N') as v_cursor + loop + s.append (" |") + s.append (v_cursor.item) + s.append_character ('%N') + end + end + + create p.make_with_body (s) + p.header.put_content_type_text_plain + res.send (p) + + end + +feature {NONE} -- Implementation + + append_iterable_to (a_title: READABLE_STRING_8; it: detachable ITERABLE [WSF_VALUE]; s: STRING_8) + local + n: INTEGER + t: READABLE_STRING_8 + v: READABLE_STRING_8 + do + s.append (a_title) + s.append_character (':') + if it /= Void then + across it as c loop + n := n + 1 + end + if n = 0 then + s.append (" empty") + s.append_character ('%N') + else + s.append_character ('%N') + across + it as c + loop + s.append (" - ") + s.append (c.item.url_encoded_name) + t := c.item.generating_type + if t.same_string ("WSF_STRING") then + else + s.append_character (' ') + s.append_character ('{') + s.append (t) + s.append_character ('}') + end + s.append_character ('=') + v := c.item.string_representation.as_string_8 + if v.has ('%N') then + s.append_character ('%N') + across + v.split ('%N') as v_cursor + loop + s.append (" |") + s.append (v_cursor.item) + s.append_character ('%N') + end + else + s.append (v) + s.append_character ('%N') + end + end + end + else + s.append (" none") + s.append_character ('%N') + end + end + +note + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" +end diff --git a/library/server/wsf/extension/wsf_handler_helper.e b/library/server/wsf/extension/handler/wsf_handler_helper.e similarity index 100% rename from library/server/wsf/extension/wsf_handler_helper.e rename to library/server/wsf/extension/handler/wsf_handler_helper.e diff --git a/library/server/wsf/extension/wsf_handler_routes_recorder.e b/library/server/wsf/extension/handler/wsf_handler_routes_recorder.e similarity index 100% rename from library/server/wsf/extension/wsf_handler_routes_recorder.e rename to library/server/wsf/extension/handler/wsf_handler_routes_recorder.e diff --git a/library/server/wsf/extension/wsf_method_handler.e b/library/server/wsf/extension/handler/wsf_method_handler.e similarity index 100% rename from library/server/wsf/extension/wsf_method_handler.e rename to library/server/wsf/extension/handler/wsf_method_handler.e diff --git a/library/server/wsf/extension/wsf_method_handlers.e b/library/server/wsf/extension/handler/wsf_method_handlers.e similarity index 100% rename from library/server/wsf/extension/wsf_method_handlers.e rename to library/server/wsf/extension/handler/wsf_method_handlers.e diff --git a/library/server/wsf/extension/wsf_resource_context_handler_helper.e b/library/server/wsf/extension/handler/wsf_resource_context_handler_helper.e similarity index 100% rename from library/server/wsf/extension/wsf_resource_context_handler_helper.e rename to library/server/wsf/extension/handler/wsf_resource_context_handler_helper.e diff --git a/library/server/wsf/extension/wsf_resource_handler_helper.e b/library/server/wsf/extension/handler/wsf_resource_handler_helper.e similarity index 100% rename from library/server/wsf/extension/wsf_resource_handler_helper.e rename to library/server/wsf/extension/handler/wsf_resource_handler_helper.e diff --git a/library/server/wsf/license.lic b/library/server/wsf/license.lic index 27384d13..b6e9ed5e 100644 --- a/library/server/wsf/license.lic +++ b/library/server/wsf/license.lic @@ -1,5 +1,5 @@ ${NOTE_KEYWORD} - copyright: "2011-${YEAR}, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-${YEAR}, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/policy_driven/wsf_delete_helper.e b/library/server/wsf/policy_driven/wsf_delete_helper.e index 15f08204..ab397feb 100644 --- a/library/server/wsf/policy_driven/wsf_delete_helper.e +++ b/library/server/wsf/policy_driven/wsf_delete_helper.e @@ -13,7 +13,7 @@ inherit WSF_METHOD_HELPER feature {NONE} -- Implementation - + send_response (req: WSF_REQUEST; res: WSF_RESPONSE; a_handler: WSF_SKELETON_HANDLER; a_header: HTTP_HEADER; a_new_resource: BOOLEAN) -- Write response to deletion of resource named by `req' into `res'. -- Upto four execution variables may be set on `req': @@ -63,4 +63,14 @@ feature {NONE} -- Implementation end end +note + copyright: "2011-2013, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" end diff --git a/library/server/wsf/policy_driven/wsf_get_helper.e b/library/server/wsf/policy_driven/wsf_get_helper.e index 666518e2..909f52c4 100644 --- a/library/server/wsf/policy_driven/wsf_get_helper.e +++ b/library/server/wsf/policy_driven/wsf_get_helper.e @@ -60,7 +60,7 @@ feature {NONE} -- Implementation end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/policy_driven/wsf_method_helper.e b/library/server/wsf/policy_driven/wsf_method_helper.e index 3f3037e8..1cc62157 100644 --- a/library/server/wsf/policy_driven/wsf_method_helper.e +++ b/library/server/wsf/policy_driven/wsf_method_helper.e @@ -586,7 +586,7 @@ feature -- Error reporting end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/policy_driven/wsf_method_helper_factory.e b/library/server/wsf/policy_driven/wsf_method_helper_factory.e index 633599b6..9183d624 100644 --- a/library/server/wsf/policy_driven/wsf_method_helper_factory.e +++ b/library/server/wsf/policy_driven/wsf_method_helper_factory.e @@ -30,7 +30,7 @@ feature -- Factory end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/policy_driven/wsf_post_helper.e b/library/server/wsf/policy_driven/wsf_post_helper.e index 96ae57a4..d6d42d0d 100644 --- a/library/server/wsf/policy_driven/wsf_post_helper.e +++ b/library/server/wsf/policy_driven/wsf_post_helper.e @@ -68,7 +68,7 @@ feature {NONE} -- Implementation end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/policy_driven/wsf_put_helper.e b/library/server/wsf/policy_driven/wsf_put_helper.e index 41095b67..93bf5921 100644 --- a/library/server/wsf/policy_driven/wsf_put_helper.e +++ b/library/server/wsf/policy_driven/wsf_put_helper.e @@ -70,7 +70,7 @@ feature {NONE} -- Implementation end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/policy_driven/wsf_skeleton_handler.e b/library/server/wsf/policy_driven/wsf_skeleton_handler.e index 60ebf617..e2c92fb2 100644 --- a/library/server/wsf/policy_driven/wsf_skeleton_handler.e +++ b/library/server/wsf/policy_driven/wsf_skeleton_handler.e @@ -536,9 +536,8 @@ feature {NONE} -- Implementation body_sent: res.message_committed and then res.transfered_content_length > 0 end - note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/router/filter/wsf_cors_filter.e b/library/server/wsf/router/filter/wsf_cors_filter.e index 75db6afe..48ec1bc1 100644 --- a/library/server/wsf/router/filter/wsf_cors_filter.e +++ b/library/server/wsf/router/filter/wsf_cors_filter.e @@ -20,7 +20,7 @@ feature -- Basic operations do create l_header.make l_header.put_access_control_allow_all_origin - res.put_header_text (l_header.string) + res.put_header_lines (l_header) execute_next (req, res) end diff --git a/library/server/wsf/router/filter/wsf_custom_header_filter.e b/library/server/wsf/router/filter/wsf_custom_header_filter.e new file mode 100644 index 00000000..57933ade --- /dev/null +++ b/library/server/wsf/router/filter/wsf_custom_header_filter.e @@ -0,0 +1,66 @@ +note + description: "Summary description for {WSF_CUSTOM_HEADER_FILTER}." + date: "$Date: 2013-05-23 21:54:29 +0200 (jeu., 23 mai 2013) $" + revision: "$Revision: 92585 $" + +class + WSF_CUSTOM_HEADER_FILTER + +inherit + WSF_FILTER + +create + make + +feature {NONE} -- Initialization + + make (n: INTEGER) + do + create custom_header.make_with_count (n) + end + +feature -- Access + + custom_header: HTTP_HEADER + +feature -- Basic operations + + execute (req: WSF_REQUEST; res: WSF_RESPONSE) + -- Execute the filter + do + res.put_header_lines (custom_header) + execute_next (req, res) + end + +note + copyright: "Copyright (c) 1984-2013, Eiffel Software" + license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" + licensing_options: "http://www.eiffel.com/licensing" + copying: "[ + This file is part of Eiffel Software's Eiffel Development Environment. + + Eiffel Software's Eiffel Development Environment is free + software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published + by the Free Software Foundation, version 2 of the License + (available at the URL listed under "license" above). + + Eiffel Software's Eiffel Development Environment is + distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with Eiffel Software's Eiffel Development + Environment; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + ]" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" +end diff --git a/library/server/wsf/router/policy/service/wsf_routed_skeleton_service.e b/library/server/wsf/router/policy/service/wsf_routed_skeleton_service.e index e9eddb59..df05e4ea 100644 --- a/library/server/wsf/router/policy/service/wsf_routed_skeleton_service.e +++ b/library/server/wsf/router/policy/service/wsf_routed_skeleton_service.e @@ -275,7 +275,7 @@ invariant unavailability_duration_xor_unavailable_until: unavailability_duration > 0 implies unavailable_until = Void ;note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/router/policy/wsf_caching_policy.e b/library/server/wsf/router/policy/wsf_caching_policy.e index 35f104de..664e0b80 100644 --- a/library/server/wsf/router/policy/wsf_caching_policy.e +++ b/library/server/wsf/router/policy/wsf_caching_policy.e @@ -125,7 +125,7 @@ feature -- Access end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/router/policy/wsf_no_proxy_policy.e b/library/server/wsf/router/policy/wsf_no_proxy_policy.e index 36aa4d7e..bfab6802 100644 --- a/library/server/wsf/router/policy/wsf_no_proxy_policy.e +++ b/library/server/wsf/router/policy/wsf_no_proxy_policy.e @@ -6,7 +6,7 @@ note Users of this policy cannot safely use chunked transfer-encoding, or any HTTP/1.1-specific features. So best used only for examples. ]" - + date: "$Date$" revision: "$Revision$" @@ -18,7 +18,7 @@ inherit redefine requires_proxy end - + feature -- Access requires_proxy (req: WSF_REQUEST): BOOLEAN @@ -33,4 +33,14 @@ feature -- Access -- doesn't meet the postcondition, but the precondition is never true. end +note + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" end diff --git a/library/server/wsf/router/policy/wsf_options_policy.e b/library/server/wsf/router/policy/wsf_options_policy.e index 418ea12b..f2d85880 100644 --- a/library/server/wsf/router/policy/wsf_options_policy.e +++ b/library/server/wsf/router/policy/wsf_options_policy.e @@ -34,4 +34,14 @@ feature -- Basic operations res.put_header_text (h.string) end +note + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" end diff --git a/library/server/wsf/router/policy/wsf_previous_policy.e b/library/server/wsf/router/policy/wsf_previous_policy.e index c77f0746..1997a740 100644 --- a/library/server/wsf/router/policy/wsf_previous_policy.e +++ b/library/server/wsf/router/policy/wsf_previous_policy.e @@ -51,7 +51,7 @@ feature -- Access end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/router/policy/wsf_proxy_use_policy.e b/library/server/wsf/router/policy/wsf_proxy_use_policy.e index a0dc8b31..ea94684b 100644 --- a/library/server/wsf/router/policy/wsf_proxy_use_policy.e +++ b/library/server/wsf/router/policy/wsf_proxy_use_policy.e @@ -51,7 +51,7 @@ feature -- Access end note - copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/router/policy/wsf_system_options_access_policy.e b/library/server/wsf/router/policy/wsf_system_options_access_policy.e index 6915af52..29790f7c 100644 --- a/library/server/wsf/router/policy/wsf_system_options_access_policy.e +++ b/library/server/wsf/router/policy/wsf_system_options_access_policy.e @@ -15,7 +15,7 @@ note date: "$Date$" revision: "$Revision$" - + class WSF_SYSTEM_OPTIONS_ACCESS_POLICY feature -- Access @@ -23,7 +23,7 @@ feature -- Access is_system_options_forbidden (req: WSF_REQUEST): BOOLEAN -- Should we return 403 Forbidden in response to OPTIONS * requests? require - req_attached: req /= Void + req_attached: req /= Void do -- by default, unconditionally no. end @@ -37,4 +37,14 @@ feature -- Access Result := "OPTIONS * is not permitted" end +note + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" end diff --git a/library/server/wsf/src/response/wsf_method_not_allowed_response.e b/library/server/wsf/src/response/wsf_method_not_allowed_response.e index 4b33868a..7124577b 100644 --- a/library/server/wsf/src/response/wsf_method_not_allowed_response.e +++ b/library/server/wsf/src/response/wsf_method_not_allowed_response.e @@ -148,8 +148,10 @@ feature {WSF_RESPONSE} -- Output - + ") s.append ("
") s.append ("
") s.append ("
") diff --git a/library/server/wsf/src/response/wsf_page_response.e b/library/server/wsf/src/response/wsf_page_response.e index 4a11bbbb..ced6ba75 100644 --- a/library/server/wsf/src/response/wsf_page_response.e +++ b/library/server/wsf/src/response/wsf_page_response.e @@ -98,14 +98,14 @@ feature {WSF_RESPONSE} -- Output h.put_content_type_text_plain end end - res.put_header_text (h.string) + res.put_header_lines (h) if b /= Void then res.put_string (b) end end note - copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/src/service/wsf_service.e b/library/server/wsf/src/service/wsf_service.e index 38aef9ac..e8cb4e0b 100644 --- a/library/server/wsf/src/service/wsf_service.e +++ b/library/server/wsf/src/service/wsf_service.e @@ -20,14 +20,6 @@ feature -- Execution deferred end -feature -- Conversion - - to_wgi_service: WGI_SERVICE - -- Adapt Current WSF Service to plug into WGI component - do - create {WSF_TO_WGI_SERVICE} Result.make_from_service (Current) - end - note copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" diff --git a/library/server/wsf/wsf_extension-safe.ecf b/library/server/wsf/wsf_extension-safe.ecf index 7a111faa..1c14fc5d 100644 --- a/library/server/wsf/wsf_extension-safe.ecf +++ b/library/server/wsf/wsf_extension-safe.ecf @@ -10,6 +10,7 @@ + diff --git a/library/server/wsf/wsf_extension.ecf b/library/server/wsf/wsf_extension.ecf index b9ce417f..7b3de25f 100644 --- a/library/server/wsf/wsf_extension.ecf +++ b/library/server/wsf/wsf_extension.ecf @@ -10,6 +10,7 @@ + diff --git a/library/server/wsf/wsf_policy_driven-safe.lic b/library/server/wsf/wsf_policy_driven-safe.lic new file mode 100644 index 00000000..a65bdc16 --- /dev/null +++ b/library/server/wsf/wsf_policy_driven-safe.lic @@ -0,0 +1,10 @@ +${NOTE_KEYWORD} + copyright: "2011-${YEAR}, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" diff --git a/library/server/wsf/wsf_policy_driven.lic b/library/server/wsf/wsf_policy_driven.lic new file mode 100644 index 00000000..a65bdc16 --- /dev/null +++ b/library/server/wsf/wsf_policy_driven.lic @@ -0,0 +1,10 @@ +${NOTE_KEYWORD} + copyright: "2011-${YEAR}, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" + source: "[ + Eiffel Software + 5949 Hollister Ave., Goleta, CA 93117 USA + Telephone 805-685-1006, Fax 805-685-6869 + Website http://www.eiffel.com + Customer support http://support.eiffel.com + ]" diff --git a/library/server/wsf_html/form/wsf_form_div.e b/library/server/wsf_html/form/wsf_form_div.e index e3205162..0d483669 100644 --- a/library/server/wsf_html/form/wsf_form_div.e +++ b/library/server/wsf_html/form/wsf_form_div.e @@ -32,7 +32,7 @@ feature {NONE} -- Initialization make_with_text (s: READABLE_STRING_8) do - make_with_item (create {WSF_FORM_RAW_TEXT}.make (s)) + make_with_item (create {WSF_WIDGET_TEXT}.make_with_text (s)) end make_with_item (i: WSF_WIDGET) diff --git a/library/server/wsf_html/form/wsf_form_raw_text.e b/library/server/wsf_html/form/wsf_form_raw_text.e index cdca2d24..9d7ef9fb 100644 --- a/library/server/wsf_html/form/wsf_form_raw_text.e +++ b/library/server/wsf_html/form/wsf_form_raw_text.e @@ -1,12 +1,13 @@ note description: "Summary description for {WSF_FORM_RAW_TEXT}." - author: "" date: "$Date$" revision: "$Revision$" class WSF_FORM_RAW_TEXT +obsolete "Use WSF_WIDGET_TEXT 2013-Sept-06" + inherit WSF_WIDGET_TEXT rename diff --git a/library/server/wsf_html/widget/wsf_widget_composite.e b/library/server/wsf_html/widget/wsf_widget_composite.e index 576f1c82..c9f51cdd 100644 --- a/library/server/wsf_html/widget/wsf_widget_composite.e +++ b/library/server/wsf_html/widget/wsf_widget_composite.e @@ -177,11 +177,24 @@ feature -- Change items.put_front (i) end - extend_text (t: READABLE_STRING_8) + extend_html_text (t: READABLE_STRING_8) + -- Extend a widget encapsulating html code `t' do extend (create {WSF_WIDGET_TEXT}.make_with_text (t)) end + extend_text (t: READABLE_STRING_8) + obsolete "Use extend_html_text (..) 2013-Sept-06" + do + extend_html_text (t) + end + + extend_raw_text (t: READABLE_STRING_GENERAL) + -- Extend a widget encapsulating html encoded text `t' + do + extend (create {WSF_WIDGET_RAW_TEXT}.make_with_text (t)) + end + feature {NONE} -- Implementation: Items items_by_type_from (a_container: ITERABLE [WSF_WIDGET]; a_type: TYPE [detachable ANY]): detachable ARRAYED_LIST [WSF_WIDGET] diff --git a/library/server/wsf_html/widget/wsf_widget_raw_text.e b/library/server/wsf_html/widget/wsf_widget_raw_text.e new file mode 100644 index 00000000..fb11c560 --- /dev/null +++ b/library/server/wsf_html/widget/wsf_widget_raw_text.e @@ -0,0 +1,41 @@ +note + description: "Widget embedding raw text, this will be html encoded before being rendered in target html" + date: "$Date$" + revision: "$Revision$" + +class + WSF_WIDGET_RAW_TEXT + +inherit + WSF_WIDGET + +create + make_with_text + +feature {NONE} -- Initialization + + make_with_text (a_text: READABLE_STRING_GENERAL) + do + text := a_text + end + +feature -- Access + + text: READABLE_STRING_GENERAL + -- Text to be html encoded into html + +feature -- Change + + set_text (a_text: like text) + do + text := a_text + end + +feature -- Conversion + + append_to_html (a_theme: WSF_THEME; a_html: STRING_8) + do + a_html.append (a_theme.html_encoded (text)) + end + +end diff --git a/library/server/wsf_html/widget/wsf_widget_text.e b/library/server/wsf_html/widget/wsf_widget_text.e index 513069e5..5dd8192c 100644 --- a/library/server/wsf_html/widget/wsf_widget_text.e +++ b/library/server/wsf_html/widget/wsf_widget_text.e @@ -1,6 +1,5 @@ note - description: "Summary description for {WSF_WIDGET_TEXT}." - author: "" + description: "Widget embedding html text/code, this will render as it is in target html" date: "$Date$" revision: "$Revision$"