Commit Graph

21 Commits

Author SHA1 Message Date
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
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
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
80d68699b1 added "conversion" to ease the use of HTTP_HEADER 2012-01-23 15:28:06 +01:00
Jocelyn Fiat
20281bc922 HTTP_HEADER: - added put_last_modified
- 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
2012-01-06 18:27:52 +01:00
Jocelyn Fiat
f6b293d4ae Merge changes from Javier
- 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
2011-12-12 16:03:38 +01:00
Jocelyn Fiat
89572b4f33 Removed any (put|write)_file_content from the WSF_ or WGI_ OUTPUT classes
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
2011-12-12 11:16:15 +01:00
Jocelyn Fiat
cdfc6851e7 - (WGI|WSF)_RESPONSE(*) renamed write_headers_string as write_header_text
- 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
2011-11-25 20:43:04 +01:00
Jocelyn Fiat
182749d010 Moved implementation of WSF_HEADER to HTTP_HEADER in the http library 2011-11-25 14:51:46 +01:00
Jocelyn Fiat
b71a22d040 Added request method PATCH even if not really used for now, it might in the future 2011-11-16 15:52:00 +01:00
Jocelyn Fiat
955f73dee9 Added various README.md (using the markdown syntax) 2011-11-14 19:00:00 +01:00
Jocelyn Fiat
79e12b8d04 Continued reducing WGI and move implementation to WSF (Web Server Framework)
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
2011-10-21 16:58:18 +02:00
Jocelyn Fiat
5f492d6fb6 removed useless local variable 2011-10-19 00:35:32 +02:00
Jocelyn Fiat
1453873b6c Added HTTP_FILE_EXTENSION_MIME_MAPPING
Added REQUEST_FILE_SYSTEM_HANDLER to the router library
Added file system handler in "hello_routed_world" example
2011-10-14 14:13:40 +02:00
Jocelyn Fiat
4c36d75ef3 Using Transfer-Encoding: chunked in example to send response progressively 2011-10-12 17:23:24 +02:00
Jocelyn Fiat
035a133b5b Addition to "http" library, separated constants into
- 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
2011-10-12 11:51:49 +02:00
Jocelyn Fiat
0c7e6c08e7 better type for argument and result (using READABLE_...) 2011-09-09 08:50:29 +02:00
Jocelyn Fiat
4075b08b7e removed the notion of status from GW_HEADER, since it should not be part of the HTTP header
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
2011-07-27 14:51:47 +02:00
Jocelyn Fiat
917f80c0c8 added format and request method constants classes
+ license file
2011-07-18 16:36:56 +02:00
Jocelyn Fiat
bc98c5a317 Added GW_HEADER
Added pre_, post_ and rescue_execute for GW_APPLICATION
Fixed an unknown class in export clause
cosmetic + copyright
2011-07-12 17:47:17 +02:00
Jocelyn Fiat
f74ac66569 First integration of the new GW_ design more centralized on connector, and does not require specific feature on GW_APPLICATION depending on the connector.
So this is really more flexible this way, and much easier to write application supporting CGI, FCGI, Nino and so on .. as demonstrated in hello_world

This is a first version, more will come later, mainly migrating from Eiffel Web Reloaded to this Eiffel Web Framework project.
2011-07-12 11:53:00 +02:00