From goryachev@REDACTED Mon Jul 3 11:53:30 2006 From: goryachev@REDACTED (Igor Goryachev) Date: Mon, 03 Jul 2006 13:53:30 +0400 Subject: various fixes for http_uri.erl Message-ID: <87slljm2ud.fsf@yandex-team.ru> Hello. Here are several improvements for URI parsing in http_uri.erl. First is for handling data not only in US ASCII charset: *** Before: > http_uri:parse("http://www.google.com/search?hl=en&q=a%D1%85%D1%83%D0%B9&btnG=Google+Search"). {error,no_query} *** After: > http_uri:parse("http://www.google.com/search?hl=en&q=a%D1%85%D1%83%D0%B9&btnG=Google+Search"). {http,"www.google.com", 80, "/search", "?hl=en&q=a%d1%85%d1%83%d0%b9&btnG=Google+Search"} Second allows to handle arbitary data: *** Before: > http_uri:parse("http://www.google.com/search?hl=en&q=%25%25"). =ERROR REPORT==== 3-Jul-2006::13:19:49 === Error in process <0.32.0> with exit value: {function_clause,[{http_uri,hex2dec,"%"},{http_uri,scan_query,2},{http_uri,scan_pathquery,1},{http_uri,parse_http,2},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} ** exited: {function_clause,[{http_uri,hex2dec,"%"}, {http_uri,scan_query,2}, {http_uri,scan_pathquery,1}, {http_uri,parse_http,2}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** > http_uri:parse("http://www.google.com/search?hl=en&q=%foo"). =ERROR REPORT==== 3-Jul-2006::13:28:33 === Error in process <0.39.0> with exit value: {function_clause,[{http_uri,hex2dec,"o"},{http_uri,scan_query,2},{http_uri,scan_pathquery,1},{http_uri,parse_http,2},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} ** exited: {function_clause,[{http_uri,hex2dec,"o"}, {http_uri,scan_query,2}, {http_uri,scan_pathquery,1}, {http_uri,parse_http,2}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** *** After: > http_uri:parse("http://www.google.com/search?hl=en&q=%25%25"). {http,"www.google.com",80,"/search","?hl=en&q=%25%25"} > http_uri:parse("http://www.google.com/search?hl=en&q=%foo"). {http,"www.google.com",80,"/search","?hl=en&q=%25foo"} -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: http_uri_fixes.diff URL: -------------- next part -------------- -- Igor Goryachev Yandex development team. From trapexit.erlang-patches@REDACTED Mon Jul 3 17:26:33 2006 From: trapexit.erlang-patches@REDACTED (Trap Exit) Date: Mon, 03 Jul 2006 16:26:33 +0100 Subject: Test to erlang-patches@erlang.org References: Message-ID: <20060703152633.685025A1C8@mail.erlangsystems.com> This is an test message to erlang-patches@REDACTED from Trap Exit _________________________________________________________ Sent using Mail2Forum (http://www.mail2forum.com) Read this topic online here: http://trapexit.erlang-consulting.com/forum/viewtopic.php?p=70#70 From map@REDACTED Tue Jul 25 17:03:22 2006 From: map@REDACTED (Magnus Ahltorp) Date: Tue, 25 Jul 2006 17:03:22 +0200 Subject: No subject Message-ID: <62AF9D9E-44D3-4DD4-A2EA-61119E82179B@kth.se> ./lib/inets/src/http_lib/http_request.erl doesn't handle https URIs, which means that redirects from ESI breaks. --- http_request.erl~ 2006-07-25 16:43:10.000000000 +0200 +++ http_request.erl 2006-07-25 16:49:31.000000000 +0200 @@ -73,6 +73,8 @@ % %----------------------------------------------------------------------- -- is_absolut_uri("http://" ++ _) -> true; +is_absolut_uri("https://" ++ _) -> + true; is_absolut_uri(_) -> false.