Daniel Stelljes
54440d1db0
Removed static body variable from Request
10 years ago
Daniel Stelljes
703536d2bf
Set up request body caching
10 years ago
Mike Cao
ef76d72b56
Added ability to get all saved variables.
11 years ago
Lars-Jørgen Kristiansen
d5e808a495
fixed message for http code 306
11 years ago
Lars-Jørgen Kristiansen
b8a1c1e163
added all HTTP status codes from http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
11 years ago
Lars-Jørgen Kristiansen
e6ed90e3fb
Added more HTTP status codes
11 years ago
Mike Cao
64d384ddff
Splat should consider trailing slash in URLs.
11 years ago
Mike Cao
88f4c1fb71
Fixed issue with splats when used with named parameters.
11 years ago
Mike Cao
7745f6a34c
Merge pull request #141 from pine3ree/patch-1
...
replacing array_push with faster []
11 years ago
maks feltrin
bcb5b120a9
Update Router.php
11 years ago
maks feltrin
229cbd24f5
replacing array_push with faster []
11 years ago
kafene
3392751dba
Add support for getting request status
11 years ago
kafene
71f66b4d5d
Add support for HTTP status code 418 (Permanent Redirect)
11 years ago
Mike Cao
c0fa0bed7c
Redirects should always consider the base directory.
11 years ago
Stefan Meinecke
5e284a1d9c
Updated class comment.
...
- removed deprecated json property
- added missing secure, accept and proxy_ip property
11 years ago
Mike Cao
81041d418b
JSON request input is now stored in the data property.
11 years ago
Mike Cao
da40e03eb4
Removed the body property from the Request class.
11 years ago
Mike Cao
d84e51ba47
Updated route object passing functionality.
...
Before the route object would automatically be passed to all callbacks. Now you need to explicitly
ask for it by passing in true as the third parameter in Flight::route().
11 years ago
Mike Cao
ab2aba4e7d
Added method to get the request body.
11 years ago
Mike Cao
0f49cc7abc
Converted helper methods to public and static.
11 years ago
Cuonic
d097c21dcb
Fixed code to work when body is empty
...
Now passes empty JSON data through the collection system to remove
errors about unknown keys when posting via other methods
11 years ago
Cuonic
a8f50e2f4b
Fixed problem with Request Json array
...
Fixed content type for browsers that also send character encoding, and
now send the JSON data through the Collection system.
11 years ago
Quang Nhut Lam-Nguyen
bed3824192
Change getVar() function from private to public
...
This function is very useful to get extra headers like authorization (for JSON Web Token purpose),...
Flight::request()->getVar('custom');
11 years ago
Mike Cao
b10b294d83
Added method to get the application object instance.
11 years ago
Berkus Decker
c0c7b9dcd9
Modify Request based on feedback from Mike.
11 years ago
Berkus
62c4f2fa0b
Add support for parsed JSON property in Request.
11 years ago
Mike Cao
b9b2d0fa2d
Added ability to register callbacks for class instantiation.
11 years ago
Mike Cao
6b6397764d
Use array in str_replace call.
11 years ago
Mike Cao
6239ab4d80
Prevent collision of $template variable.
11 years ago
Pascal Borreli
2648a5216e
Fixed typos
11 years ago
Micah Wood
3a4c0c72bf
Simplify output buffering code
...
No need to use both ob_get_contents() and ob_end_clean() when you can just use ob_get_clean().
11 years ago
Mike Cao
fdb88e842a
Fixed documentation.
11 years ago
Mike Cao
7817255a61
Added ability to get splat from URL pattern.
11 years ago
Mike Cao
b8e400e1be
Converted JSONP config into a parameter. Fixed incorrect content type.
11 years ago
Mike Cao
777ac096ec
JSON method should send a clean response.
11 years ago
Mike Cao
30195237e5
Reverted response handling.
...
Caused too many conflicts with other methods. Clean up should be done before the stop method is called.
11 years ago
Mike Cao
6a1029a187
Response should only be sent once.
11 years ago
Mike Cao
b8026d9828
Sending a response should not exit the program.
...
We need to allow events to fire after the stop method is called. This will allow users to clean up resources, perform logging, etc.
11 years ago
Mike Cao
5ba910981f
Allow HTTP method overriding.
11 years ago
Mike Cao
86d1ea20e4
Fixed reference to $this.
11 years ago
Mike Cao
001c8ec301
Fixed error with calling stop method.
11 years ago
Mike Cao
6fe4e32fee
Added additional options for JSON methods.
11 years ago
Mike Cao
6696c0d267
Dispatcher should check for valid callback.
11 years ago
Mike Cao
3fde3685c5
Formatting.
11 years ago
Eric Anderson
1a0eede079
Use $_SERVER instead of getenv.
...
This partially reverts cec890c
. In addition to other cleanup the commit changed
from using $_SERVER to getenv. As @kafene said on issue #21 , getenv provides a
nicer API making the code clean. I.E.
$val = getenv('val') ?: 'default';
Instead of:
$val = isset($_SERVER['val']) ? $_SERVER['val'] : 'default';
Although this is true unfortuantly it is less reliable. Using getenv in this
way assumes the application is running under some sort of CGI interface or
an interface that is simulating the CGI interface.
While this assumption is very often true it is not always true. For example
when using [PHP built-in webserver][1] (useful for development) getenv will
return false for most of these values even through $_SERVER is populated. I
believe also some interfaces on Windows don't populate getenv.
This means that flight is not usable in those environments. By partially
reverting cec890c
we re-enable flight in those environments.
For Engine.php and Response.php I just directly reverted cec890c
. Since request
makes so much use of getenv it seemed wise to abstract the conditional checking
to keep the code clean via a private function.
The tests were also updated to populate $_SERVER instead of the environment
via putenv.
[1]: http://php.net/manual/en/features.commandline.webserver.php
11 years ago
ozh
258e56b4ec
Use $this
11 years ago
ozh
5e0627f41b
Coding style (same white space as original file)
11 years ago
ozh
4ccfe8c386
JSONP support
11 years ago
Mike Cao
7e1a098f6c
Autoloader should not throw exceptions.
12 years ago
Mike Cao
988d4f5631
Exception should be thrown and not handled.
12 years ago