kept `key' as redirection, and also string as obsolete redirection.
Router: provide a way to pass the request methods without using manifest string, thanks to WSF_ROUTER_METHODS
so instead of using manifest array or manifest strings, just create an instance of WSF_ROUTER_METHODS
for convenience, WSF_ROUTER provides a few `methods_...' returning prebuilt WSF_ROUTER_METHODS objects
Improved code related to unicode handling in URL, and parameters (before the framework was doing too much)
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
- added RFC1123 http date format helper
- added put_cookie_with_expiration_date as DATE_TIME
REQUEST: added `execution_variable' to provide a way to keep object attached to the request
and indexed by a string. A typical usage is a SESSION object
- update on RESTbuck examples
- new example
- fixed bad typo in WSF_REQUEST
Reverted some changes such as
- http_client_response: keep the headers as a list to handle multiple message-value with same message-name
Fixed simple and simple_file example
Improved HTTP_HEADER
Changed libcurl implementation for http client
- now the header from the context really overwrite any of the session headers
- better design which is more strict, and remove any doubt about context's header usage
Now DEFAULT_SERVICE has to be created instead of inherited.
- This seems to be better for new user, and this avoid potential conflict and difference when inheriting between the various DEFAULT_SERVICE implementation.
- remember that DEFAULT_SERVICE, is mainly to help the user to build its very first service.
Use READABLE_STRING_8 as argument whenever it is possible.
Added WSF_RESPONSE_MESSAGE, and WSF_RESPONSE.put_response (a_response_message)
Now WSF_RESPONSE inherit from WGI_RESPONSE
- HTTP_HEADER.string does not have the ending CRLFCRLF .. but just CRLF
- WGI_RESPONSE.write_header_text has the responsibility to handle the last blank line CRLF (separating the header from the message)
- HTTP_HEADER.string does not set anymore a default content type as text/html
- added WGI_RESPONSE.write_header_lines (ITERABLE [TUPLE [name,value: READABLE_STRING_8]] mainly as an helper method,
this way the WGI user does not have to know about the CRLF end of line
Removed many usage of READABLE_STRING_GENERAL in favor to READABLE_STRING_8
to avoid potential nasty issues in user's code
URI-template is working only with STRING_8, then changed any _GENERAL or _STRING_32 to _STRING_8
- HTTP_MIME_TYPES
- HTTP_HEADER_NAMES
- HTTP_REQUEST_METHODS
- HTTP_STATUS_CODE (already exists)
Do not set the "Status" header when using WGI_RESPONSE_BUFFER.write_header (...)
Cosmetic
Fixed implementation of REST_REQUEST_AGENT_HANDLER to avoid wrong path in inherited routine.
Allow to build a URI_TEMPLATE from another URI TEMPLATE,
this way, if later we have more attribute (status or settings) to URI_TEMPLATE,
we'll be able to change the `template' without breaking the settings
added status setting in GW_RESPONSE
added a default implementation for write_status in OUTPUT_STREAM
(it should be moved away in the future)
removed any implementation from GW_REQUEST, and put it in GW_REQUEST_IMP