Skip to content

Commit f1b0844

Browse files
committed
changes
1 parent 5456e71 commit f1b0844

9 files changed

+0
-42
lines changed

src/HTTPSConnection.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ namespace httpsserver {
55

66
HTTPSConnection::HTTPSConnection(ResourceResolver * resResolver):
77
HTTPConnection(resResolver) {
8-
<<<<<<< HEAD
98
_sslCtx = NULL;
109
_ssl = NULL;
1110
_TLSTickets = NULL;
12-
=======
1311
_ssl = esp_tls_init();
14-
>>>>>>> upstream/pr/169
1512
}
1613

1714
HTTPSConnection::~HTTPSConnection() {

src/HTTPSConnection.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ class HTTPSConnection : public HTTPConnection {
3636
HTTPSConnection(ResourceResolver * resResolver);
3737
virtual ~HTTPSConnection();
3838

39-
<<<<<<< HEAD
4039
virtual void initialize(int serverSocketID, HTTPHeaders *defaultHeaders, SSL_CTX * sslCtx, TLSTickets * tickets);
4140
virtual int fullyAccept() override;
42-
=======
4341
virtual int initialize(int serverSocketID,esp_tls_cfg_server_t * cfgSrv, HTTPHeaders *defaultHeaders);
44-
>>>>>>> upstream/pr/169
4542
virtual void closeConnection();
4643
virtual bool isSecure();
4744

@@ -56,15 +53,12 @@ class HTTPSConnection : public HTTPConnection {
5653

5754
private:
5855
// SSL context for this connection
59-
<<<<<<< HEAD
6056
SSL_CTX * _sslCtx;
6157
SSL * _ssl;
6258
TLSTickets * _TLSTickets;
6359

64-
=======
6560
esp_tls_t * _ssl;
6661
esp_tls_cfg_server_t * _cfg;
67-
>>>>>>> upstream/pr/169
6862
};
6963

7064
} /* namespace httpsserver */

src/HTTPSServer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ HTTPSServer::HTTPSServer(SSLCert * cert, const uint16_t port, const uint8_t maxC
99
HTTPServer(port, maxConnections, bindAddress),
1010
_cert(cert) {
1111
// Configure runtime data
12-
<<<<<<< HEAD
1312
_sslctx = NULL;
1413
_TLSTickets = NULL;
1514
}
@@ -21,7 +20,6 @@ HTTPSServer::HTTPSServer(SSLCert * cert, const uint16_t port, const uint8_t maxC
2120

2221
// Configure runtime data
2322
_sslctx = NULL;
24-
=======
2523
_cfg = new esp_tls_cfg_server();
2624
_cfg->alpn_protos = (const char **)alpn_protos;
2725
_cfg->cacert_buf = NULL;
@@ -30,7 +28,6 @@ HTTPSServer::HTTPSServer(SSLCert * cert, const uint16_t port, const uint8_t maxC
3028
_cfg->servercert_bytes = cert->getCertLength();
3129
_cfg->serverkey_buf= cert->getPKData();
3230
_cfg->serverkey_bytes= cert->getPKLength();
33-
>>>>>>> upstream/pr/169
3431
}
3532

3633
HTTPSServer::~HTTPSServer() {

src/HTTPSServer.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,22 @@ class HTTPSServer : public HTTPServer {
3434
HTTPSServer(SSLCert * cert, const uint16_t portHTTPS = 443, const uint8_t maxConnections = 4, const in_addr_t bindAddress = INADDR_ANY);
3535
HTTPSServer(SSLCert * cert, const uint16_t portHTTPS, const uint8_t maxConnections, const uint8_t bindAddress[16], const bool ipv6Only);
3636
virtual ~HTTPSServer();
37-
<<<<<<< HEAD
3837

3938
// RFC 5077 TLS session tickets
4039
void enableTLSTickets(uint32_t liftimeSeconds = 86400, bool useHardwareRNG = false);
4140

4241
virtual HTTPSConnection * createConnection() override;
4342

44-
=======
4543
virtual esp_tls_cfg_server_t *getConfig() {return _cfg;}
46-
>>>>>>> upstream/pr/169
4744
private:
4845
// Static configuration. Port, keys, etc. ====================
4946
// Certificate that should be used (includes private key)
5047
SSLCert * _cert;
5148

5249
//// Runtime data ============================================
53-
<<<<<<< HEAD
5450
SSL_CTX * _sslctx;
5551
TLSTickets * _TLSTickets;
56-
=======
5752
esp_tls_cfg_server_t * _cfg;
58-
>>>>>>> upstream/pr/169
5953
// Status of the server: Are we running, or not?
6054

6155
// Setup functions

src/HTTPServer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ void HTTPServer::stop() {
118118
if (_running) {
119119
// Set the flag that the server is stopped
120120
_running = false;
121-
<<<<<<< HEAD
122121

123122
// Clean up the connections
124123
bool hasOpenConnections = true;
@@ -135,7 +134,6 @@ void HTTPServer::stop() {
135134
_connections[i] = NULL;
136135
} else {
137136
hasOpenConnections = true;
138-
=======
139137
xSemaphoreTake(_selectMutex, portMAX_DELAY); // We won't be releasing this
140138

141139
if (_connections) {
@@ -156,7 +154,6 @@ void HTTPServer::stop() {
156154
} else {
157155
hasOpenConnections = true;
158156
}
159-
>>>>>>> upstream/pr/52
160157
}
161158
xSemaphoreGive(_connectionMutex[i]);
162159
vSemaphoreDelete(_connectionMutex[i]);

src/ResourceParameters.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,14 @@ void ResourceParameters::setQueryParameter(std::string const &name, std::string
126126
* @param value The value is written into this parameter.
127127
* @return true iff the value could be written.
128128
*/
129-
<<<<<<< HEAD
130129
bool ResourceParameters::getPathParameter(size_t const idx, std::string &value) {
131130
if (idx < _pathParams.size()) {
132131
value = _pathParams.at(idx);
133132
return true;
134133
}
135134
return false;
136-
=======
137135
std::string ResourceParameters::getUrlParameter(size_t idx) {
138136
return _urlParams.at(idx);
139-
>>>>>>> upstream/pr/54
140137
}
141138

142139
/**
@@ -151,37 +148,31 @@ std::string ResourceParameters::getUrlParameter(size_t idx) {
151148
* @param idx Defines the index of the parameter to return, starting with 0.
152149
* @return the value of the placeholder
153150
*/
154-
<<<<<<< HEAD
155151
std::string ResourceParameters::getPathParameter(size_t const idx) {
156152
if (idx < _pathParams.size()) {
157153
return _pathParams.at(idx);
158154
}
159155
return "";
160-
=======
161156
uint16_t ResourceParameters::getUrlParameterInt(size_t idx) {
162157
return parseInt(getUrlParameter(idx));
163-
>>>>>>> upstream/pr/54
164158
}
165159

166160
void ResourceParameters::resetPathParameters() {
167161
_pathParams.clear();
168162
}
169163

170-
<<<<<<< HEAD
171164
void ResourceParameters::setPathParameter(size_t idx, std::string const &val) {
172165
if(idx>=_pathParams.size()) {
173166
_pathParams.resize(idx + 1);
174167
}
175168
_pathParams.at(idx) = val;
176-
=======
177169
void ResourceParameters::setUrlParameter(size_t idx, std::string const &val) {
178170
if(idx>=_urlParams.size()) {
179171
HTTPS_LOGD("Resizing from %d to %d", _urlParams.size(), idx + 1);
180172
_urlParams.resize(idx + 1);
181173
}
182174
HTTPS_LOGD("Size is now %d, accessing idx %d", _urlParams.size(), idx);
183175
_urlParams.at(idx) = val;
184-
>>>>>>> upstream/pr/54
185176
}
186177

187178
} /* namespace httpsserver */

src/ResourceParameters.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,15 @@ class ResourceParameters {
4141
bool getPathParameter(size_t const idx, std::string &value);
4242
std::string getPathParameter(size_t const idx);
4343

44-
<<<<<<< HEAD
4544
protected:
4645
friend class ResourceResolver;
4746
void setQueryParameter(std::string const &name, std::string const &value);
4847
void resetPathParameters();
4948
void setPathParameter(size_t idx, std::string const &val);
50-
=======
5149
std::string getUrlParameter(size_t idx);
5250
uint16_t getUrlParameterInt(size_t idx);
5351
void resetUrlParameters();
5452
void setUrlParameter(size_t idx, std::string const &val);
55-
>>>>>>> upstream/pr/54
5653

5754
private:
5855
/** Parameters in the path of the URL, the actual values for asterisk placeholders */

src/ResourceResolver.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ void ResourceResolver::resolveNode(const std::string &method, const std::string
5151
size_t nextparamIdx = url.find('&', reqparamIdx);
5252

5353
// Get the "name=value" string
54-
<<<<<<< HEAD
5554
std::string param = nextparamIdx == std::string::npos ?
5655
url.substr(reqparamIdx) :
5756
url.substr(reqparamIdx, nextparamIdx - reqparamIdx);
@@ -69,7 +68,6 @@ void ResourceResolver::resolveNode(const std::string &method, const std::string
6968

7069
// Now we finally have name and value.
7170
params->setQueryParameter(name, value);
72-
=======
7371
std::string param = url.substr(reqparamIdx, nextparamIdx - reqparamIdx);
7472

7573
// Find the position where the string has to be split
@@ -80,7 +78,6 @@ void ResourceResolver::resolveNode(const std::string &method, const std::string
8078
std::string value = "";
8179
if (nvSplitIdx != std::string::npos) {
8280
value = urlDecode(param.substr(nvSplitIdx+1));
83-
>>>>>>> upstream/pr/52
8481
}
8582

8683
// Update reqparamIdx
@@ -91,14 +88,11 @@ void ResourceResolver::resolveNode(const std::string &method, const std::string
9188

9289

9390
// Check whether a resource matches
94-
<<<<<<< HEAD
9591

9692
for(std::vector<HTTPNode*>::iterator itNode = _nodes->begin(); itNode != _nodes->end(); ++itNode) {
9793
params->resetPathParameters();
98-
=======
9994
for(std::vector<HTTPNode*>::iterator itNode = _nodes->begin(); itNode != _nodes->end(); ++itNode) {
10095
params->resetUrlParameters();
101-
>>>>>>> upstream/pr/54
10296
HTTPNode *node = *itNode;
10397
if (node->_nodeType==nodeType) {
10498
if (

src/WebsocketHandler.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#include "WebsocketHandler.hpp"
2-
<<<<<<< HEAD
32
#ifndef TAG
43
#define TAG "ARDUINO"
54
#endif
6-
=======
75

86
#ifndef TAG
97
static const char *TAG = "WebsocketHandler";
108
#endif
119

12-
>>>>>>> upstream/pr/164
1310
namespace httpsserver {
1411

1512
/**

0 commit comments

Comments
 (0)