FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

refactor: remove more old stuff · expresscpp/expresscpp@bdf01ca · GitHub

Commit bdf01ca

Browse files
committed
refactor: remove more old stuff
1 parent cb606fd commit bdf01ca

2 files changed

Lines changed: 0 additions & 38 deletions

File tree

‎include/expresscpp/request.hpp‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,4 @@ class Request {
9292

9393
typedef std::shared_ptr<Request> request_t;
9494

95-
std::string getPathname(request_t req);
96-
97-
std::optional<Url> parseUrl(request_t req);
98-
99-
Url fastparse(const std::string &str);
100-
10195
} // namespace expresscpp

‎src/request.cpp‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -129,36 +129,4 @@ const std::string &Request::GetQueryString() const {
129129
return query_string_;
130130
}
131131

132-
std::string getPathname(request_t req) {
133-
const auto url = parseUrl(req);
134-
if (url.has_value()) {
135-
return url.value().pathname;
136-
}
137-
138-
return "";
139-
}
140-
141-
std::optional<Url> parseUrl(request_t req) {
142-
if (req->getUrl().size() == 0) {
143-
return std::nullopt;
144-
}
145-
146-
return fastparse(req->getUrl());
147-
}
148-
149-
Url fastparse(const std::string &str) {
150-
Url url;
151-
auto pathname = str;
152-
auto query = ""s;
153-
auto search = ""s;
154-
url.path = str;
155-
url.href = str;
156-
url.pathname = pathname;
157-
if (search != "") {
158-
url.query = query;
159-
url.search = search;
160-
}
161-
return url;
162-
}
163-
164132
} // namespace expresscpp

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL