]> git.immae.eu Git - github/shaarli/Shaarli.git/commit - index.php
Fixes #410 - Retrieve title fails in multiple cases 432/head
authorArthurHoaro <arthur@hoa.ro>
Mon, 4 Jan 2016 09:45:54 +0000 (10:45 +0100)
committerArthurHoaro <arthur@hoa.ro>
Mon, 11 Jan 2016 20:19:31 +0000 (21:19 +0100)
commit1557cefbd76257ceb830f65806831b490faf0acc
tree787f6d8fdabe8ea2fc0c37b61d616e667cdfbda5
parentc0a50f3663e207d5df007e0fa321219c1b32d6ea
Fixes #410 - Retrieve title fails in multiple cases

  * `get_http_url()` renamed to `get_http_response()`.
  * Use the same HTTP context to retrieve response headers and content.
  * Follow HTTP 301 and 302 redirections to retrieve the title (default max 3 redirections).
  * Add `LinkUtils` to extract titles and charset.
  * Try to retrieve charset from HTTP headers first (new), then HTML content.
  * Use mb_string to re-encode title if necessary.
application/ApplicationUtils.php
application/HttpUtils.php [changed mode: 0644->0755]
application/LinkUtils.php [new file with mode: 0755]
application/Url.php [changed mode: 0644->0755]
index.php
tests/HttpUtils/GetHttpUrlTest.php
tests/LinkUtilsTest.php [new file with mode: 0644]
tests/Url/UrlTest.php