Skip to content

Commit 044279e

Browse files
committed
Made ESP8266WebServer::client() return a reference (fixes esp8266#7075)
1 parent 5efdc77 commit 044279e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/ESP8266WebServer/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Other Function Calls
154154
155155
const String & uri(); // get the current uri
156156
HTTPMethod method(); // get the current method
157-
WiFiClient client(); // get the current client
157+
WiFiClient & client(); // get the current client
158158
HTTPUpload & upload(); // get the current upload
159159
void setContentLength(); // set content length
160160
void sendHeader(); // send HTTP header

libraries/ESP8266WebServer/src/ESP8266WebServer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class ESP8266WebServerTemplate
101101

102102
const String& uri() const { return _currentUri; }
103103
HTTPMethod method() const { return _currentMethod; }
104-
ClientType client() { return _currentClient; }
104+
ClientType& client() { return _currentClient; }
105105
HTTPUpload& upload() { return *_currentUpload; }
106106

107107
// Allows setting server options (i.e. SSL keys) by the instantiator

0 commit comments

Comments
 (0)