• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂d5322a20f2fb98c835b835403e758819e0db2414 (tree)
時間2010-10-13 15:01:32
作者0809216 <0809216@1ed6...>
Commiter0809216

Log Message

#535 Fix: change sorry uri regex.

git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10363 1ed66053-1c2d-0410-8867-f7571e6e31d3

Change Summary

差異

--- a/l7vsd/module/protocol/protocol_module_sessionless.cpp
+++ b/l7vsd/module/protocol/protocol_module_sessionless.cpp
@@ -300,14 +300,45 @@ protocol_module_base::check_message_result protocol_module_sessionless::check_pa
300300 bool forward_checked = false;
301301 bool sorryuri_checked = false;
302302 bool stats_checked = false;
303+
304+ // cf RFC 2396 (A. Collected BNF for URI)
303305 sregex sorry_uri_regex
304306 = +('/' >>
305- *(alpha |
306- digit |
307- (set = ';', ':', '@', '&', '=') |
308- (set = '$', '-', '_', '.', '+') |
309- (set = '!', '*', '\'', '\(', ')', ',') |
310- '%' >> repeat<2>(xdigit)));
307+ *(
308+ alpha | digit |
309+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') |
310+ '%' >> repeat<2>(xdigit) |
311+ (set = ':', '@', '&', '=', '+', '$', ',')
312+ )
313+ >>
314+ *(';' >>
315+ *(
316+ alpha | digit |
317+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') | // mark
318+ '%' >> repeat<2>(xdigit) | // escaped
319+ (set = ':', '@', '&', '=', '+', '$', ',')
320+ ) // pchar
321+ ) // param
322+ ) // segment
323+ >>
324+ !('?' >>
325+ *(
326+ (set = ';', '/', '?', ':', '@', '&', '=', '+', '$', ',') | //reserved
327+ alpha | digit |
328+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') | // mark
329+ '%' >> repeat<2>(xdigit) // escaped
330+ ) // uric
331+ ) // query
332+ >>
333+ !('#' >>
334+ *(
335+ (set = ';', '/', '?', ':', '@', '&', '=', '+', '$', ',') | //reserved
336+ alpha | digit |
337+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') | // mark
338+ '%' >> repeat<2>(xdigit) // escaped
339+ ) // uric
340+ ); // fragment
341+
311342 typedef std::vector<std::string>::const_iterator vec_str_it;
312343
313344 try {
@@ -512,14 +543,44 @@ protocol_module_base::check_message_result protocol_module_sessionless::set_para
512543 bool forward_checked = false;
513544 bool sorryuri_checked = false;
514545 bool stats_checked = false;
546+
547+ // cf RFC 2396 (A. Collected BNF for URI)
515548 sregex sorry_uri_regex
516549 = +('/' >>
517- *(alpha |
518- digit |
519- (set = ';', ':', '@', '&', '=') |
520- (set = '$', '-', '_', '.', '+') |
521- (set = '!', '*', '\'', '\(', ')', ',') |
522- '%' >> repeat<2>(xdigit)));
550+ *(
551+ alpha | digit |
552+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') |
553+ '%' >> repeat<2>(xdigit) |
554+ (set = ':', '@', '&', '=', '+', '$', ',')
555+ )
556+ >>
557+ *(';' >>
558+ *(
559+ alpha | digit |
560+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') | // mark
561+ '%' >> repeat<2>(xdigit) | // escaped
562+ (set = ':', '@', '&', '=', '+', '$', ',')
563+ ) // pchar
564+ ) // param
565+ ) // segment
566+ >>
567+ !('?' >>
568+ *(
569+ (set = ';', '/', '?', ':', '@', '&', '=', '+', '$', ',') | //reserved
570+ alpha | digit |
571+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') | // mark
572+ '%' >> repeat<2>(xdigit) // escaped
573+ ) // uric
574+ ) // query
575+ >>
576+ !('#' >>
577+ *(
578+ (set = ';', '/', '?', ':', '@', '&', '=', '+', '$', ',') | //reserved
579+ alpha | digit |
580+ (set = '-', '_', '.', '!', '~', '*', '\'', '(', ')') | // mark
581+ '%' >> repeat<2>(xdigit) // escaped
582+ ) // uric
583+ ); // fragment
523584
524585 typedef std::vector<std::string>::const_iterator vec_str_it;
525586