Commit Graph

96 Commits

Author SHA1 Message Date
jocelyn a97eb4b062 Added missing dependencies. 2018-05-30 19:27:04 +02:00
jocelyn d43c4edb7d Updated the default rescue response (i.e when exception or bad internal error occurs).
Factorized the implementation in WGI_RESCUE_EXECUTION, and now by redefining the `WGI_EXECUTION.execute_rescue (...)` procedure, it is possible to have a custom response on such rescued execution.
2018-05-30 17:28:24 +02:00
Jocelyn Fiat 3b8261ff08 Updated code regarding to string 32 vs string 8. 2017-04-14 11:45:38 +02:00
jvelilla 5d9752f257 Updated code, get rid of obsolete feature calls in libraries and examples 2017-04-13 16:48:17 -03:00
jocelyn 5e79751522 Updated WGI_OUTPUT_STREAM.put_file_content . 2016-10-25 13:44:44 +02:00
jocelyn 885195dbaa Added WSF_RESPONSE.put_file_content (f: FILE, a_offset: INTEGER; a_count: INTEGER) to allow potential future optimization. 2016-10-24 12:47:33 +02:00
jocelyn ed959042d7 Fixed issue with input using "Transfer-Encoding: chunked". 2016-10-12 11:12:37 +02:00
jocelyn 1a4db1d7c6 Eiffel code and ECFs update to support new agent notations.
Removed contrib/library/.../json library.
2016-01-18 16:41:10 +01:00
jocelyn c0d5b7c968 Added make_from_execution procedure to ease implementing various use cases. 2015-06-16 15:02:17 +02:00
jocelyn a1a620a9c3 Export request and response from WGI_EXECUTION to itself.
Added WSF_FILTERED_ROUTED_SKELETON_EXECUTION
2015-05-06 22:16:00 +02:00
jocelyn d9cbc72058 Better support for HTTP/1.0 and also related to persistent connection. 2015-05-06 22:15:56 +02:00
jocelyn 89e26519e4 First step to improve a bit error handling related to socket disconnection.
Mainly in standalone connector for now.
2015-05-06 22:15:51 +02:00
jocelyn 8246bc1444 Updated various indexing notes.
Removed a few obsolete classes.
Cosmetics
2015-05-06 22:15:46 +02:00
jocelyn 4907bc3085 Migrated most of the example and library to new design. 2015-05-06 22:15:43 +02:00
jocelyn 7d2ce8a77f Implemented support for base url in httpd connector. 2015-05-06 22:15:38 +02:00
jocelyn b4a9c92ffc Migrated simple, simple_file and upload_image example.
Adapted EWF accordingly.
2015-05-06 22:14:48 +02:00
jocelyn bf0eb9a02d Added SCOOP support for WSF.
WSF_SERVICE is deeply changed, and addition of WSF_EXECUTION.
Todo: code cleaning, removing useless things.
2015-05-06 22:13:22 +02:00
jocelyn 7f27a6c797 First steps to provide a concurrent compliant EWF connector. 2015-05-06 22:13:11 +02:00
jocelyn 0caad2105f Merge branch 'fix_cgi_value' of github.com:jocelyn/EWF 2014-12-01 15:53:45 +01:00
Colin Adams 0f76518b63 Added {WSF_REQUEST}.http_content_encoding 2014-11-19 14:41:50 +00:00
Colin Adams e1d1d52260 Issue #143 2014-11-17 16:20:28 +00:00
jocelyn 425c976032 Ensure that PATH_INFO and REQUEST_URI are following the CGI specifications:
- PATH_INFO is percent decoded but still utf-8 encoded,
  this is available via WGI.path_info and WSF_REQUEST.utf_8_path_info.
- Added WSF_REQUEST.percent_encoded_path_info
- and WSF_REQUEST.path_info remains the unicode value for PATH_INFO

Added cgi_variables: WGI_REQUEST_CGI_VARIABLES to have a simple and quick view on CGI variables
Added execution_variables to be able to iterate on execution variables.
Added PERCENT_ENCODER.percent_decoded_utf_8_string
Improved the WSF_DEBUG_HANDLER to provide more information thanks to WSF_DEBUG_INFORMATION object.
2014-06-30 15:13:47 +02:00
jocelyn 3065637c80 Fixed an issue with one short chunk and empty trailer
issue#81
2013-10-18 20:59:29 +02:00
Colin Adams e6371c7adc Merge branch 'master' into handler
pull from upstream
2013-07-08 10:17:44 +01:00
jocelyn f653507fc8 Updated WGI specification to ease future migration to unicode support.
Use STRING_TABLE, and better interface of READABLE_STRING_GENERAL,
    this way the signature are more flexible for unicode keys.

    Note that for now, unicode environment variables are not correctly supported in WGI
    especially the value of the variables.
    Any layer on top of EWGSI suffers from the same issues.

Better exception handling

+ code cleaning
2013-06-12 18:50:45 +02:00
jocelyn fbbd1f1eee Fixed various void-safety issue with recent compilers.
Note that EWF does now require EiffelStudio 7.2, and is compiling with 7.3
2013-06-07 15:40:50 +02:00
jocelyn 5b6c257fae Improved WGI_INPUT_STREAM.append_to_file (f: FILE; nb: INTEGER) 2013-05-28 15:04:50 +02:00
jocelyn eab8df7e10 Added WSF_REQUEST.read_input_data_into_file (FILE) 2013-05-28 14:42:11 +02:00
Colin Adams f52aa2ecff Made changes requested in review 2013-04-17 15:37:39 +01:00
Colin Adams b4ab4875fc If-Match implemented in skeleton handler 2013-04-13 14:48:28 +01:00
Colin Adams 92ce80cd63 Fixed bug in 32/8 bit string existance 2013-04-11 10:28:14 +01:00
Colin Adams 31ba0a8828 Handle Precondition Failed for If-Match: * where there is no handler for the resource 2013-04-11 09:23:41 +01:00
jocelyn f85dc7f550 Fixed HEAD request related issue
see https://github.com/EiffelWebFramework/EWF/issues/53
2013-04-10 09:27:58 +02:00
Jocelyn Fiat 1fcc69b268 check against capacity not count 2013-03-29 15:09:34 +01:00
Jocelyn Fiat 1f7f569d82 restored assertion removed by error 2013-03-22 20:12:12 +01:00
Jocelyn Fiat c44cf5e983 Fixed assertion that were broken with recent delayed header response.
Changed semantic of put_header_lines and add_header_lines,
Now the arguments are iterable of string (i.e the header line)

The previous features were not used, and were not well named.
So we removed them, and reused the names for adpated implementation.
2013-03-22 16:06:10 +01:00
Olivier Ligot 2ff2dbb7c3 Merge branch 'cors' of github.com:oligot/EWF into cors 2013-03-15 14:19:52 +01:00
Jocelyn Fiat 86777d75ea Implemented more user friendly WSF_RESPONSE
i.e allow to change the status code and the header as long as no content is really sent back to the client

This requires an addition WGI_RESPONSE, new post_commit_action: PROCEDURE [...]
2013-03-12 16:52:45 +01:00
Olivier Ligot 12404a2d5c CORS: respect specification regarding Access-Control-Allow-Headers
According to the specification, the value of the response header
Access-Control-Allow-Headers must contain at least all the values of the
request header Access-Control-Request-Headers to be considered a valid request.
Before this commit, only the Authorization value was present, which is enough
for Firefox but not for Chrome.
This should now work as expected.
2013-02-22 15:58:09 +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 7193ce93f4 Fixed issue in WSF_REQUEST.read_input_data_into when the content is zero
Cleaned the WGI_CHUNKED_INPUT_STREAM and provides access to last extension, last trailer, ...
Improved WSF_TRACE_RESPONSE to support tracing chunked input back to the client.
2012-12-19 12:47:35 +01:00
Jocelyn Fiat 17f16c35ad Fixed various assertions.
Improved autotests
Added target 'server' to be able to run the server outside the test process.
2012-12-19 00:10:31 +01:00
Jocelyn Fiat ffe87ccbe9 Fixed reading chunked input data
When retrieving data block by block, use 8_192 instead of 1_024 (since 1_024 is too small most of the time)
2012-12-18 23:40:26 +01:00
Jocelyn Fiat de93ce32ff Added logger response wrapper, this is mainly to be able to save any response message to a file.
(debugging purpose)
2012-12-18 23:28:04 +01:00
Jocelyn Fiat 71b1bad53d Added basic support for "Expect" http header
i.e:   WSF_REQUEST.http_expect: detachable READABLE_STRING_8

Added WSF_REQUEST.request_time_stamp: INTEGER_64
2012-12-18 23:25:54 +01:00
Jocelyn Fiat ff7d963d55 Fixed WGI_INPUT_STREAM read_to_string and append_to_string 2012-12-13 17:24:55 +01:00
Jocelyn Fiat dc2e535fe8 Code cleaning 2012-04-30 15:49:35 +02:00
Jocelyn Fiat 0bd2d16c12 Made WGI_CHUNKED_INPUT_STREAM inherits from WGI_INPUT_STREAM
Merged REQUEST.input and REQUEST.chunked_input
  Now REQUEST.input handles directly the chunked transfer encoding, or the non chunked.
Kept REQUEST.is_chunked_input since it matters that Content-Length is 0 even if there are input (chunked) data.
2012-04-13 16:33:49 +02:00
Jocelyn Fiat 1403cc5c09 Fixed compilation 2012-04-12 12:25:34 +02:00
Jocelyn Fiat b541efcc8f Now WGI_RESPONSE.set_status_code (..) has a new argument to pass optional custom reason phrase.
This is a minor breaking change (but prior to the first release, so acceptable)
   And then it is now possible to precise a custom reason phrase (useful for 4xx and 5xx response)

At the WSF_RESPONSE level, the status code is now sent only when the header are sent.
thus, it is possible to change the status code as long as no header is sent.
(in the future, we should also try to delay the sending of headers)

Removed WGI_RESPONSE.put_header_lines (..) which was not used, and WGI is not meant to provide such user friendly features
Now this is available directly on WSF_RESPONSE
2012-04-12 11:19:41 +02:00