Commit Graph

55 Commits

Author SHA1 Message Date
jocelyn 637303930a Removed trimmed_string function and callers, and for now, use (left_|right_)adjust 2013-10-24 17:33:27 +02:00
Jocelyn Fiat 78ee9872bd Merge pull request #83 from jvelilla/master
Contracts, comments and cosmetic
2013-10-23 03:48:26 -07:00
jocelyn 4dd1731e60 Removed trimmed_string function and callers, and for now, use (left_|right_)adjust 2013-10-23 12:46:36 +02:00
jvelilla 2c2770b4f1 Reuse trimmed_string from HTTP_HEADER_UTILITIES.
Added description to FITNESS_AND_QUALITY.
2013-10-22 08:35:03 -03:00
jocelyn ddd19023b0 Merge branch 'content_nego_review'
Conflicts:
	library/network/protocol/content_negotiation/src/conneg_server_side.e
	library/network/protocol/content_negotiation/src/parsers/common_accept_header_parser.e
	library/network/protocol/content_negotiation/test/conneg_server_side_test.e
2013-10-18 21:30:10 +02:00
jocelyn 58dc2ec792 Updated README.md for conneg 2013-10-18 20:44:36 +02:00
jocelyn 88e6837222 Class renaming for content_negotiation
Splitted SERVER_CONTENT_NEGOTIATION in 4 differents classes for each kind of negotiation
Changed to use ITERABLE over LIST for supported variants arguments
Factorized some code for http parameter parsing such as q=1.0;note="blabla"  and so on
Integrated within EWF
2013-10-18 16:18:22 +02:00
jocelyn d376f99832 Updated content_negotiation with better class names and feature names.
Minor semantic changes in VARIANTS classes
Factorized some code in HTTP_ACCEPT_LANGUAGE
2013-10-15 23:19:12 +02:00
jocelyn 3072ce7dec Enabled assertion on content_negotiation during autotests
The tests project is now void-safe

Using force instead of put_left seems to work fine
  and is better for performance,
  and no need to check for precondition "not before"
2013-10-14 18:54:36 +02:00
jvelilla 9a10e6f2a3 Merge pull request #80 from jvelilla/master
Fixed issue# 79 Bug in CONNEG_SERVER_SIDE
2013-10-04 06:29:25 -07:00
jvelilla 60d77892e5 Fixed issue# 79 Bug in CONNEG_SERVER_SIDE 2013-10-04 10:24:19 -03:00
jvelilla f14728c1a7 Merge pull request #76 from jvelilla/master
Fixed Issue #75 CONNEG doesn't handle accept encodings correcty
2013-09-25 12:20:04 -07:00
jvelilla 295e6e9198 Added more scenarios to test accept encoding with identity. 2013-09-25 16:15:27 -03:00
jvelilla e21af4a0e8 Fixed Issue #75 CONNEG doesn't handle accept encodings correcty 2013-09-25 15:22:57 -03:00
jocelyn 843955b7b8 Reused string constants from HTTP_HEADER_NAMES 2013-09-24 15:27:02 +02:00
jvelilla bc864bde39 Added description to results classes.
Removed unnecessary class
Clean code: removed feature out, updated corresponding test cases.
2013-09-20 15:34:00 -03:00
jocelyn dd31970b01 Renamed content_negotation' as content_negotiation' (fixed typo)
Updated .ecf and Eiffel code depending on previous CONNEG
2013-09-20 15:18:56 +02:00
jocelyn f31ed103d0 Integrated changes on content negociation library 2013-09-20 15:04:50 +02:00
jvelilla 20a768749f Forgot to add class description 2013-09-19 15:16:26 -03:00
jvelilla 2d964b1137 Removed http classes related to http expectations.
Updated code based on the code review.
Still work in progress
2013-09-19 13:44:03 -03:00
jvelilla a1245b77fd New directory structure (variants, results, parsers)
Refactor STRING to READABLE_STRING_8.
Clean code, added documentation and EIS references.
2013-09-17 10:09:46 -03:00
jvelilla f2ee91764d Renamed CONNEG to content_negotiation.
Update MIME_PARSER to use HTTP_MEDIA_TYPE.
2013-09-16 23:56:01 -03:00
jocelyn fff08a29e7 Accepts "*" as valid media type (interpreted as */* to be flexible) 2013-09-16 22:33:18 +02:00
jocelyn 2f3a462c42 Fixed type having a semicolon in a parameter value such as
"text/plain; param1=%"something;foo=bar%"; param2=%"another-thing%"
2013-09-16 18:04:43 +02:00
jocelyn f8a0bbf88b Added autotests to http library in relation with mime type and content type.
Fixed an issue with more than one parameter.
2013-09-16 16:24:05 +02:00
Colin Adams 69da6c6d06 Fixes as picked up by code review 2013-08-07 11:03:22 +01:00
Colin Adams 8ab6dba1c8 New routines added to HTTP_HEADER to support ploicy-driven framework 2013-08-06 13:49:58 +01:00
jocelyn 218e73945d Updated ecf file as workaround to make autotest works fine. 2013-06-17 12:03:46 +02:00
jocelyn 2252971c3e Added HTTP_DATE.append_to...string conversion feature
Made HTTP_DATE.append_...to...string more flexible by acception STRING_GENERAL,
    so it is possible to append to STRING_32 (further more, it avoid potential implicit conversion)
2013-06-13 09:43:13 +02:00
jocelyn cc4ef1a575 Better support for unicode path and values.
Added WSF_REQUEST.percent_encoded_path_info: READABLE_STRING_8
    to keep url encoded path info, as it is useful for specific component

The router is now using WSF_REQUEST.percent_encoded_path_info
    since URI_TEMPLATE are handling URI (and not IRI)
    this fixes an issue with unicode path parameters.

This should not break existing code, and this fixes various unicode related issues related
   to PATH parameter and path info
   but also any component using file names.

(required EiffelStudio >= 7.2)
2013-06-12 18:03:11 +02:00
jocelyn fa8b3fdccc Added HTTP_DATE.make_now_utc for convenience. 2013-06-11 11:49:45 +02:00
jocelyn fbbd1f1eee Fixed various void-safety issue with recent compilers.
Note that EWF does now require EiffelStudio 7.2, and is compiling with 7.3
2013-06-07 15:40:50 +02:00
Colin Adams b321bee60e merging from upstream - stage 1 2013-03-26 17:04:49 +00:00
Jocelyn Fiat 2eb9abeb37 Added remove_header_named (a_name) 2013-03-26 10:33:06 +01:00
Colin Adams f11dbd9080 fix merge conflict from master 2013-03-21 15:55:14 +00:00
Colin Adams a6fbed22fe Implemented 503 and 414 responses in WSF_ROUTED_SERVICE 2013-03-16 14:08:33 +00: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
Jocelyn Fiat 82784529fe Enhanced HTTP_HEADER with new helper features. 2013-03-12 16:19:43 +01:00
Jocelyn Fiat 441cf86eda Enhanced HTTP_DATE with yyyy_mmm_dd output string. 2013-03-01 18:11:22 +01:00
Jocelyn Fiat 9c0a2bd6a1 prefer 2 append call, rather than create a temp intermediary string object with + 2013-02-26 15:33:00 +01:00
Jocelyn Fiat 40ea982293 Added ANSI C date time string format support in HTTP_DATE. 2013-01-31 15:30:39 +01:00
Jocelyn Fiat d172dedf31 Fixed HTTP_DATE for GMT+ offset (integer value) 2013-01-31 13:54:10 +01:00
Jocelyn Fiat 20d5798444 Added HTTP_DATE to ease http date manipulation and optimize code rather than using EiffelTime's code facilities.
Added autotests to `http' lib.
2013-01-31 11:23:11 +01:00
Jocelyn Fiat 8f232bd627 Added `append_string_to' to HTTP_HEADER 2013-01-23 16:23:10 +01:00
Jocelyn Fiat acd942b720 Minor optimization in HTTP_HEADER 2013-01-22 21:13:40 +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 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
Jocelyn Fiat c058012313 updated conneg .ecf 2012-12-20 10:18:50 +01:00
Jocelyn Fiat 59f19dc52f Fixed WSF_RESPONSE chunk transfer implementation
and also the optional extension `a_ext' should now include the ';'
Now HTTP_HEADER is an ITERABLE [READABLE_STRING_8]
2012-12-19 11:45:59 +01:00