On 18 March 2013 09:45, Jocelyn Fiat <notifications@github.com> wrote:

> In library/server/wsf/router/wsf_routed_service.e:
>
> > +		require
> > +			unavailable: unavailable = True
> > +			res_attached: res /= Void
> > +		local
> > +			h: HTTP_HEADER
> > +		do
> > +			create h.make
> > +			h.put_content_type_text_plain
> > +			check attached {READABLE_STRING_8} unavailablity_message as m then
> > +					-- invariant
> > +				h.put_content_length (m.count)
> > +				h.put_current_date
> > +				res.set_status_code ({HTTP_STATUS_CODE}.service_unavailable)
> > +				if unavailability_duration > 0 then
> > +					h.put_header_key_value ({HTTP_HEADER_NAMES}.header_retry_after, unavailability_duration.out)
> > +				elseif unavailable_until /= Void then
>
> why not having
> elseif attached unavailable_until as u then
> h.put_header_key_value ({HTTP_HEADER_NAMES}.header_retry_after,
> h.date_to_rfc1123_http_date_format (u))
>
> this way ... no need to insult the compiler ;)
>

OK. But I shouldn't need to. if x /= Void is supposed to be a CAP.

> Note that we can add a
> HTTP_HEADER.put_retry_after (a_date: DATE_TIME)
>
> this would look nicer.
>

Sounds good.