Skip to content

Commit 5456e71

Browse files
committed
changes
1 parent 62e5fd2 commit 5456e71

File tree

3 files changed

+0
-40
lines changed

3 files changed

+0
-40
lines changed

src/HTTPNode.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,14 @@ namespace httpsserver {
77
_path(path),
88
_tag(tag),
99
_nodeType(nodeType) {
10-
<<<<<<< HEAD
11-
12-
=======
13-
>>>>>>> upstream/pr/54
1410
// Count the parameters and store the indices
1511
size_t idx = 0;
1612
while((idx = path.find("/*", idx)) != std::string::npos) {
1713
// Skip the "/*"
1814
idx+=2;
1915
// Assure that we have either /* at the URL's end or /*/ somewhere in between
2016
if (idx == path.size() || path[idx] == '/') {
21-
<<<<<<< HEAD
2217
_pathParamIdx.push_back(idx - 1);
23-
=======
24-
_urlParamIdx.push_back(idx - 1);
25-
>>>>>>> upstream/pr/54
2618
}
2719
};
2820
}
@@ -34,44 +26,25 @@ namespace httpsserver {
3426
}
3527
}
3628

37-
<<<<<<< HEAD
3829
bool HTTPNode::hasPathParameter() {
3930
return !_pathParamIdx.empty();
4031
}
4132

4233
ssize_t HTTPNode::getParamIdx(size_t idx) {
4334
if (idx<_pathParamIdx.size()) {
4435
return _pathParamIdx[idx];
45-
=======
46-
bool HTTPNode::hasUrlParameter() {
47-
return !_urlParamIdx.empty();
48-
}
49-
50-
ssize_t HTTPNode::getParamIdx(size_t idx) {
51-
if (idx<_urlParamIdx.size()) {
52-
return _urlParamIdx[idx];
53-
>>>>>>> upstream/pr/54
5436
} else {
5537
return -1;
5638
}
5739
}
5840

59-
<<<<<<< HEAD
6041
size_t HTTPNode::getPathParamCount() {
6142
return _pathParamIdx.size();
6243
}
6344

6445
void HTTPNode::addPathParamValidator(size_t paramIdx, const HTTPValidationFunction * validator) {
6546
_validators.push_back(new HTTPValidator(paramIdx, validator));
6647

67-
=======
68-
size_t HTTPNode::getUrlParamCount() {
69-
return _urlParamIdx.size();
70-
}
71-
72-
void HTTPNode::addURLParamValidator(uint8_t paramIdx, const HTTPValidationFunction * validator) {
73-
_validators.push_back(new HTTPValidator(paramIdx, validator));
74-
>>>>>>> upstream/pr/54
7548
}
7649

7750
std::vector<HTTPValidator*> * HTTPNode::getValidators() {

src/HTTPNode.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,8 @@ class HTTPNode {
4343
/** Stores the type of the node (as we have not runtime type information by default) */
4444
const HTTPNodeType _nodeType;
4545

46-
<<<<<<< HEAD
47-
bool hasPathParameter();
48-
size_t getPathParamCount();
49-
=======
5046
bool hasUrlParameter();
5147
size_t getUrlParamCount();
52-
>>>>>>> upstream/pr/54
5348
ssize_t getParamIdx(size_t);
5449

5550
std::vector<HTTPValidator*> * getValidators();
@@ -66,11 +61,7 @@ class HTTPNode {
6661
void addPathParamValidator(size_t paramIdx, const HTTPValidationFunction * validator);
6762

6863
private:
69-
<<<<<<< HEAD
70-
std::vector<size_t> _pathParamIdx;
71-
=======
7264
std::vector<size_t> _urlParamIdx;
73-
>>>>>>> upstream/pr/54
7465
std::vector<HTTPValidator*> _validators;
7566
};
7667

src/HTTPSCallbackFunction.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ namespace httpsserver {
1010
/**
1111
* \brief A callback function that will be called by the server to handle a request
1212
*/
13-
<<<<<<< HEAD
1413
typedef std::function<void(HTTPRequest *, HTTPResponse *)> HTTPSCallbackFunction;
15-
=======
16-
typedef void (HTTPSCallbackFunction)(HTTPRequest * req, HTTPResponse * res);
17-
>>>>>>> upstream/pr/162
1814
}
1915

2016
#endif /* SRC_HTTPSCALLBACKFUNCTION_HPP_ */

0 commit comments

Comments
 (0)