mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Weekdays are binaries and not lists
Spotted by devinus on IRC.
This commit is contained in:
parent
ad87fee0af
commit
2ae5e804fb
1 changed files with 2 additions and 2 deletions
|
@ -403,8 +403,8 @@ http_date_ret(Data, DateTime = {Date, _Time}) ->
|
||||||
%% We never use it, pretty much just checks the wkday is right.
|
%% We never use it, pretty much just checks the wkday is right.
|
||||||
-spec wkday(binary(), fun()) -> any().
|
-spec wkday(binary(), fun()) -> any().
|
||||||
wkday(<< WkDay:3/binary, Rest/bits >>, Fun)
|
wkday(<< WkDay:3/binary, Rest/bits >>, Fun)
|
||||||
when WkDay =:= <<"Mon">>; WkDay =:= "Tue"; WkDay =:= "Wed";
|
when WkDay =:= <<"Mon">>; WkDay =:= <<"Tue">>; WkDay =:= <<"Wed">>;
|
||||||
WkDay =:= <<"Thu">>; WkDay =:= "Fri"; WkDay =:= "Sat";
|
WkDay =:= <<"Thu">>; WkDay =:= <<"Fri">>; WkDay =:= <<"Sat">>;
|
||||||
WkDay =:= <<"Sun">> ->
|
WkDay =:= <<"Sun">> ->
|
||||||
Fun(Rest, WkDay);
|
Fun(Rest, WkDay);
|
||||||
wkday(_Any, _Fun) ->
|
wkday(_Any, _Fun) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue