Commit Graph
37 Commits
Author SHA1 Message Date
Olivier Ligot c9b44414b1 Fix the CSS so that we don't see the scrollbar
This commit fixes the CSS so that we don't see the scrollbar anymore.
It just removes the width: 100% property on the div elements.
2013-05-17 16:33:00 +02:00
Olivier Ligot d8987f8718 Display suggestion is now configurable.
Commit 665772bda2 forces to display only
suggestion for the request's method (this was not the case before).

This commit allows to configure this behaviour: it keeps the current behaviour
but also allows to use the other behaviour where the suggestion is displayed
for each request method (as it was before).
2013-05-17 15:36:37 +02:00
Olivier Ligot 1198d6cef4 Merge remote-tracking branch 'upstream/master' into cors 2013-03-15 14:54:43 +01:00
Olivier Ligot 2ff2dbb7c3 Merge branch 'cors' of github.com:oligot/EWF into cors 2013-03-15 14:19:52 +01:00
Olivier Ligot c8845e7354 Fix indentation 2013-03-15 14:18:13 +01:00
Olivier Ligot dde70512d8 Use features from the flexible_response branch 2013-03-15 14:15:17 +01:00
Olivier Ligot 69495e69a9 Filter example: remove unused libraries in ecf file 2013-03-15 13:44:24 +01:00
Olivier Ligot 45f0971594 Use new upstrem method put_header_key_values 2013-03-15 13:38:40 +01:00
Olivier Ligot 496b831956 Merge remote-tracking branch 'jocelyn/flexible_response' into cors
Conflicts:
	examples/filter/filter-safe.ecf
	examples/filter/src/filter_server.e
	library/network/protocol/http/src/http_header.e
	library/server/wsf/src/wsf_response.e
2013-03-15 13:33:13 +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
Olivier Ligot 10c02219e3 Use execution_variable instead of context
This is mainly to be compatibe with other classes API.

In a lot of classes, we define methods like this:
```Eiffel
 method (req: WSF_REQUEST; res: WSF_RESPONSE)
    do
        ...
    end
```

With the context, the signature becomes:
```Eiffel
 method (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
    do
        ...
    end
```

So, I can't build a filter chain where one filter is with context
and one is without context (I can't call
WSF_FILTER.set_next (a_next: WSF_FILTER) with a filter that is a
descendant of WSF_CONTEXT_HANDLER).

Moreover, having to play with generic types just to pass some
data from one filter to another is a bit overkill imho.
Because this is really what I use contexts for:
to pass data from one filter to the next one.

Regarding execution_variable and strong typing, if we want to achieve these,
I realize we could write a class with one getter and one setter like this:

```Eiffel
  class
    TYPED_DATA

  feature -- Access

  user (req: WSF_REQUEST): detachable USER
    do
        if attached {USER} req.execution_variable ("user") as l_user then
            Result := l_user
        end
    end

  feature -- Element change

  set_user (req: WSF_REQUEST; a_user: USER)
    do
        req.set_execution_variable ("user", a_user)
    end
```

Now, I realize this is a major change since the last time we talked about this,
but at the end, after having played with both, I prefer the one with
execution_variable.
2013-01-23 10:20:03 +01:00
Olivier Ligot c89a3f007f Added {HTTP_HEADER}.put_header_key_values
This is mainly a refactoring that is useful for an upcoming PR
regarding CORS (smaller patches are better...)

Note that this also fixes a small typo where an extra space was
added when calling {HTTP_HEADER}.put_allow
2013-01-22 17:09:23 +01:00
Olivier Ligot af58d87d79 Filter example: all libraries are now readonly 2013-01-22 16:42:53 +01:00
Olivier Ligot ff57d0ecd4 Cross-Origin Resource Sharing initial support
Initial support for the Cross-Origin Resource Sharing specification.
This allows JavaScript to make requests across domain boundaries.

Also reviewed the filter example to get rid of the context and
the generic classes (we can actually use {WSF_REQUEST}.execution_variable
and {WSF_REQUEST}.set_execution_variable).

Links:
* How to enable server-side: http://enable-cors.org/server.html
* Specification: http://www.w3.org/TR/cors/
* Github: http://developer.github.com/v3/#cross-origin-resource-sharing
2013-01-09 17:34:50 +01:00
Olivier Ligot aadfdec1ae Fix a small typo: you are instead of your are 2013-01-07 11:11:42 +01:00
Olivier Ligot ed325f81e1 use /usr/lib/libfcgi.so instead of /usr/local/lib/libfcgi.so
This was already fixed in libfcgi.ecf
(commit 65a998cec3)
This fixes the libfcgi-safe.ecf file
2012-12-12 13:34:50 +01:00
Olivier Ligot 233de09c48 Fix {JSON_OBJECT}.hash_code implementation
Don't call {HASH_TABLE}.item_for_iteration when {HASH_TABLE}.off
Use {HASH_TABLE}.out instead
2012-12-10 17:39:22 +01:00
Olivier LigotandJocelyn Fiat 4ed8365afe ise_wizard Unix shell scripts 2012-12-05 22:30:16 +01:00
Olivier LigotandJocelyn Fiat a6ca54f958 Fix ise_wizard
* ewf.ini was used instead of template.ecf as configuration file
* remove initialize_router otherwise the compilation failed
* remove unused variables
2012-12-05 22:30:14 +01:00
Olivier LigotandJocelyn Fiat 075ac1d628 Logging filter
The logging filter is now part of EWF core (before it was only available in
the filter example) and can therefore be reused by others needing it.
Note that this is a first implementation. It can certainly be improved in
the future to support more fine grained logging.
2012-12-05 22:30:12 +01:00
Olivier Ligot eb676bd14b ise_wizard Unix shell scripts 2012-12-04 14:42:09 +01:00
Olivier Ligot e9376b5d16 Fix ise_wizard
* ewf.ini was used instead of template.ecf as configuration file
* remove initialize_router otherwise the compilation failed
* remove unused variables
2012-12-03 17:37:26 +01:00
Olivier Ligot fc8188aeb1 Logging filter
The logging filter is now part of EWF core (before it was only available in
the filter example) and can therefore be reused by others needing it.
Note that this is a first implementation. It can certainly be improved in
the future to support more fine grained logging.
2012-12-03 16:29:12 +01:00
Olivier Ligot 6cd21c39eb [FIX] Indentation 2012-09-12 22:01:13 +02:00
Olivier Ligot f361ce65c6 [FIX] Convertion from HASH_TABLE keys to JSON 2012-09-12 20:05:49 +02:00
Olivier Ligot d01bccbc84 Merge branch 'master' into fix_hash_table_converter 2012-09-12 19:54:06 +02:00
Olivier Ligot 42b971f28e [FIX] Unknown identifier 'unescaped_string' 2012-09-12 17:14:49 +02:00
Olivier Ligot b33d471cf8 [FIX] Path to libraries 2012-09-05 14:18:43 +02:00
Olivier Ligot 7ba863f43c Merge remote-tracking branch 'upstream/master' into filter 2012-09-05 14:08:41 +02:00
Olivier Ligot 74334e665d [ADD] Filter: pre-process incoming data and post-process outgoing data
Filters are part of a filter chain, thus following the chain of responsability
design pattern.
More information are available in library/server/wsf/src/filter/README.md
2012-08-10 10:09:59 +02:00
Olivier Ligot aedf8ec1cd [FIX] Convertion from DS_HASH_TABLE keys to JSON
This is useful when the type of the key is something else than a STRING
and we have a JSON converter for this type.
2012-08-02 14:06:48 +02:00
Olivier LigotandJocelyn Fiat ff713a42ab [REM] Remove unneeded precondition 2012-04-02 09:28:22 +02:00
Olivier LigotandJocelyn Fiat 155c45be6c [IMP] Ignore *.swp files 2012-04-02 09:28:10 +02:00
Olivier Ligot 425c276051 [REM] Remove unneeded precondition 2012-03-27 11:30:42 +02:00
Olivier Ligot 0040e4b0d0 [IMP] Ignore *.swp files 2012-03-27 11:29:33 +02:00
Olivier Ligot b862065c04 Merge branch 'master', remote branch 'upstream/master' 2012-03-26 17:19:02 +02:00
Olivier Ligot f3c779cf6e [FIX] libfcgi.so location
On Ubuntu 10.04 LTS, libfcgi.so is in /usr/lib instead of /usr/local/lib
2012-02-10 14:01:04 +01:00