You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Alexander Shorin <kx...@gmail.com> on 2016/03/01 06:52:13 UTC

Re: Leap year bug?

Nice bug found! (:
--
,,,^..^,,,


On Tue, Mar 1, 2016 at 12:23 AM, Adam Kocoloski
<ad...@gmail.com> wrote:
> Definitely a bug. We set the favicon.ico to expire “one year from now”, and we do that by incrementing the year by one and keeping all other elements of the date the same :)
>
> https://github.com/apache/couchdb/blob/1.6.1/src/couchdb/couch_httpd_misc_handlers.erl#L49 <https://github.com/apache/couchdb/blob/1.6.1/src/couchdb/couch_httpd_misc_handlers.erl#L49>
>
> I suspect it’s still a bug in master as well. Do you mind filing a JIRA?
>
> https://issues.apache.org/jira/browse/COUCHDB <https://issues.apache.org/jira/browse/COUCHDB>
>
> Thanks, Adam
>
>> On Feb 29, 2016, at 11:47 AM, Matthew Buckett <ma...@it.ox.ac.uk> wrote:
>>
>> I was just running my couch instance today and whenever I request the
>> favicon (/favicon.ico) I get this in my logs:
>>
>> couchdb_1 | [error] [<0.20390.0>] Uncaught error in HTTP request:
>> {error,if_clause}
>> couchdb_1 | [info] [<0.20390.0>] Stacktrace:
>> [{calendar,date_to_gregorian_days,3,
>> couchdb_1 |
>> [{file,"calendar.erl"},{line,116}]},
>> couchdb_1 |                                   {calendar,day_of_the_week,3,
>> couchdb_1 |
>> [{file,"calendar.erl"},{line,151}]},
>> couchdb_1 |                                   {couch_util,rfc1123_date,1,
>> couchdb_1 |
>> [{file,"couch_util.erl"},{line,462}]},
>> couchdb_1 |                                   {couch_httpd_misc_handlers,
>> couchdb_1 |                                       handle_favicon_req,2,
>> couchdb_1 |
>> [{file,"couch_httpd_misc_handlers.erl"},
>> couchdb_1 |                                        {line,53}]},
>> couchdb_1 |                                   {couch_httpd,handle_request_int,5,
>> couchdb_1 |
>> [{file,"couch_httpd.erl"},{line,318}]},
>> couchdb_1 |                                   {mochiweb_http,headers,5,
>> couchdb_1 |
>> [{file,"mochiweb_http.erl"},{line,94}]},
>> couchdb_1 |                                   {proc_lib,init_p_do_apply,3,
>> couchdb_1 |
>> [{file,"proc_lib.erl"},{line,239}]}]
>> couchdb_1 | [info] [<0.20390.0>] 192.168.99.1 - - GET /favicon.ico 500
>> couchdb_1 | [error] [<0.20390.0>] httpd 500 error response:
>> couchdb_1 |  {"error":"unknown_error","reason":"if_clause"}
>>
>> The last part of the couch code is:
>>
>> rfc1123_date(UniversalTime) ->
>>    {{YYYY,MM,DD},{Hour,Min,Sec}} = UniversalTime,
>>    DayNumber = calendar:day_of_the_week({YYYY,MM,DD}),
>>
>> Anyone else seeing this today, this is with Erlang R16B03
>> (erts-5.10.4) and CouchDB 1.6.1?
>>
>> --
>>  Matthew Buckett, VLE Developer, IT Services, University of Oxford
>