These are chat archives for synrc/n2o

3rd
Jul 2015
asakura-kazumi
@asakura-kazumi
Jul 03 2015 08:10
Ребят, такой вот бэдарг: {[{reason,badarg},{mfa,{n2o_cowboy,handle,2}},{stacktrace,[{erlang,localtime_to_universaltime,[{{2083,7,21},{15,48,34}},true],[]}, ... . Функция падает, если указать год больше 2037. Кто-то не уследил за ограничениями функции или эрланговцы у себя ошиблись? На всякий случай скажу, что у меня Mint 17
Erlang/OTP 17 [erts-6.4.1]
asakura-kazumi
@asakura-kazumi
Jul 03 2015 08:18

Весь стек: =ERROR REPORT==== 3-Jul-2015::12:34:27 ===
Error in process <0.2589.0> with exit value: {[{reason,badarg},{mfa,{n2o_cowboy,handle,2}},{stacktrace,[{erlang,localtime_to_universaltime,[{{2083,7,21},{15,48,34}},true],[]},{calendar,local_time_to_universal_time_dst,1,[{file,"calendar.erl"},{line,282}]},{httpd_util,rfc1123_date...

=ERROR REPORT==== 3-Jul-2015::12:34:27 ===
Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.2589.0> exit with reason: {[{reason,badarg},{mfa,{n2o_cowboy,handle,2}},{stacktrace,[{erlang,localtime_to_universaltime,[{{2083,7,21},{15,48,34}},true],[]},{calendar,local_time_to_universal_time_dst,1,[{file,"calendar.erl"},{line,282}]},{httpd_util,rfc1123_date,1,[{file,"httpd_util.erl"},{line,343}]},{n2o_session,new_cookie_value,2,[{file,"/var/www/n2o/samples/deps/n2o/src/handlers/n2o_session.erl"},{line,92}]},{n2o_session,session_sid,4,[{file,"/var/www/n2o/samples/deps/n2o/src/handlers/n2o_session.erl"},{line,28}]},{wf_context,'-fold/3-fun-0-',3,[{file,"/var/www/n2o/samples/deps/n2o/src/wf_context.erl"},{line,31}]},{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},{n2o_document,run,1,[{file,"/var/www/n2o/samples/deps/n2o/src/endpoints/n2o_document.erl"},{line,14}]}]},{req,[{socket,#Port<0.54542>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.2589.0>},{method,<<"GET">>},{version,'HTTP/1.1'},{peer,{{127,0,0,1},42903}},{host,<<"localhost">>},{host_info,undefined},{port,8000},{path,<<"/favicon.ico">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[]},{headers,[{<<"host">>,<<"localhost:8000">>},{<<"user-agent">>,<<"Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:33.0) Gecko/20100101 Firefox/33.0">>},{<<"accept">>,<<"image/png,image/;q=0.8,/*;q=0.5">>},{<<"accept-language">>,<<"ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3">>},{<<"accept-encoding">>,<<"gzip, deflate">>},{<<"connection">>,<<"keep-alive">>}]},{p_headers,[{<<"connection">>,[<<"keep-alive">>]}]},{cookies,undefined},{meta,[]},{body_state,waiting},{buffer,<<>>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[]},{resp_body,<<>>},{onresponse,undefined}]},{state,{state,undefined,undefined}}],[{cowboy_protocol,execute,4,[{file,"/var/www/n2o/samples/deps/cowboy/src/cowboy_protocol.erl"},{line,442}]}]}

Oleg Zinchenko
@cystbear
Jul 03 2015 09:52
мда
на такое есть gist
5> erlang:localtime_to_universaltime({{2996,11,6},{14,45,17}},true).
{{2996,11,6},{11,45,17}}
Oleg Zinchenko
@cystbear
Jul 03 2015 09:58
где-то в твоем коде проъеб
Andy
@m-2k
Jul 03 2015 12:06
Надо глянуть n2o_cowboy:handle/2
Oleg Zinchenko
@cystbear
Jul 03 2015 13:59
там все ровно
Andy
@m-2k
Jul 03 2015 14:05
:(
Oleg Zinchenko
@cystbear
Jul 03 2015 14:10
@asakura-kazumi скинь свой код в гисте
или ссылку на репо на GH