Commit Graph

60 Commits

Author SHA1 Message Date
Jocelyn Fiat
e3e6fd7f62 better error output for CGI connector 2013-03-29 21:00:02 +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
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
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
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
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
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
fea0f115a0 Removed WGI_RESPONSE.write (..)
Replaced any internal call to WGI_RESPONSE.write () by the associated implementation (i.e  output.put_string (...)  )
Added WGI_OUTPUT_STREAM.put_crlf

Renamed WSF_RESPONSE.put_response (a_message) as  `send (a_message)'
WSF_RESPONSE_MESSAGE.send_to (res)  is now exported only to WSF_RESPONSE
2012-03-19 14:52:12 +01:00
Jocelyn Fiat
46eb92ac37 Major renaming, adopt the WSF_ prefix for all classes under "wsf", and simplify some class names
Removed in WGI_INPUT_STREAM, the assertion "same_last_string_reference"
Copyright updates
2012-03-16 09:49:41 +01:00
Jocelyn Fiat
5abc79b7c3 Nino connector:
- fixed issue related to `ready_for_reading'  now use the `try_...' variant
 - for now Nino does not support persistent connection, then we have to respond with "Connection: close"

REQUEST_FILE_SYSTEM_HANDLER:
 - added not_found_handler and access_denied_handler, so that the user can customize related response

WSF_REQUEST and WSF_VALUE:
 - modified how uploaded file are handled, fixed various issues, and added WSF_UPLOADED_FILE (it is a WSF_VALUE)

WSF_VALUE:
 - added change_name (a_name: like name)
 - added url_encoded_name to other WSF_values

WSF_REQUEST:
 - added `destroy' to perform end of request cleaning (such as deleting temp uploaded files)
 - renamed `raw_post_data_recorded' as `raw_input_data_recorded', and related feature
 - do not store the RAW_POST_DATA in meta variable anymore, but in WSF_REQUEST.raw_input_data is asked

Added WSF_HTML_PAGE_RESPONSE to help user

WSF_REPONSE.redirect_... now use "temp_redirect" as default
  instead of "moved_permanently" which is specific usage

Removed many obsolete features.
2012-03-13 18:07:28 +01:00
Jocelyn Fiat
6dc1c0d2b0 Removed most of the "retry" in rescue clauses, since it was hidding critical issue.
This should be the choice of the application to "retry" on exception, otherwise let the framework handle this in the lower part.

Better handling of response termination (alias commit)
Added the notion of "status_committed"
2012-01-23 15:31:34 +01:00
Jocelyn Fiat
1b55b09b64 Fixed WSF_REQUEST.script_url (..) for clean path
Added related autotests
2012-01-19 10:25:53 +01:00
Jocelyn Fiat
7a6c51e47e Send the Status code, as an header line Status: code reason 2012-01-17 16:34:48 +01:00
Jocelyn Fiat
790aa40591 According to http://www.fastcgi.com/docs/faq.html#httpstatus
send the Status code, as an header line  Status: code reason
2012-01-17 13:49:04 +01:00
Jocelyn Fiat
e506397406 Do not send any Status line back to the FastCGI client 2012-01-16 13:49:38 +01:00
Jocelyn Fiat
32373addfa Renamed write_ feature as put_ 2011-12-15 19:04:26 +01:00
Jocelyn Fiat
e16f03b1c2 Fixed stupid mistake in {WGI_NINO_INPUT_SREEAM}.end_of_input 2011-12-15 15:36:47 +01:00
Jocelyn Fiat
bfa620eee3 Made DEFAULT_SERVICE_LAUNCHER more flexible for the user. 2011-12-15 13:30:19 +01:00
Jocelyn Fiat
5e35bc59a9 avoid infinite rescue due to internal error or user code not dealing well with socket disconnection 2011-12-12 21:19:45 +01:00
Jocelyn Fiat
03938b43c3 Fixed compilation issue for CGI and libFCGI connector
due to recent changes in interface  (use READABLE_STRING_8)
2011-12-02 12:05:07 +01:00
Jocelyn Fiat
de38f46d1d fixed remaining issue or useless code to set http environment variable 2011-12-01 18:41:51 +01:00
Jocelyn Fiat
8c79a64f0c Fixed stupid error where we were concatenating ... value by error 2011-12-01 18:38:26 +01:00
Jocelyn Fiat
1b92403045 Synchronized with Nino 2011-12-01 17:59:35 +01:00
Jocelyn Fiat
8ffe2a8f73 sync with Nino, call to put_readable_string_8 2011-12-01 17:52:00 +01:00
Jocelyn Fiat
9d457bb978 rename application' as service' 2011-11-25 16:22:44 +01:00
Jocelyn Fiat
fd0912904c Simplified EWSGI interfaces
Renamed WGI_RESPONSE_BUFFER as WGI_RESPONSE to avoid confusion
Removed EWF_HEADER and removed related caller from WGI implementation,
   now this is only part of WSF library
Added wgi_version, wgi_implementation and wgi_connector to the WGI_REQUEST interface
   to give more information to the user
Added back WGI_CONNECTOR to WGI specification, mainly because of `{WGI_REQUEST}.wgi_connector'
   simplified WGI_CONNECTOR to contain for now only `name' and `version'
   if the implementation of connector inherit from WGI_CONNECTOR (recommended)
   this might gives more access to the user using a reverse assignment for specific needs
   (but this usage is not recommended due to portability issue on other connector)
Removed useless connector.ecf since now EWF/WGI library provides the helper classes
2011-11-25 14:39:48 +01:00
Jocelyn Fiat
49c3e8e789 Renamed "ext" folder as "contrib" folder and reorganized a little bit
Renamed any *_APPLICATION as *_SERVICE
   mainly because those components
   such as WSF_APPLICATION, renamed as WSF_SERVICE
   are not always the main application entry, and "service" describe them better
Minor implementation change in WSF_REQUEST
Cosmetics
2011-11-17 15:50:30 +01:00
Jocelyn Fiat
a76eb75267 removed unused local variables 2011-11-16 07:25:29 +01:00
Jocelyn Fiat
13b09adc8c Changed the WGI_INPUT_STREAM and WGI_OUTPUT_STREAM interfaces
main changes for existing code  `read_stream' is renamed `read_string'
2011-11-14 14:17:41 +01:00
Jocelyn Fiat
7669ccfc1d sync with nino and applied changes to connector 2011-11-04 20:21:35 +01:00
Jocelyn Fiat
3a6e3592ae Use recent changes from Nino, to get access to the launched and port information.
Quite useful when launching using port=0 to use a random free port.
This is great for testing, this way we can run many tests in the same time without any port blocking.
2011-11-04 12:15:40 +01:00
Jocelyn Fiat
07f9a8cec7 applied recent changes from Nino 2011-11-03 18:50:19 +01:00
Jocelyn Fiat
14a2c01f41 Applied recent changes on WGI_ and WSF_
Moved classes away from ewsgi, restructured, cleaned
2011-10-21 16:58:23 +02:00
Jocelyn Fiat
c3f5376ef5 fixed cgi and libfcgi connectors due to recent changes from WGI_APPLICATION 2011-10-14 14:27:54 +02:00
Jocelyn Fiat
21e973f8a4 Removed handling of internal error from WGI_APPLICATION
And for now added it into nino connector
2011-10-14 14:15:23 +02:00
Jocelyn Fiat
d9ba97d33b Fixed issue where Content-Type and Content-Length were translated into HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH instead of just
CONTENT_TYPE and CONTENT_LENGTH
2011-09-21 15:33:40 +02:00
Jocelyn Fiat
33eddd9197 better assertion to ensure `base' is a valid base url 2011-09-21 15:30:20 +02:00
Jocelyn Fiat
5626e03aa8 - Adopted deferred WGI_VALUE design for Result type of *_parameter and similar functions
- Adopted the ITERATION_CURSOR [WGI_VALUE] design for *_parameters and similar functions
- renamed parameter as item
- provided helper function to handle "string" value parameters

Experimental for now.
2011-09-14 14:54:06 +02:00
Jocelyn Fiat
eee085dd5a renamed (un)set_meta_parameter as (un)set_meta_variable 2011-09-07 11:42:53 +02:00
Jocelyn Fiat
2d9e2d12a0 Missing HTTP_ prefix for header meta variable in REQUEST 2011-09-07 11:42:02 +02:00