]> git.immae.eu Git - github/shaarli/Shaarli.git/commit - index.php
HTTP: move utils to a proper file, add tests 334/head
authorVirtualTam <virtualtam@flibidi.net>
Tue, 1 Sep 2015 19:45:06 +0000 (21:45 +0200)
committerVirtualTam <virtualtam@flibidi.net>
Sun, 6 Sep 2015 17:30:26 +0000 (19:30 +0200)
commit451314eb48c7d922264adc6eada8a0273b12344c
treefddc1a6d7a92728d0dfdcbb676f113a09325b1c2
parentf5d6b19b73cd026cb1d937aab16d48b43e412c77
HTTP: move utils to a proper file, add tests

Relates to #333

Modifications:
 - move HTTP utils to 'application/HttpUtils.php'
 - simplify logic
   - replace 'http_parse_headers_shaarli' by built-in 'get_headers()'
   - remove superfluous '$status' parameter (provided by the HTTP headers)
 - apply coding conventions
 - add test coverage (unitary only)

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
application/HttpUtils.php [new file with mode: 0644]
index.php
tests/HttpUtilsTest.php [new file with mode: 0644]