1414
1515 You should have received a copy of the GNU Lesser General Public
1616 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
1818 USA
1919*/
2020
21- #include " http_endpoint.hpp"
21+ #include " details/ http_endpoint.hpp"
2222#include " http_utils.hpp"
2323#include " string_utilities.hpp"
2424
@@ -67,7 +67,7 @@ http_endpoint::http_endpoint
6767 {
6868 for (unsigned int i = 0 ; i< parts.size (); i++)
6969 {
70- if ((parts[i] != " " ) && (parts[i][0 ] != ' {' ))
70+ if ((parts[i] != " " ) && (parts[i][0 ] != ' {' ))
7171 {
7272 if (first)
7373 {
@@ -85,14 +85,14 @@ http_endpoint::http_endpoint
8585 {
8686 this ->url_modded += " /" + parts[i];
8787 }
88- }
89- else
88+ }
89+ else
9090 {
9191 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+ )
9696 {
9797 int bar = parts[i].find_first_of (' |' );
9898 if (bar != (int )string::npos)
@@ -128,8 +128,8 @@ http_endpoint::http_endpoint
128128 }
129129 }
130130 this ->chunk_positions .push_back (i);
131- }
132- else
131+ }
132+ else
133133 {
134134 throw bad_http_endpoint ();
135135 }
@@ -156,7 +156,7 @@ http_endpoint::http_endpoint
156156 if (use_regex)
157157 {
158158 this ->url_modded += " $" ;
159- regcomp (&(this ->re_url_modded ), url_modded.c_str (),
159+ regcomp (&(this ->re_url_modded ), url_modded.c_str (),
160160 REG_EXTENDED|REG_ICASE|REG_NOSUB
161161 );
162162 reg_compiled = true ;
@@ -173,7 +173,7 @@ http_endpoint::http_endpoint(const http_endpoint& h):
173173 reg_compiled (h.reg_compiled)
174174{
175175 if (this ->reg_compiled )
176- regcomp (&(this ->re_url_modded ), url_modded.c_str (),
176+ regcomp (&(this ->re_url_modded ), url_modded.c_str (),
177177 REG_EXTENDED|REG_ICASE|REG_NOSUB
178178 );
179179}
@@ -185,7 +185,7 @@ http_endpoint& http_endpoint::operator =(const http_endpoint& h)
185185 this ->family_url = h.family_url ;
186186 this ->reg_compiled = h.reg_compiled ;
187187 if (this ->reg_compiled )
188- regcomp (&(this ->re_url_modded ), url_modded.c_str (),
188+ regcomp (&(this ->re_url_modded ), url_modded.c_str (),
189189 REG_EXTENDED|REG_ICASE|REG_NOSUB
190190 );
191191 this ->url_pars = h.url_pars ;
@@ -194,12 +194,12 @@ http_endpoint& http_endpoint::operator =(const http_endpoint& h)
194194 return *this ;
195195}
196196
197- bool http_endpoint::operator <(const http_endpoint& b) const
197+ bool http_endpoint::operator <(const http_endpoint& b) const
198198{
199199 COMPARATOR (this ->url_modded , b.url_modded , toupper);
200200}
201201
202- bool http_endpoint::match (const http_endpoint& url) const
202+ bool http_endpoint::match (const http_endpoint& url) const
203203{
204204 if (this ->family_url && (url.url_pieces .size () >= this ->url_pieces .size ()))
205205 {
@@ -220,7 +220,7 @@ bool http_endpoint::match(const http_endpoint& url) const
220220 return regexec (&(this ->re_url_modded ), nn.c_str (), 0 , NULL , 0 ) == 0 ;
221221 }
222222 else
223- return regexec (&(this ->re_url_modded ),
223+ return regexec (&(this ->re_url_modded ),
224224 url.url_modded .c_str (), 0 , NULL , 0 ) == 0 ;
225225}
226226
0 commit comments