Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
7b9186a5
Commit
7b9186a5
authored
12 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
HTTPClient: updated function comments
parent
0fa584c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/HTTPClient.php
+23
-11
23 additions, 11 deletions
inc/HTTPClient.php
with
23 additions
and
11 deletions
inc/HTTPClient.php
+
23
−
11
View file @
7b9186a5
...
...
@@ -150,6 +150,7 @@ class HTTPClient {
*
* @param string $url The URL to fetch
* @param bool $sloppy304 Return body on 304 not modified
* @return bool|string response body, false on error
* @author Andreas Gohr <andi@splitbrain.org>
*/
function
get
(
$url
,
$sloppy304
=
false
){
...
...
@@ -170,6 +171,7 @@ class HTTPClient {
* @param string $url The URL to fetch
* @param array $data Associative array of parameters
* @param bool $sloppy304 Return body on 304 not modified
* @return bool|string response body, false on error
* @author Andreas Gohr <andi@splitbrain.org>
*/
function
dget
(
$url
,
$data
,
$sloppy304
=
false
){
...
...
@@ -187,6 +189,9 @@ class HTTPClient {
*
* Returns the resulting page or false on an error;
*
* @param string $url The URL to fetch
* @param array $data Associative array of parameters
* @return bool|string response body, false on error
* @author Andreas Gohr <andi@splitbrain.org>
*/
function
post
(
$url
,
$data
){
...
...
@@ -517,8 +522,8 @@ class HTTPClient {
*
* Protocol, Servername and Port will be stripped from the request URL when a successful CONNECT happened
*
* @param res
s
ource &$socket
* @param string &$requesturl
* @param resource &$socket
* @param string
&$requesturl
* @return bool true if a tunnel was established
*/
function
_ssltunnel
(
&
$socket
,
&
$requesturl
){
...
...
@@ -558,9 +563,10 @@ class HTTPClient {
/**
* Safely write data to a socket
*
* @param handle $socket An open socket handle
* @param string $data The data to write
* @param string $message Description of what is being read
* @param resource $socket An open socket handle
* @param string $data The data to write
* @param string $message Description of what is being read
* @throws HTTPClientException
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function
_sendData
(
$socket
,
$data
,
$message
)
{
...
...
@@ -600,10 +606,12 @@ class HTTPClient {
* Reads up to a given number of bytes or throws an exception if the
* response times out or ends prematurely.
*
* @param handle $socket An open socket handle in non-blocking mode
* @param int $nbytes Number of bytes to read
* @param string $message Description of what is being read
* @param bool $ignore_eof End-of-file is not an error if this is set
* @param resource $socket An open socket handle in non-blocking mode
* @param int $nbytes Number of bytes to read
* @param string $message Description of what is being read
* @param bool $ignore_eof End-of-file is not an error if this is set
* @throws HTTPClientException
* @return string
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function
_readData
(
$socket
,
$nbytes
,
$message
,
$ignore_eof
=
false
)
{
...
...
@@ -650,8 +658,10 @@ class HTTPClient {
*
* Always returns a complete line, including the terminating \n.
*
* @param handle $socket An open socket handle in non-blocking mode
* @param string $message Description of what is being read
* @param resource $socket An open socket handle in non-blocking mode
* @param string $message Description of what is being read
* @throws HTTPClientException
* @return string
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function
_readLine
(
$socket
,
$message
)
{
...
...
@@ -840,6 +850,8 @@ class HTTPClient {
/**
* Generates a unique identifier for a connection.
*
* @param string $server
* @param string $port
* @return string unique identifier
*/
function
_uniqueConnectionId
(
$server
,
$port
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment