Philipp Holzer
81ad618480
Merge branch 'task/httprequest_optimiziations' of https://github.com/nupplaphil/friendica into task/httprequest_optimiziations
2021-08-25 18:01:34 +02:00
Philipp Holzer
4ddaf49f53
Revert setCookieJar() and add overwrite parameter fpr rare cases
2021-08-25 18:01:07 +02:00
Philipp
f10de08166
Update src/Network/IHTTPClient.php
...
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2021-08-25 17:02:42 +02:00
Philipp
f00da9eccf
Update src/Network/IHTTPClient.php
...
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2021-08-25 17:02:34 +02:00
Philipp Holzer
a6258cfbfa
Adapt description for "accept_content"
2021-08-25 14:28:59 +02:00
Philipp Holzer
12367648fa
Add suggestions
2021-08-25 14:22:43 +02:00
Philipp Holzer
7d251f092e
Add logpoint
2021-08-25 14:22:43 +02:00
Philipp Holzer
f01d882e6c
Fix HTTPClient
2021-08-25 14:22:43 +02:00
Philipp Holzer
2356221aba
Fixup HTTP headers for httpClient requests
2021-08-25 14:22:43 +02:00
Philipp Holzer
10e6089405
Fixing https://github.com/friendica/friendica/issues/10473#issuecomment-903993836
2021-08-25 14:22:42 +02:00
Philipp Holzer
3eb2abdb2a
Adapt tests
2021-08-25 14:22:42 +02:00
Philipp Holzer
8385ee7a61
Use mattwright/urlresolver for HTTPClient::finalUrl()
2021-08-25 14:22:42 +02:00
Philipp Holzer
e576af218b
Use Guzzle for HTTPClient::post()
2021-08-25 14:22:42 +02:00
Philipp Holzer
736277dcf0
Refactor HTTPClient::get() / ::head()
2021-08-25 14:22:42 +02:00
Philipp Holzer
52c7948526
Create HTTPClientFactory and introduce ImageTest
2021-08-25 14:22:42 +02:00
Hypolite Petovan
17944c01ea
Allow a GuzzleResponse body to be queried more than once
...
- Using `StreamInterface->getContents` left the stream index at the end of the stream, which made every subsequent call to `getBody()` return empty string
- Using `StreamInterface->__toString()` magic method correctly seek the stream to the start before reading
2021-08-24 11:30:11 -04:00
Philipp Holzer
ff2d85b703
Initialize $curlOptions[CURLOPT_HTTPHEADER] outside of the checks
2021-08-22 22:49:55 +02:00
Philipp Holzer
c3eca0cfae
Remove legacy header-parsing for guzzle
2021-08-22 22:43:28 +02:00
Philipp Holzer
8f13319c73
remove unused $redirect parameter
2021-08-20 22:30:54 +02:00
Philipp Holzer
9eba32226c
make CS happy :)
2021-08-20 22:11:36 +02:00
Philipp Holzer
65ca164487
A lot of Fixings
2021-08-20 21:35:14 +02:00
Philipp Holzer
06371d29a6
Cleanup
2021-08-20 20:03:42 +02:00
Philipp Holzer
a338e4cbff
Update src/Network/GuzzleResponse.php
2021-08-20 19:58:42 +02:00
Philipp Holzer
756f57f198
Revert "Use last entry for Content-Type
2021-08-20 19:58:42 +02:00
Philipp Holzer
50e2478189
Remove unnecessary exception message (avoid log flooding)
2021-08-20 19:58:42 +02:00
Philipp Holzer
1995feff61
Fix redirect logging
2021-08-20 19:58:42 +02:00
Philipp Holzer
26401e88b8
IHTTPResult::getContentType is now a string again
2021-08-20 19:58:42 +02:00
Philipp Holzer
82f767f2ee
Fix Content-Type for CurlResult
class
2021-08-20 19:58:42 +02:00
Philipp Holzer
803c1d71de
Fix IHTTPResult::getHeader()
...
- Now returns a string array, like expected
- Fix usages
- Fix dataset
2021-08-20 19:58:42 +02:00
Philipp Holzer
3c074ab315
HTTPRequest: Replace getInfo() with new parameter 'content_length'
2021-08-20 19:58:42 +02:00
Philipp Holzer
89f718ec72
Use CurlResult for failed HTTPRequests (legacy usage)
2021-08-20 19:58:42 +02:00
Philipp Holzer
dee1899628
Fix IHTTPResult::getHeader/s()
...
- Split functionality "getHeader()" and "getHeaders()" analog to IMessageInterface::getHeader/s()
- Fix functionality at various places - Adapt CurlResultTest
2021-08-20 19:58:42 +02:00
Philipp Holzer
a60ca4a1cf
Use Guzzle for HTTPRequest and Result
2021-08-20 19:58:42 +02:00
Philipp Holzer
05ecd1e3d4
Replace IHTTPResult for CurlResult usages
2021-08-20 19:58:42 +02:00
Philipp Holzer
7009d90add
Introduce IHTTPResult Interface as abstraction for CurlResult
2021-08-20 19:58:42 +02:00
Hypolite Petovan
6f13663c45
Return early if body is empty in Network\Probe::updateFromFeed
...
- Address https://github.com/friendica/friendica/issues/10473#issuecomment-894815271
2021-08-17 09:35:44 -04:00
Michael
bee04f86ee
Matrix addresses can be entered in the profile
2021-08-09 01:39:09 +00:00
Michael
d6c25dc63c
Handle profile page detection without a type
2021-08-05 11:37:04 +00:00
Michael
9f19adf8bb
Use the general function ro create an avatar path
2021-08-02 22:28:42 +00:00
Hypolite Petovan
dfb043ce60
Add Exception for empty User::getOwnerDataById(0 return case in Protocol\ActivityPub\Transmitter::getProfile()
...
- Address https://github.com/friendica/friendica/issues/10473#issuecomment-882781552
- Add try-catch blocks to all references of Protocol\ActivityPub\Transmitter::getProfile()
2021-07-27 16:46:08 -04:00
Michael
c89533a70b
Support for stacked profiler analysis
2021-07-27 04:57:29 +00:00
Michael
2647514603
Detection of local requests
2021-07-19 06:14:14 +00:00
Michael
01abea7c25
Don't probe non existing local contacts
2021-07-19 04:49:58 +00:00
Michael
aa6313dee6
Improved detection for a local contact
2021-07-19 04:15:57 +00:00
Michael
09aa496387
Some more places changed to the new contact avatar path format
2021-06-30 16:58:46 +00:00
Michael
fe07dc828b
Fix noscrape publishing and pulling, added header
2021-06-17 11:23:32 +00:00
Philipp Holzer
965cd8b096
Fix PHP 7.0 Coding Standards
2021-05-22 23:47:35 +02:00
Michael
5a00902e11
Avoid HTML parsing of an empty body
2021-04-10 05:46:19 +00:00
Balázs Úr
054c301ef0
Update copyright
2021-03-29 08:40:20 +02:00
Hypolite Petovan
77b24a0b66
Quit earlier in ProbeURL->getFeedLink if body is empty
2021-02-23 16:06:34 -05:00
Adam Clark
8248f6942f
Quit when message is empty, similar to #9681
2021-02-23 10:16:59 -08:00
Michael
fec5f2c217
Fix a notice when the path is empty
2020-12-31 07:54:56 +00:00
Michael
e22bb32247
Store the network profiler data
2020-12-17 06:23:03 +00:00
Hypolite Petovan
61aa4efa89
Account for missing contact in dfrn_request_post
...
- Address https://github.com/friendica/friendica/issues/9250#issuecomment-743407998
2020-12-13 12:18:10 -05:00
Philipp Holzer
d524a9569f
lower loglevel
2020-10-18 22:32:36 +02:00
Philipp Holzer
a74d88c4ee
Remove 'headers' option occurrences and add a warning if used.
2020-10-18 22:31:26 +02:00
Philipp Holzer
c19f1a83ce
Remove option 'novalidate' flag from HTTPRequest options
2020-10-18 22:23:07 +02:00
Philipp Holzer
54d78f9ce1
Removed completely un-used 'http_auth' option from HTTPRequest
2020-10-18 22:19:03 +02:00
Philipp Holzer
61da51c2d5
Add HTTPRequest::head() function
2020-10-18 22:15:53 +02:00
Philipp Holzer
a6fc9cd32e
Remove $binary flag for HTTPRequest::get(), HTTPRequest::fetch(), HTTPRequest::fetchAll() (deprecated since PHP 5.1.3)
2020-10-18 20:56:31 +02:00
Philipp Holzer
909da78e20
Revert "Introduce IHTTPResult Interface as abstraction for CurlResult"
...
This reverts commit f238f4ef
2020-10-11 23:26:22 +02:00
Philipp Holzer
b70b9d1139
Revert "Replace IHTTPResult for CurlResult usages"
...
This reverts commit 97167d7b
2020-10-11 23:26:17 +02:00
Philipp Holzer
0aaad3e392
Revert "Use Guzzle for HTTPRequest and Result"
...
This reverts commit fff94563
2020-10-11 23:26:12 +02:00
Philipp Holzer
069753416d
Revert "Fix IHTTPResult::getHeader/s() - Split functionality "getHeader()" and "getHeaders()" analog to IMessageInterface::getHeader/s() - Fix functionality at various places - Adapt CurlResultTest"
...
This reverts commit 933ea7c9
2020-10-11 23:26:03 +02:00
Philipp Holzer
9536a0e39c
Revert "Use CurlResult for failed HTTPRequests (legacy usage)"
...
This reverts commit 1a42f35a
2020-10-11 23:25:51 +02:00
Philipp Holzer
2e8ad098b9
Revert "HTTPRequest: Replace getInfo() with new parameter 'content_length'"
...
This reverts commit f3cd973c
2020-10-11 23:25:47 +02:00
Philipp Holzer
0449077126
Revert "Fix IHTTPResult::getHeader() - Now returns a string array, like expected - Fix usages - Fix dataset"
...
This reverts commit 80bd0a4d
2020-10-11 23:25:40 +02:00
Philipp Holzer
6fcbb9866f
Revert "Fix Content-Type for CurlResult
class"
...
This reverts commit 02bc99f6
2020-10-11 23:25:33 +02:00
Philipp Holzer
40349bfdc4
Revert "IHTTPResult::getContentType is now a string again"
...
This reverts commit 40b11442
2020-10-11 23:25:29 +02:00
Philipp Holzer
88c95a352b
Revert "Fix redirect logging"
...
This reverts commit b8314f0c
2020-10-11 23:25:23 +02:00
Philipp Holzer
36ba6b9f2d
Revert "Remove unnecessary exception message (avoid log flooding)"
...
This reverts commit 8c718515
2020-10-11 23:25:19 +02:00
Philipp Holzer
16f5965fd4
Revert "Use last entry for Content-Type"
...
This reverts commit e17befb7
2020-10-11 23:25:14 +02:00
Philipp Holzer
ef06fab744
Revert "Update src/Network/GuzzleResponse.php"
...
This reverts commit 79e667b3
2020-10-11 23:24:40 +02:00
Philipp Holzer
b526e6b415
Fix GuzzleHttpClient
...
- Add sink (= specify temp store for the body)
- Fix HTTP header merge
2020-10-11 21:45:52 +02:00
Philipp
79e667b3d1
Update src/Network/GuzzleResponse.php
...
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2020-10-11 00:33:36 +02:00
Philipp Holzer
e17befb7d6
Use last entry for Content-Type
2020-10-10 23:11:30 +02:00
Philipp Holzer
8c7185154d
Remove unnecessary exception message (avoid log flooding)
2020-10-10 23:11:30 +02:00
Philipp Holzer
b8314f0c30
Fix redirect logging
2020-10-10 23:11:30 +02:00
Philipp Holzer
40b11442c2
IHTTPResult::getContentType is now a string again
2020-10-10 23:11:30 +02:00
Philipp Holzer
02bc99f67b
Fix Content-Type for CurlResult
class
2020-10-10 23:11:30 +02:00
Philipp Holzer
80bd0a4d5a
Fix IHTTPResult::getHeader()
...
- Now returns a string array, like expected
- Fix usages
- Fix dataset
2020-10-10 23:11:30 +02:00
Philipp Holzer
f3cd973cbe
HTTPRequest: Replace getInfo() with new parameter 'content_length'
2020-10-10 23:11:30 +02:00
Philipp Holzer
1a42f35a3c
Use CurlResult for failed HTTPRequests (legacy usage)
2020-10-10 23:11:30 +02:00
Philipp Holzer
933ea7c9ce
Fix IHTTPResult::getHeader/s()
...
- Split functionality "getHeader()" and "getHeaders()" analog to IMessageInterface::getHeader/s()
- Fix functionality at various places
- Adapt CurlResultTest
2020-10-10 23:11:30 +02:00
Philipp Holzer
fff94563d7
Use Guzzle for HTTPRequest and Result
2020-10-10 23:11:30 +02:00
Philipp Holzer
97167d7b90
Replace IHTTPResult for CurlResult usages
2020-10-10 23:11:30 +02:00
Philipp Holzer
f238f4efbe
Introduce IHTTPResult Interface as abstraction for CurlResult
2020-10-10 23:11:30 +02:00
Philipp Holzer
8318a0b640
Move ExAuth, FKOAuth1 & FKOAuthDataStore to own namespace Friendica\Security
2020-09-30 11:14:01 +02:00
Michael
98a905a4c2
Remove unneeded function
2020-09-16 05:05:15 +00:00
Michael
55e169db49
Configurable list of domains to ignore redirects
2020-09-16 04:56:37 +00:00
Michael
5af713b336
Issue 9137: Fix "Incorrect integer value:"
2020-09-06 09:41:32 +00:00
Michael
cbf1e5c699
New field "manually-approve" for contact table
2020-09-02 03:02:50 +00:00
Michael
41c96f787d
Use the AP adress for probing webfinger
2020-08-23 07:24:39 +00:00
Michael
4285f4643f
Fix Test
2020-08-22 15:19:34 +00:00
Michael
eb95314aaa
Avoid locally probing last item via network
2020-08-19 04:45:31 +00:00
Michael
d9fc0ae0ea
Using a constant value for the default avatar
2020-08-18 20:30:24 +00:00
Michael
76bcf27130
"localProbe" is used only locally
2020-08-18 19:48:14 +00:00
Michael
5aba1df497
Use "User::getIdForURL"
2020-08-18 19:45:01 +00:00
Michael
f1a8db4e76
Use the owner data to collect all data
2020-08-18 17:30:48 +00:00
Michael
c3bfa9f1c1
Don't probe on local profiles via network
2020-08-18 16:42:01 +00:00