Jocelyn Fiat
eb04ac5405
Improved the libcurl implementation of http_client by adding HTTP_CLIENT_SESSION.is_debug: BOOLEAN
...
if True, this display verbose debug information in console
Implemented uploading of file for PUT and POST requests
Refactored LIBCURL_HTTP_CLIENT_REQUEST to free used pointer, and also ease extension of the class if needed.
Updated cURL library with addition of {CURL_EXTERNALS}.slist_free_all (..)
2012-05-03 16:21:42 +02:00
Jocelyn Fiat
31cf64f4ad
do not use implicit conversion from HTTP_CONTENT_TYPE
2012-05-02 19:25:14 +02:00
Jocelyn Fiat
face4550f2
Fixed wrong signature should be READABLE_STRING_32 instead of _8
2012-05-02 19:22:39 +02:00
Jocelyn Fiat
ee0e3df05f
Also removing the implicit conversion from STRING to HTTP_*_TYPE
2012-05-02 11:40:23 +02:00
Jocelyn Fiat
18ced46c99
Removed implicit conversion from HTTP_CONTENT_TYPE to STRING_8
...
because it could be a source of bug due to hidden conversion (and parameters)
Applied changes to autotest cases
Cosmetic
2012-05-02 11:35:53 +02:00
Jocelyn Fiat
7c95e514ad
Added comments
...
Added `url' to compute the url from base_url, path and query parameters
2012-04-30 15:54:21 +02:00
Jocelyn Fiat
e304113984
Fixed error in URL encoding, according to the RFC3986, space should not be encoded with '+' but with percent encoding.
2012-04-30 15:53:44 +02:00
Jocelyn Fiat
07b3eddefe
Fixed signature issue, the argument `name' should be READABLE_STRING_32
2012-04-30 15:51:10 +02:00
Jocelyn Fiat
dc2e535fe8
Code cleaning
2012-04-30 15:49:35 +02:00
Jocelyn Fiat
bd33aabd93
Added specific helper function related to `charset' parameter
2012-04-30 15:49:24 +02:00
Jocelyn Fiat
80a1c85844
added postcondition status_reason_phrase_unset to `set_status'
2012-04-27 08:52:58 +02:00
Jocelyn Fiat
9ba3caba12
cosmetic
2012-04-27 08:52:29 +02:00
Jocelyn Fiat
34c6288032
Fixed a last minute regression due to removal REQUEST.chunked_input
2012-04-13 17:19:14 +02:00
Jocelyn Fiat
21b03a05fd
Added WSF_ROUTER.pre_route_execution_actions: ACTION_SEQUENCE [like route]
...
This way, one can add logger hook to router, to see which "route" was taken by the request.
2012-04-13 16:40:19 +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
e6a727ee42
Fixed compilation of samples
2012-04-12 12:51:52 +02:00
Jocelyn Fiat
1403cc5c09
Fixed compilation
2012-04-12 12:25:34 +02:00
Jocelyn Fiat
3bbf356f19
Missing commit related to changes on WSF_ROUTER
2012-04-12 11:59:14 +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
082def2b70
Merge branch 'master' of github.com:EiffelWebFramework/EWF
2012-04-06 15:52:03 +02:00
Jocelyn Fiat
79607600e6
updated to EiffelWebFramework/EWF
2012-04-06 16:27:22 +03:00
Jocelyn Fiat
0b6b7f793c
sync with json lib.
2012-04-06 11:31:57 +02:00
Jocelyn Fiat
badc2458c4
Sync with wiki
2012-04-06 11:29:07 +02:00
Jocelyn Fiat
d4208c59f3
Use https://github.com/EiffelWebFramework/EWF.git as master
2012-04-06 11:21:50 +02:00
Jocelyn Fiat
4bafa5b3c0
Added `transfered_content_length' to WSF_RESPONSE to provide the information to application
...
This can be used to build logs for instance.
2012-04-05 21:15:12 +02:00
Jocelyn Fiat
c89b19371e
Relaxed WSF_REDIRECTION_RESPONSE.set_content (.., ..) to allow Void for content type
...
in order to use the one set in header or the default one.
2012-04-05 21:14:10 +02:00
Jocelyn Fiat
10ebc12852
Removed default handler for WSF_ROUTER
...
Added WSF_ROUTE to replace a TUPLE [H, C]
WSF_ROUTER.route (req): detachable WSF_ROUTE
WSF_ROUTER.execute_route (a_route, req, res)
To help usage of Routers
Remove WSF_HANDLER_CONTEXT obsolete features.
Added comments
2012-04-05 21:13:04 +02:00
Jocelyn Fiat
593e48ec5b
Merge remote-tracking branch 'remotes/eiffelworld/master'
2012-04-02 09:29:53 +02:00
Jocelyn Fiat
11b15ec5b7
Merge pull request #10 from oligot/unneeded_precondition
...
Unneeded precondition
2012-04-02 00:28:23 -07:00
Jocelyn Fiat
09fa1adaab
removed obsolete message.
2012-04-02 09:27:59 +02:00
Jocelyn Fiat
874677ab7a
Renamed same_media_type as same_simple_type
...
Added comments
2012-03-23 19:00:49 +01:00
Jocelyn Fiat
ed200b93dd
updated tests.ecf
2012-03-23 18:40:29 +01:00
Jocelyn Fiat
bcccfb22ed
Added HTTP_MEDIA_TYPE (maybe it will just replace the HTTP_CONTENT_TYPE later)
...
renamed .media_type as .simple_type for now
allow more than one parameters
2012-03-23 18:39:19 +01:00
Jocelyn Fiat
5c98d7ba4e
Use media_type as replacement for type_and_subtype_string in HTTP_CONTENT_TYPE
2012-03-23 16:49:13 +01: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
ac9cbb0bd2
in WSF_RESPONSE, put_header' now call put_header_text'
...
Removed unused local variable
2012-03-21 14:49:09 +01:00
Jocelyn Fiat
95c3bbf6e5
Fixed very bad mistake where no Result was ever set for WSF_REQUEST.item (..)
2012-03-21 14:43:32 +01:00
Jocelyn Fiat
b955912dc2
fixed compilation issue (typo)
2012-03-20 16:17:43 +01:00
Jocelyn Fiat
50223b12f7
Do not try to compile_all in "dev" folder
2012-03-20 16:15:16 +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
743f26c376
Use WSF_DEFAULT_SERVICE for the test echo server
2012-03-20 12:18:44 +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
482f8e41e7
Added WSF_SERVICE.to_wgi_service to ease direct integration with existing WGI components
2012-03-20 11:40:13 +01:00
Jocelyn Fiat
9eef812795
Relaxed access to `send_to', now it is exported again to avoid breaking existing code.
2012-03-20 11:38:44 +01:00
Jocelyn Fiat
86fcaa2835
remove unused local variable
2012-03-20 11:15:14 +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
48acdea73c
Added HTTP_HEADER.(put|add)_content_type_with_parameters (...)
2012-03-20 11:08:52 +01:00
Jocelyn Fiat
cbaae12156
removed obsolete
2012-03-20 10:30:04 +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
71d5dc4795
Moved mime handler classes under wsf/src/mime/
2012-03-20 08:38:38 +01:00
Jocelyn Fiat
3f0b745ecc
removed unwanted rescue clause
2012-03-19 15:20:29 +01:00
Jocelyn Fiat
3432e2d8b2
Updating EWSGI specification classes
2012-03-19 15:06:50 +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
4906345a62
Improved comment in WSF_RESPONSE.put_response (..)
...
Added WSF_REDIRECTION_RESPONSE class
2012-03-19 12:32:12 +01:00
Jocelyn Fiat
487487ad44
Added WSF_RESPONSE_HANDLER based on WSF_RESPONSE_MESSAGE
...
The descendant has to implement the function
response (ctx: C; req: WSF_REQUEST): WSF_RESPONSE_MESSAGE
Added related features and class in WSF_ROUTER to be able to use agent easily.
2012-03-19 12:04:46 +01:00
Jocelyn Fiat
ef5ba19c46
Refactored WSF_HANDLER_CONTEXT
...
- removed path_parameter
- added `item' to include WSF_REQUEST.item
- marked obsolete `parameter'
The goal is to remove confusion, remove URI_TEMPLATE specific `path_parameter'
and provide a way to use ctx.item (..) to also include meta variable, query, form, ... items
2012-03-19 10:21:29 +01:00
Jocelyn Fiat
b05ff01262
Use local variable to speed up access to `input'
2012-03-19 10:12:06 +01:00
Jocelyn Fiat
9f1940c46d
Applied wsf_extension creation, and classes moved from wsf to wsf_extension
2012-03-16 15:17:22 +01:00
Jocelyn Fiat
f69ff42564
Created wsf_extension, and moved some classes from wsf to wsf_extension
...
WSF_HANDLER_HELPER
WSF_RESOURCE_HANDLER_HELPER
WSF_HANDLER_ROUTES_RECORDER
2012-03-16 14:12:02 +01:00
Jocelyn Fiat
eb3e9f2186
applied removal of HTTP_HEADER.put_status (..)
2012-03-16 13:53:22 +01:00
Jocelyn Fiat
03b10bdc14
Removed HTTP_HEADER.put_status (...)
...
It is not recommended to send the status code as part of the HTTP Header,
so let's remove this ambiguity and do not encourage EWF user to use it
2012-03-16 13:35:52 +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
25218996e0
Fixed compilation of draft/library/server/request/rest/tests/..
...
Note the "rest" library will not be maintained since this is not REST.
2012-03-13 18:41:32 +01:00
Jocelyn Fiat
68dbbdea9f
precise that library/server/request/router is now part of "wsf" library and not anymore independant library.
2012-03-13 18:09:16 +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
c5fe539acb
use https:// url for git submodules
2012-02-29 17:23:34 +01:00
Jocelyn Fiat
ac3e969b3c
Added assertions to catch if route mapping does not already exists
2012-02-29 11:27:46 +01:00
Jocelyn Fiat
98f2efbd68
Merging changes from Javier
...
Updated restbucksCRUD example, and related class in wsf/router
2012-02-28 09:23:09 +01:00
Jocelyn Fiat
7314e92fe6
Synchronized with nino and json library
2012-02-28 09:20:08 +01:00
Jocelyn Fiat
d621987020
Minor correction, to avoid returning 200 as status code, when the client can not connect
2012-02-16 10:32:24 +01:00
Jocelyn Fiat
e541fdcb0c
fixed compilation
2012-02-15 12:36:57 +01:00
Jocelyn Fiat
5950d768c9
sync with cURL library
2012-02-15 11:58:32 +01:00
Jocelyn Fiat
413fdaf6cd
Fixed error visitor due to recent signature changes
2012-02-15 11:33:39 +01:00
Jocelyn Fiat
9138ffedfb
renamed (add|remove)_synchronized_handler as (add|remove)_synchronization
2012-02-15 11:07:12 +01:00
Jocelyn Fiat
72cc05532c
Removed tests target from encoder(-safe).ecf
...
(now there is a tests-safe.ecf in folder tests)
2012-02-15 11:04:42 +01:00
Jocelyn Fiat
145b129b28
Fixed ERROR_HANDLER.destroy
...
Fixed and export ERROR_HANDLER.remove_synchronized_handler
Added comments
Added associated autotests
2012-02-15 11:03:30 +01:00
Jocelyn Fiat
fbec89f354
Better signature for encoders
...
Split library .ecf and the autotest .ecf
2012-02-14 18:03:42 +01:00
Jocelyn Fiat
f59d5cac32
added postcondition to ensure the body string set to the response, is the same reference
...
this is important, since sometime we just do
rep.set_body (s)
s.append_string ("..")
2012-02-14 18:02:14 +01:00
Jocelyn Fiat
4bb8a71c1b
Added DEBUG_OUTPUT to ERROR, since this is convenient during debugging
2012-02-14 18:01:17 +01:00
Jocelyn Fiat
dd6b74326e
Added notion of synchronization between error handler
...
this is convenient to integrate two components using their own ERROR_HANDLER (not sharing the same object)
2012-02-14 12:57:01 +01:00
Jocelyn Fiat
e52cd6b352
use WSF_PAGE_RESPONSE, instead of reimplementing it ourself
2012-02-14 10:20:15 +01:00
Jocelyn Fiat
537bd8241f
added a JSON encoder test case
2012-02-13 14:38:13 +01:00
Jocelyn Fiat
040c1d1c10
Merge pull request #9 from oligot/fix-libfcgi-location
...
[FIX] libfcgi.so location
2012-02-13 03:21:29 -08:00
Jocelyn Fiat
6cf35e90c6
added a case in test_json_encoder
2012-02-08 21:36:49 +01:00
Jocelyn Fiat
ca3a520bb9
fixed http_client tests
2012-02-08 16:36:54 +01:00
Jocelyn Fiat
3a9b67c8ad
Better code to test similar functions but with chunked input
2012-02-07 16:05:19 +01:00
Jocelyn Fiat
e21da4a591
Improved the WSF_PAGE_RESPONSE to be more flexible and allow to change some values as expected.
2012-02-07 15:49:02 +01:00
Jocelyn Fiat
69bc4d568c
Added support for chunked input data (see Transfer-Encoding: chunked)
2012-02-07 15:47:55 +01:00
Jocelyn Fiat
cf8d25c4e5
Added HTTP_HEADER.append_header_object and append_array.
...
This is helpful to "merge" two HTTP_HEADER and provide user friendly features
2012-02-07 15:45:44 +01:00
Jocelyn Fiat
2b9ca86501
Added proxy, at least to make it is possible to use http://fiddler2.com/ to inspect the traffic.
2012-02-07 15:44:45 +01:00
Jocelyn Fiat
2f43660628
Merge branch 'master' of https://github.com/jvelilla/Eiffel-Web-Framework
2012-02-07 15:13:59 +01:00
Jocelyn Fiat
d8476edf36
Fixed wrong code for postcondition on HTTP_HEADER.string
...
Patch provided by Paul-G.Crismer
2012-02-01 16:53:24 +01:00
Jocelyn Fiat
67e6b460b3
removed unwanted set_status_code, since we already use put_header to set the status code.
2012-02-01 16:05:30 +01:00
Jocelyn Fiat
962154fc81
Eventually fixing trouble with c_strlen being over capacity
...
(added this for testing, and while waiting a fix from EiffelcURL)
2012-02-01 11:57:42 +01:00
Jocelyn Fiat
645b35590b
Improved redirect_now_custom to allow custom status code, custom header, and custom content
2012-02-01 10:57:52 +01:00
Jocelyn Fiat
a1354136fa
Fixed usage of lst[] in web form, now we are url-decoding the name because the [] could escaped...
...
Fixed bad code for assertion related to variable url-encoded name
2012-01-31 17:57:59 +01:00
Jocelyn Fiat
945ef79857
added REQUEST_HANDLER_CONTEXT.string_array_path_parameter (...) to help user handling list/array parameters
...
fixed postcondition WSF_REQUEST.set_meta_string_variable ...
2012-01-31 12:12:41 +01:00
Jocelyn Fiat
2c4df29877
Make sure to return a response
...
Added precondition to check URI_TEMPLATE is valid
2012-01-25 16:27:22 +01:00
Jocelyn Fiat
e6687c7791
Fixed wrong assertion, status_committed instead of status_set
2012-01-24 16:47:12 +01:00
Jocelyn Fiat
754d3f670c
Fixed issue with WSF_FILE_RESPONSE not setting the status code
...
Added Last-Modified
2012-01-23 18:20:25 +01:00