Commit Graph

213 Commits

Author SHA1 Message Date
Jocelyn Fiat 07ac6a6742 cosmetic 2013-03-21 15:55:42 +01:00
Jocelyn Fiat 813caa15e0 Removed WSF_AGENT_HANDLER since it was an artificial notion,
as we have no common ancestor for WSF_HANDLER having
   execute (req: WSF_REQUEST; res: WSF_RESPONSE)
2013-03-21 15:50:10 +01:00
Jocelyn Fiat de8d36d0db cosmetic 2013-03-21 15:48:07 +01:00
Jocelyn Fiat 62d880a7c1 Fixed signature of `set_next' to allow redefinition.
Added assertions
2013-03-21 15:47:52 +01:00
Jocelyn Fiat 1f76fd5360 Now WSF_FILTER_HANDLER is a handler and has formal generic G constrained to WSF_HANDLER
This eases implementation of potential descendants.
2013-03-21 15:47:10 +01:00
Jocelyn Fiat 19df76c332 Added WSF_HANDLER_FILTER_WRAPPER to build a bridge from router to filter. 2013-03-21 15:44:29 +01:00
Jocelyn Fiat 7c7bf9a3f8 Introduced WSF_ROUTER_SESSION
This fixes CQS violation from WSF_ROUTER.dispatch_and_return_handler (...): ? WSF_HANDLER
and related code, and this is more compliant with concurrency.

In addition, the WSF_ROUTER_SESSION can be enhanced in the future to answer more advanced needs.
2013-03-21 15:41:46 +01:00
Jocelyn Fiat 3f237c737d mimic design of WSF_ROUTED_SERVICE for WSF_FILTERED_SERVICE
and update the filter example to make it simpler and reuse code.
2013-03-19 22:00:25 +01:00
Jocelyn Fiat 73f675db60 added WSF_..._ROUTER_HELPER and made the previous WSF_..._ROUTED_SERVICE obsolete 2013-03-19 17:17:14 +01:00
Jocelyn Fiat b629bba5cc WSF_CORS_OPTIONS_FILTER should not inherit from WSF_URI_TEMPLATE_HANDLER 2013-03-19 17:09:18 +01:00
Colin Adams d34c940c91 added reference to assertion tags in check justiciation 2013-03-19 15:59:17 +00:00
Jocelyn Fiat 3faa2ab815 Moved all *_CONTEXT_* router related classes into wsf_router_context.ecf library
This makes wsf simpler to discover.
And advanced context enabled handler, mapping, ... are still available for now in wsf_router_context.ecf library
2013-03-19 11:54:01 +01:00
Jocelyn Fiat a4ea402fb5 Merge pull request #22 from oligot/cors
Cross-Origin Resource Sharing initial support
2013-03-19 03:16:54 -07:00
Jocelyn Fiat 4d7660a9e3 Added deferred WSF_AGENT_HANDLER
Added WSF_NOT_IMPLEMENTED_RESPONSE
2013-03-18 22:05:34 +01:00
Colin Adams 7435b4f454 refactored for WSF_ROUTED_SKELETON_SERVICE 2013-03-18 14:45:04 +00:00
Colin Adams 10ffa2066d prior to refactoring for WSF_ROUTED_SKELETON_SERVICE 2013-03-18 14:25:44 +00:00
Colin Adams d56f4e6c7d prior to refactoring for WSF_ROUTED_SKELETON_SERVICE 2013-03-18 14:21:53 +00:00
Colin Adams dd63042ec4 Added missing class 2013-03-17 10:38:00 +00:00
Colin Adams 4c946f5829 minor polishing 2013-03-17 09:57:00 +00:00
Colin Adams 767328287a added contracts and polished forbidden for OPTIONS * 2013-03-17 09:49:36 +00:00
Colin Adams cda8e75f4c implemented OPTIONS * except for Allow header 2013-03-17 08:09:04 +00:00
Colin Adams d01f47f1ee Implemented 414 and 503 responses on WSF_ROUTED_SERVICE 2013-03-16 15:12:58 +00:00
Colin Adams a6fbed22fe Implemented 503 and 414 responses in WSF_ROUTED_SERVICE 2013-03-16 14:08:33 +00:00
Colin Adams 2d439a2414 Sixth round of contracts for non-Void-safe users 2013-03-15 14:50:59 +00:00
Colin Adams a303783204 Fifth round of contracts for non-Void-safe users 2013-03-15 14:06:37 +00:00
Olivier Ligot 1198d6cef4 Merge remote-tracking branch 'upstream/master' into cors 2013-03-15 14:54:43 +01:00
Olivier Ligot dde70512d8 Use features from the flexible_response branch 2013-03-15 14:15:17 +01:00
Olivier Ligot 496b831956 Merge remote-tracking branch 'jocelyn/flexible_response' into cors
Conflicts:
	examples/filter/filter-safe.ecf
	examples/filter/src/filter_server.e
	library/network/protocol/http/src/http_header.e
	library/server/wsf/src/wsf_response.e
2013-03-15 13:33:13 +01:00
Colin Adams bb56166f95 Fourth round of contracts for non-Void-safe users 2013-03-15 12:01:54 +00:00
Colin Adams c6d022bf18 Third iteration of contracts for non-Void-safe users 2013-03-15 10:16:32 +00:00
Colin Adams 049f769638 Amended header comment in response to code review of pull-request 2013-03-14 16:44:15 +00:00
Colin Adams aef30966de Corrected header comment in response to code review of pull-request 2013-03-14 16:14:07 +00:00
Colin Adams 3206bcc4fd Further contracts for non-Void-safe users 2013-03-14 15:29:11 +00:00
Colin Adams a96a143fe0 used across for assertion 2013-03-14 14:45:31 +00:00
Colin Adams 4ec2832375 Response to comments from review "Contracts for non-Void-safe users (take 1)" 2013-03-14 14:17:03 +00:00
Colin Adams ca5619c6fc Added non-Void contracts for classes previously flagged by AutoTest 2013-03-14 11:48:46 +00:00
Jocelyn Fiat 98f3739c7c Fixed HTTP_IF_MODIFIED_SINCE handling in WSF_FILE_SYSTEM_HANDLER ... 2013-03-01 18:19:51 +01:00
Jocelyn Fiat 40ea982293 Added ANSI C date time string format support in HTTP_DATE. 2013-01-31 15:30:39 +01:00
Jocelyn Fiat 20d5798444 Added HTTP_DATE to ease http date manipulation and optimize code rather than using EiffelTime's code facilities.
Added autotests to `http' lib.
2013-01-31 11:23:11 +01:00
Olivier Ligot ff57d0ecd4 Cross-Origin Resource Sharing initial support
Initial support for the Cross-Origin Resource Sharing specification.
This allows JavaScript to make requests across domain boundaries.

Also reviewed the filter example to get rid of the context and
the generic classes (we can actually use {WSF_REQUEST}.execution_variable
and {WSF_REQUEST}.set_execution_variable).

Links:
* How to enable server-side: http://enable-cors.org/server.html
* Specification: http://www.w3.org/TR/cors/
* Github: http://developer.github.com/v3/#cross-origin-resource-sharing
2013-01-09 17:34:50 +01:00
Jocelyn Fiat a362e7d9c6 Avoid calling ANY.print, prefer io.error.put_string
Fixed obsolete calls.
2012-12-20 18:32:56 +01:00
Jocelyn Fiat 27d2308d6f Added comment to self documentation features 2012-12-20 10:09:26 +01:00
Jocelyn Fiat aa65c16957 Breaking changes:
added `a_request_methods' argument to WSF_ROUTER_SELF_DOCUMENTATION_HANDLER.mapping_documentation
 added similar argument to WSF_ROUTER_SELF_DOCUMENTATION_ROUTER_MAPPING.documentation
Renamed WSF_ROUTER_METHODS as WSF_REQUEST_METHODS
Enhanced WSF_REQUEST_METHODS with new has_... function
Added WSF_ROUTER_VISITOR and WSF_ROUTER_ITERATOR that may be useful to iterate inside the router.
   we may improve the implementation of the router using those visitors in the future.
Improved the WSF_DEFAULT_RESPONSE to embedded suggested items (typically based on pseudo self documented router)
2012-12-19 16:42:26 +01:00
Jocelyn Fiat 021f0eeaec Updated documentation output 2012-12-19 14:35:47 +01:00
Jocelyn Fiat cc570f5abf Added WSF_DEFAULT_*_RESPONSE
Fixed the method not allowed by setting the Allow: header
2012-12-14 15:52:35 +01:00
Jocelyn Fiat 6eb0ebd873 Merge pull request #16 from colin-adams/master
Implementation for automatic HEAD and first pass at HTTP 1.1 conformance contracts
2012-12-13 13:58:42 -08:00
Jocelyn Fiat b7505e67b8 Added to WSF_REQUEST
- raw_header_data: like meta_string_variable
  - read_input_data_into (buf: STRING)
  - is_content_type_accepted (a_content_type: READABLE_STRING_GENERAL): BOOLEAN
Changed raw_input_data to return IMMUTABLE_STRING_8
Added WSF_METHOD_NOT_ALLOWED_RESPONSE
Added WSF_TRACE_RESPONSE to respond TRACE request
Now Not_found response return html content if the client accepts, other text/plain
Implemented TRACE response, and Method not allowed as implementation of WSF_ROUTED_SERVICE.execute_default
2012-12-13 17:29:46 +01:00
Jocelyn Fiat cb034fc94e Added missing "context" classes for uri and starts_with mapping+handler (and helper classes).
So that it is address more needs.
Factorized code between "context" and non context classes.
2012-12-13 12:01:24 +01:00
Colin Adams 365da7e30a merged from upstream 2012-12-08 08:25:47 +00:00
Jocelyn Fiat 5de14b114e Provide a way to log into a file, rather than just console output
Minor optimization for WSF_LOGGING_FILTER
2012-12-05 22:30:24 +01:00