From: Greg B. <gre...@gm...> - 2012-06-26 01:18:59
|
Hi, I just upgraded to Yaws version 1.93 (from 1.92) and I found a strange bug when I try to list a directory content with the directive "dir_listings". It returns the HTTP error code 403 and the following error is printed in the log (I removed the cookie data and replace the site name by #####): =ERROR REPORT==== 26-Jun-2012::03:01:53 === Yaws process died: {undef, [{yaws_server,deliver_accumulated, [{arg,#Port<0.732>, {{85,218,99,17},52589}, {headers,"keep-alive", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "www.#####.net:8090",undefined,undefined,undefined, undefined,undefined,undefined,undefined, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5", undefined, [""], undefined,undefined,undefined,undefined,undefined, undefined,undefined,undefined, [{http_header,9,'Accept-Charset',undefined, "UTF-8,*;q=0.5"}, {http_header,11,'Accept-Language',undefined, "en-US,en;q=0.8,fr;q=0.6,fr-CH;q=0.4"}, {http_header,10,'Accept-Encoding',undefined, "gzip,deflate,sdch"}]}, {http_request,'GET',{abs_path,"/files/"},{1,1}}, undefined,"/files/",undefined,undefined, "/var/www/#####","/","/var/www/#####/files/", undefined,undefined,<0.69.0>,[],undefined,"/files/", undefined}, #Port<0.732>,decide,undefined,final], []}, {yaws_ls,list_directory,6, [{file,"yaws_ls.erl"},{line,72}]}, {yaws_server,aloop,4, [{file,"yaws_server.erl"},{line,1151}]}, {yaws_server,acceptor0,2, [{file,"yaws_server.erl"},{line,1012}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,227}]}]} Here is the configuration files I used for this test. "yaws.conf": trace = false max_connections = 200 max_num_cached_files = 1000 max_num_cached_bytes = 40000000 max_size_cached_file = 200000 cache_refresh_secs = 0 subconfig = yaws_conf/#####.conf "www.#####.conf" <server www.#####.net> port = 8090 listen = 0.0.0.0 allowed_scripts = yaws deflate = true dir_listings = true docroot = /var/www/##### </server> I'm launching Yaws as: $>yaws -i --nodebug --id yaws_pre --sname yaws_pre --conf yaws_conf/yaws.conf Thanks in advance. /Greg |
From: Sergei G. <sgo...@ne...> - 2012-06-26 05:24:19
Attachments:
listing.diff
|
As far as I can see, in YAWS 1.93 the function yaws_server:deliver_accumulated/5 is gone and replaced by yaws_server:deliver_accumulated/4, but the former is still called in yaws_ls.erl. The attached patch fixes the bug. On Tue, Jun 26, 2012 at 5:18 AM, Greg Burri <gre...@gm...> wrote: > Hi, > I just upgraded to Yaws version 1.93 (from 1.92) and I found a strange > bug when I try to list a directory content with the directive > "dir_listings". > > It returns the HTTP error code 403 and the following error is printed > in the log (I removed the cookie data and replace the site name by > #####): > > =ERROR REPORT==== 26-Jun-2012::03:01:53 === > Yaws process died: {undef, > [{yaws_server,deliver_accumulated, > [{arg,#Port<0.732>, > {{85,218,99,17},52589}, > {headers,"keep-alive", > > "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", > "www.#####.net:8090",undefined,undefined,undefined, > undefined,undefined,undefined,undefined, > "Mozilla/5.0 (Windows NT 6.1; WOW64) > AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 > Safari/536.5", > undefined, > [""], > undefined,undefined,undefined,undefined,undefined, > undefined,undefined,undefined, > [{http_header,9,'Accept-Charset',undefined, > "UTF-8,*;q=0.5"}, > {http_header,11,'Accept-Language',undefined, > "en-US,en;q=0.8,fr;q=0.6,fr-CH;q=0.4"}, > {http_header,10,'Accept-Encoding',undefined, > "gzip,deflate,sdch"}]}, > {http_request,'GET',{abs_path,"/files/"},{1,1}}, > undefined,"/files/",undefined,undefined, > "/var/www/#####","/","/var/www/#####/files/", > undefined,undefined,<0.69.0>,[],undefined,"/files/", > undefined}, > #Port<0.732>,decide,undefined,final], > []}, > {yaws_ls,list_directory,6, > [{file,"yaws_ls.erl"},{line,72}]}, > {yaws_server,aloop,4, > [{file,"yaws_server.erl"},{line,1151}]}, > {yaws_server,acceptor0,2, > [{file,"yaws_server.erl"},{line,1012}]}, > {proc_lib,init_p_do_apply,3, > [{file,"proc_lib.erl"},{line,227}]}]} > > > > Here is the configuration files I used for this test. > > "yaws.conf": > trace = false > max_connections = 200 > max_num_cached_files = 1000 > max_num_cached_bytes = 40000000 > max_size_cached_file = 200000 > cache_refresh_secs = 0 > subconfig = yaws_conf/#####.conf > > "www.#####.conf" > <server www.#####.net> > port = 8090 > listen = 0.0.0.0 > allowed_scripts = yaws > deflate = true > dir_listings = true > docroot = /var/www/##### > </server> > > I'm launching Yaws as: > $>yaws -i --nodebug --id yaws_pre --sname yaws_pre --conf yaws_conf/yaws.conf > > > Thanks in advance. > > /Greg > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Erlyaws-list mailing list > Erl...@li... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list -- Sergei Golovan |
From: Claes W. <kl...@ta...> - 2012-06-26 06:01:08
|
On 6/26/12 7:24 AM, Sergei Golovan wrote: > As far as I can see, in YAWS 1.93 the function > yaws_server:deliver_accumulated/5 is gone and replaced by > yaws_server:deliver_accumulated/4, but the former is still called in > yaws_ls.erl. T Yes, this was already reported on the list, fixed in 1.94 Thanks /klacke |