n0nag0n
bf2075245e
Got it to 90% coverage with some windows fixes
1 year ago
n0nag0n
d075fc8be6
100% View class coverage
1 year ago
n0nag0n
9a007c5216
100% Coverage for core Classes
1 year ago
n0nag0n
e36e9024c6
100% Coverage Dispatcher Class
1 year ago
n0nag0n
978a05d765
Flight class 100% coverage (too easy!)
1 year ago
n0nag0n
7b15d2cfca
100% coverage for net classes
1 year ago
n0nag0n
a416bfe19b
100% coverage for Request and Route
1 year ago
n0nag0n
0d026b16d1
added test for unique subdir setup in request
1 year ago
n0nag0n
5880579045
Merge pull request #3 from saschanos/type-fix
...
fix wrong type return
1 year ago
fadrian06
42ec161d8a
Added code format
1 year ago
fadrian06
fbcc9108c2
DocBlocks improved
1 year ago
Sascha Nos
c929626fc6
fix wrong type return
1 year ago
Mike Cao
a130231646
Merge pull request #456 from jamalo/master
...
PHP 8.1: Type declare length as int
3 years ago
Mike Cao
fc43bfb4ea
Update flight/net/Request.php
...
Co-authored-by: Michal Hybner <76526074+mu1f407@users.noreply.github.com>
3 years ago
Michal Hybner
21a0c55375
Fix JSON request with empty body
3 years ago
Jamal
d2a92aa808
Fix PHP 8.1: Assign string to int propety
...
TypeError: Cannot assign string to property flight\net\Request::$length of type int
3 years ago
Masroor Ehsan
83fd1e75a2
Added ReturnTypeWillChange attribute to Collection class methods
3 years ago
Masroor Ehsan
dd73a61c32
FIX: Typed property flight\net\Response::$body must not be accessed before initialization
3 years ago
Masroor Ehsan
b7abb4945f
check for valid json input
3 years ago
Masroor Ehsan
a2c5dd5ede
minor refactorings
4 years ago
Masroor Ehsan
5b8e743e3d
refactorings
4 years ago
Masroor Ehsan
d3feb77ce9
fixed parameter types
4 years ago
Masroor Ehsan
04e471bf46
PHP ^7.4|^8.0 compatibility
4 years ago
Mike Cao
bc5e03ca59
Merge pull request #395 from merkuriy/JsonSerializableCollection
...
Added JsonSerializable for util/Collection
4 years ago
Mike Cao
b6429d2a3c
Merge pull request #433 from juneszh/master
...
add content_length configuration
4 years ago
juneszh
ed9bbed287
add content_length configuration
4 years ago
juneszh
c649964d95
add content_length configuration
4 years ago
Mike Cao
b3120f8db2
Merge pull request #409 from pluveto/patch-1
...
Trim url
5 years ago
pluveto
ddb806a604
Trim url pattern
...
This helps support whitespaces between METHOD and URL:
```php
Flight::route('GET /auth/nonce', array($apiAuth, 'getNonce')); // `GET[space][space]/auth/nonce`
Flight::route('POST /auth/login/email', array($apiAuth, 'loginByEmail'));
```
5 years ago
Andreas Kugel
0145f629d3
Enable DELETE method to receive request body
...
Delete for CRUD needs request data in body
5 years ago
Mike Cao
da8eaefc63
Merge pull request #398 from hlidotbe/feature/request-host
...
Add host to request
6 years ago
Hugues Lismonde
b4c9c42b00
Add host to request
...
The requested host can be useful to build an url or route request based
on which host was used.
6 years ago
Hugues Lismonde
e0dfb7406d
Fix request schem
...
As mentionned in #396 , the request scheme was not as documented,
returning SERVER_PROTOCOL instead.
The `getScheme` function is now used to handle common cases (HTTPS,
FORWATED_PROTO, ...).
`request->secure` is also based on the scheme now as `$_SERVER['HTTPS']`
is unreliable for this purpose.
6 years ago
Uriy @MerkUriy Efremochkin
ceb1b5bb89
Added JsonSerializable for util/Collection and added LegacyJsonSerializable for PHP <5.4.0.
...
Closed mikecao/flight#394 .
6 years ago
Delyan Angelov
0daa3f81b5
Allow cyrillic letters in the routes, by matching the result of urldecode over the URL .
6 years ago
Alex Shadie
e25f023d43
Fixed exception catching (php < 7)
7 years ago
Alex Shadie
d3067e5eae
Some improvements for PHPdoc
7 years ago
jqs
ccf4858573
Removed extraneous ->write($url) call on redirect that was causing Safari to bugger out qwhen using HTTP2, which it tends to handle more strictly.
...
Notes:
The line above writes the URL to redirect to for the 303 then that line writes it again.
The result is a multi-line http header which causes safari to freak out when in http2 mode.
https://blog.christopherburg.com/2017/10/18/safari-11-multiline-http-headers-and-nsposixerrordomain100/
blog.christopherburg.com
Safari 11, Multiline HTTP Headers, and NSPOSIXErrorDomain:100. at A Geek With Guns
Chronicling the depravities of the State
7 years ago
Uriy Efremochkin
cc72d9a081
Code style fix
7 years ago
Uriy Efremochkin
4841466656
Fix for Doc
7 years ago
kouts
98c105d009
Update Engine.php
...
Fixed halt method so that it stops execution.
7 years ago
kouts
53f0c1671d
Update Engine.php
...
Add ```clear``` to the halt method in order to work as expected with the latest changes
7 years ago
Mike Cao
e146b8c0dd
Prevent response from sending more than once.
7 years ago
Mike Cao
5b4916d4e3
Fix conflict with external error handlers.
7 years ago
Mike Cao
7ae2011723
Sending response should not exit to allow pre-stop filters.
7 years ago
Mike Cao
1c8d06cc42
Response content-length header should use mbstring if available.
8 years ago
Yassine Addi
a0d749276f
Fix redirect method due to a mistake removing backslashes
...
The problem is that if 'flight.base_url' setting is set to 'http://localhost/flight ', then:
$url = 'http:/localhost/flight';
Notice that one backslash has been removed.
8 years ago
Mike Cao
c3c6f68909
Removed another case of $route passing. Updated tests.
8 years ago
Mike Cao
6aea7394c4
Remove $route from parameter list, only pass when dispatching callback.
8 years ago
Mike Cao
9c8d492799
Removed JSON encode depth parameter to keep PHP 5.3 compatibility.
8 years ago