| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 376f138 commit e40eccf
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ METASOURCES = AUTO | |||
| 21 | 21 | lib_LTLIBRARIES = libhttpserver.la | |
| 22 | 22 | libhttpserver_la_SOURCES = string_utilities.cpp webserver.cpp http_utils.cpp http_endpoint.cpp http_request.cpp http_response.cpp http_resource.cpp | |
| 23 | 23 | noinst_HEADERS = httpserver/string_utilities.hpp gettext.h | |
| 24 | - nobase_include_HEADERS = httpserver.hpp httpserver/create_webserver.hpp httpserver/webserver.hpp httpserver/http_utils.hpp httpserver/http_endpoint.hpp httpserver/http_request.hpp httpserver/http_response.hpp httpserver/http_resource.hpp httpserver/binders.hpp httpserver/event_supplier.hpp httpserver/details/event_tuple.hpp httpserver/details/http_resource_mirror.hpp | ||
| 24 | + nobase_include_HEADERS = httpserver.hpp httpserver/create_webserver.hpp httpserver/webserver.hpp httpserver/http_utils.hpp httpserver/details/http_endpoint.hpp httpserver/http_request.hpp httpserver/http_response.hpp httpserver/http_resource.hpp httpserver/binders.hpp httpserver/event_supplier.hpp httpserver/details/event_tuple.hpp httpserver/details/http_resource_mirror.hpp | ||
| 25 | 25 | AM_CXXFLAGS += -fPIC -Wall | |
| 26 | 26 | libhttpserver_la_LIBADD = -lmicrohttpd | |
| 27 | 27 | libhttpserver_la_LDFLAGS = | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,11 +14,11 @@ | |||
| 14 | 14 | ||
| 15 | 15 | You should have received a copy of the GNU Lesser General Public | |
| 16 | 16 | License along with this library; if not, write to the Free Software | |
| 17 | - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 | ||
| 17 | + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 | ||
| 18 | 18 | USA | |
| 19 | 19 | */ | |
| 20 | 20 | ||
| 21 | - #include "http_endpoint.hpp" | ||
| 21 | + #include "details/http_endpoint.hpp" | ||
| 22 | 22 | #include "http_utils.hpp" | |
| 23 | 23 | #include "string_utilities.hpp" | |
| 24 | 24 | ||
@@ -67,7 +67,7 @@ http_endpoint::http_endpoint | |||
| 67 | 67 | { | |
| 68 | 68 | for(unsigned int i = 0; i< parts.size(); i++) | |
| 69 | 69 | { | |
| 70 | - if((parts[i] != "") && (parts[i][0] != '{')) | ||
| 70 | + if((parts[i] != "") && (parts[i][0] != '{')) | ||
| 71 | 71 | { | |
| 72 | 72 | if(first) | |
| 73 | 73 | { | |
@@ -85,14 +85,14 @@ http_endpoint::http_endpoint | |||
| 85 | 85 | { | |
| 86 | 86 | this->url_modded += "/" + parts[i]; | |
| 87 | 87 | } | |
| 88 | - } | ||
| 89 | - else | ||
| 88 | + } | ||
| 89 | + else | ||
| 90 | 90 | { | |
| 91 | 91 | if( | |
| 92 | - (parts[i].size() >= 3) && | ||
| 93 | - (parts[i][0] == '{') && | ||
| 94 | - (parts[i][parts[i].size() - 1] == '}') | ||
| 95 | - ) | ||
| 92 | + (parts[i].size() >= 3) && | ||
| 93 | + (parts[i][0] == '{') && | ||
| 94 | + (parts[i][parts[i].size() - 1] == '}') | ||
| 95 | + ) | ||
| 96 | 96 | { | |
| 97 | 97 | int bar = parts[i].find_first_of('|'); | |
| 98 | 98 | if(bar != (int)string::npos) | |
@@ -128,8 +128,8 @@ http_endpoint::http_endpoint | |||
| 128 | 128 | } | |
| 129 | 129 | } | |
| 130 | 130 | this->chunk_positions.push_back(i); | |
| 131 | - } | ||
| 132 | - else | ||
| 131 | + } | ||
| 132 | + else | ||
| 133 | 133 | { | |
| 134 | 134 | throw bad_http_endpoint(); | |
| 135 | 135 | } | |
@@ -156,7 +156,7 @@ http_endpoint::http_endpoint | |||
| 156 | 156 | if(use_regex) | |
| 157 | 157 | { | |
| 158 | 158 | this->url_modded += "$"; | |
| 159 | - regcomp(&(this->re_url_modded), url_modded.c_str(), | ||
| 159 | + regcomp(&(this->re_url_modded), url_modded.c_str(), | ||
| 160 | 160 | REG_EXTENDED|REG_ICASE|REG_NOSUB | |
| 161 | 161 | ); | |
| 162 | 162 | reg_compiled = true; | |
@@ -173,7 +173,7 @@ http_endpoint::http_endpoint(const http_endpoint& h): | |||
| 173 | 173 | reg_compiled(h.reg_compiled) | |
| 174 | 174 | { | |
| 175 | 175 | if(this->reg_compiled) | |
| 176 | - regcomp(&(this->re_url_modded), url_modded.c_str(), | ||
| 176 | + regcomp(&(this->re_url_modded), url_modded.c_str(), | ||
| 177 | 177 | REG_EXTENDED|REG_ICASE|REG_NOSUB | |
| 178 | 178 | ); | |
| 179 | 179 | } | |
@@ -185,7 +185,7 @@ http_endpoint& http_endpoint::operator =(const http_endpoint& h) | |||
| 185 | 185 | this->family_url = h.family_url; | |
| 186 | 186 | this->reg_compiled = h.reg_compiled; | |
| 187 | 187 | if(this->reg_compiled) | |
| 188 | - regcomp(&(this->re_url_modded), url_modded.c_str(), | ||
| 188 | + regcomp(&(this->re_url_modded), url_modded.c_str(), | ||
| 189 | 189 | REG_EXTENDED|REG_ICASE|REG_NOSUB | |
| 190 | 190 | ); | |
| 191 | 191 | this->url_pars = h.url_pars; | |
@@ -194,12 +194,12 @@ http_endpoint& http_endpoint::operator =(const http_endpoint& h) | |||
| 194 | 194 | return *this; | |
| 195 | 195 | } | |
| 196 | 196 | ||
| 197 | - bool http_endpoint::operator <(const http_endpoint& b) const | ||
| 197 | + bool http_endpoint::operator <(const http_endpoint& b) const | ||
| 198 | 198 | { | |
| 199 | 199 | COMPARATOR(this->url_modded, b.url_modded, toupper); | |
| 200 | 200 | } | |
| 201 | 201 | ||
| 202 | - bool http_endpoint::match(const http_endpoint& url) const | ||
| 202 | + bool http_endpoint::match(const http_endpoint& url) const | ||
| 203 | 203 | { | |
| 204 | 204 | if(this->family_url && (url.url_pieces.size() >= this->url_pieces.size())) | |
| 205 | 205 | { | |
@@ -220,7 +220,7 @@ bool http_endpoint::match(const http_endpoint& url) const | |||
| 220 | 220 | return regexec(&(this->re_url_modded), nn.c_str(), 0, NULL, 0) == 0; | |
| 221 | 221 | } | |
| 222 | 222 | else | |
| 223 | - return regexec(&(this->re_url_modded), | ||
| 223 | + return regexec(&(this->re_url_modded), | ||
| 224 | 224 | url.url_modded.c_str(), 0, NULL, 0) == 0; | |
| 225 | 225 | } | |
| 226 | 226 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | #define _HTTPSERVER_HPP_INSIDE_ | |
| 5 | 5 | ||
| 6 | 6 | #include "httpserver/http_utils.hpp" | |
| 7 | - #include "httpserver/http_endpoint.hpp" | ||
| 7 | + #include "httpserver/details/http_endpoint.hpp" | ||
| 8 | 8 | #include "httpserver/http_resource.hpp" | |
| 9 | 9 | #include "httpserver/http_response.hpp" | |
| 10 | 10 | #include "httpserver/http_request.hpp" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,7 @@ | |||
| 39 | 39 | #include "http_resource.hpp" | |
| 40 | 40 | #include "http_response.hpp" | |
| 41 | 41 | #include "http_request.hpp" | |
| 42 | - #include "http_endpoint.hpp" | ||
| 42 | + #include "details/http_endpoint.hpp" | ||
| 43 | 43 | #include "string_utilities.hpp" | |
| 44 | 44 | #include "details/http_resource_mirror.hpp" | |
| 45 | 45 | #include "details/event_tuple.hpp" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments