Commit Graph

5 Commits

Author SHA1 Message Date
Amnon Heiman
8a0538a218 http: fix query parameter parsing of last parameter
When serving a request with multiple query parameters the last parameter
was parsed incorectly.

This fix the issue and add a test to verify it

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-04-21 10:29:14 +03:00
Amnon Heiman
53604f1fae Adding file transformers to http
Files transformers are used to replace file content before retrieving
it. Specifically, it is used to return swagger definition files with the
host and protocol replaced.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-04-05 09:53:33 +03:00
Amnon Heiman
6512d7f7fb http support query parameter and url encoding
Http url encode query parameters by adding a question mark after the uri
with pairs of key=value items.

All values in the url are url decoded.

This add the url encoding and query parameters support

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-03-30 15:38:41 +03:00
Amnon Heiman
950d921df3 Http server handlers to use future
The http server handlers can sometimes need to perform async operation,
specifically, when reading files from the disk.  To support async
behavior the handlers handle function will return a future, that will be
propagate back, when the future will be ready it will return the reply
to be sent.

When switching from direct function call to future, there is also a need
to switch from references to pointers.

Note that while the request will be discarded, the reply will be
propagate back via the future to the caller.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-03-30 15:38:41 +03:00
Amnon Heiman
810d8c88d8 Adding httpd tests 2015-03-08 21:55:57 +02:00