Commit Graph

171 Commits

Author SHA1 Message Date
bbc2bab0eb Removed usage of remote anchor types. 2014-02-28 14:25:13 +01:00
07ec0d001f Fixed various issues with libfcgi on Linux, mainly related to stdout,stderr,stdin, feof and related.
Added `reset' to the libfcgi input stream so that it is possible to reset previous errors.
2013-12-03 10:45:52 +01:00
4f15745647 For Nino connector, ensured that environment variables are percent-encoded in meta variables. 2013-12-02 10:26:23 +01:00
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
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
225cda0af7 minor optimization avoiding to create temporary string that might be big 2013-06-12 18:23:18 +02:00
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
5b6c257fae Improved WGI_INPUT_STREAM.append_to_file (f: FILE; nb: INTEGER) 2013-05-28 15:04:50 +02:00
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
f85dc7f550 Fixed HEAD request related issue
see https://github.com/EiffelWebFramework/EWF/issues/53
2013-04-10 09:27:58 +02:00
Jocelyn Fiat
e3e6fd7f62 better error output for CGI connector 2013-03-29 21:00:02 +01:00
Jocelyn Fiat
1fcc69b268 check against capacity not count 2013-03-29 15:09:34 +01:00
Jocelyn Fiat
178a48cd7e Updated all-safe.ecf
(add all-stable-safe.ecf that includes only the library, examples and specific draft lib)
2013-03-27 15:22:32 +01:00
Jocelyn Fiat
a05e08c207 corrected null-safe.ecf 2013-03-27 13:07:55 +01:00
Jocelyn Fiat
955272f505 Do not use socket_ok .. but readable (as specified in precondition of read_stream_thread_aware 2013-03-26 09:16: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
Jocelyn Fiat
22a725b8be Added a way to call a callback on launched and stopped for Nino connector 2013-02-27 21:49:42 +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
4ff7b33471 using socket_ok does not sounds ok on linux 2012-12-21 07:19:13 +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
e20cb6b6ed make it compiles with EiffelStudio 7.1 and 7.2 2012-12-07 14:55:38 +01:00
Jocelyn Fiat
39c3e8c5cf corrected null connector ecf files 2012-12-05 22:39:05 +01:00
Jocelyn Fiat
a9f3ea7886 Prepare upcoming support for unicode environment variables 2012-12-05 22:30:21 +01:00
Jocelyn Fiat
12d56861e6 Fixing wrong path for ewsgi connector nino
(this was introduced recently when we moved folder location)
2012-06-15 14:15:44 +02:00
Jocelyn Fiat
3702842337 Updated structure of EWF, applied
Now "nino" is under contrib/library/network/server/nino  (as git merge subtree, and not anymore as submodule)
2012-06-14 13:35:08 +02:00
Jocelyn Fiat
db448001a1 Change structure of EWF, to follow better categorization 2012-06-13 22:32:17 +02: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
Jocelyn Fiat
40c6aff423 Added class HTTP_CONTENT_TYPE to help manipulation of Content-Type value
Now WSF_REQUEST return a HTTP_CONTENT_TYPE if available
Adapted WSF_MIME_HANDLER to use this new class
Added one manual autotest to test MIME handler
2012-03-23 16:40:13 +01:00
Jocelyn Fiat
6c7ba93062 Reverted a previous change, we should not truncated Content-Type after ;
In the case of multipart/form-data  the parameter "boundary=" is essential
2012-03-20 14:35:04 +01:00
Jocelyn Fiat
d256ec3944 Fixing compilation of specific example using the WGI connector directly 2012-03-20 12:15:45 +01:00
Jocelyn Fiat
897aeb3132 WSF_REQUEST.content_type should keep only the relevant part of the content type
and forget about the eventual parameters (charset, name) ...

  note: it is possible to query meta_string_variable ("CONTENT_TYPE")
        to get the complete Content-Type header
2012-03-20 11:12:18 +01:00
Jocelyn Fiat
8344607eb6 Implemented WSF_RESPONSE.put_error (...) and related
Added WSF_RESPONSE.put_character
Renamed  WGI_OUTPUT_STREAM.put_character_8 as put_character  to follow style of put_string  (and not put_string_8)
Refactored the WSF_DEFAULT_SERVICE_LAUNCHER
Added WSF_DEFAULT_SERVICE to be more user friendly
Splitted the wsf/default/ libraries to have wsf/connector/... and being able to handle more than one connector in the same application
2012-03-20 10:29:55 +01:00
Jocelyn Fiat
3432e2d8b2 Updating EWSGI specification classes 2012-03-19 15:06:50 +01:00