Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

procmail modify subject, procmail alter subject, formail get body of message, www.xxxcon, www xxxcon, board.issociate.de, registrieren fehler dll server 0x8002801c, far2 vs near2 raid10, access abfragen aus linux, "Can't send mail: sendmail process failed with error code 69"

Links

XODOX
Impressum

#1: APR::Date

Posted on 2005-03-14 22:00:10 by MJH

According to the docs, APR::Date::http parses the format:
Sun, 06 Nov 1994 08:49:37 GMT
as per RFC 822.
However it does not seem to parse
Sun, 06 Nov 1994 08:49:37 EST
correctly. It assumes it's GMT regardless of the timezone specified. If I'm
reading RC822 correctly, this is an error.




--
We find comfort among those who agree with us--growth among those who don't.
- Frank A Clark

Report this message

#2: Re: APR::Date

Posted on 2005-03-15 01:02:08 by Stas Bekman

Malcolm J Harwood wrote:
> According to the docs, APR::Date::http parses the format:
> Sun, 06 Nov 1994 08:49:37 GMT
> as per RFC 822.
> However it does not seem to parse
> Sun, 06 Nov 1994 08:49:37 EST
> correctly. It assumes it's GMT regardless of the timezone specified. If I'm
> reading RC822 correctly, this is an error.

Looks like we don't test anything but GMT :(

Malcolm, mind to add the non-GMT tests to t/lib/TestAPRlib/date.pm in the
source package, and we will work on fixing those? Probably matching the
same timestamp when decoded, but encoded in EST (and may be other TZ as well)

You can run this test w/o even starting the server, via:

t/TEST -v -no t/apr-ext/date.t

Thanks.

--
____________________________________________________________ ______
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Report this message

#3: Re: APR::Date

Posted on 2005-03-15 02:26:23 by Joe Schaefer

Stas Bekman <stas@stason.org> writes:

> Malcolm J Harwood wrote:
>> According to the docs, APR::Date::http parses the format:
>> Sun, 06 Nov 1994 08:49:37 GMT
>> as per RFC 822.
>> However it does not seem to parse
>> Sun, 06 Nov 1994 08:49:37 EST
>> correctly. It assumes it's GMT regardless of the timezone
>> specified. If I'm reading RC822 correctly, this is an error.
>
> Looks like we don't test anything but GMT :(
>
> Malcolm, mind to add the non-GMT tests to t/lib/TestAPRlib/date.pm in
> the source package, and we will work on fixing those?

IMO this doesn't need fixing; if anything this is a doc bug.
The apr_date_parse_* functions assume GMT because that's the
timezone 2616 Section 3.3 requires.

--
Joe Schaefer

Report this message

#4: Re: APR::Date

Posted on 2005-03-17 03:30:47 by Stas Bekman

Joe Schaefer wrote:
> Stas Bekman <stas@stason.org> writes:
>
>
>>Malcolm J Harwood wrote:
>>
>>>According to the docs, APR::Date::http parses the format:
>>> Sun, 06 Nov 1994 08:49:37 GMT
>>>as per RFC 822.
>>>However it does not seem to parse
>>> Sun, 06 Nov 1994 08:49:37 EST
>>>correctly. It assumes it's GMT regardless of the timezone
>>>specified. If I'm reading RC822 correctly, this is an error.
>>
>>Looks like we don't test anything but GMT :(
>>
>>Malcolm, mind to add the non-GMT tests to t/lib/TestAPRlib/date.pm in
>>the source package, and we will work on fixing those?
>
>
> IMO this doesn't need fixing; if anything this is a doc bug.
> The apr_date_parse_* functions assume GMT because that's the
> timezone 2616 Section 3.3 requires.

Thanks Joe.

What should the manpage say? something like the following?

The function assumes GMT, regardless of the used timezone,
according to RFC 2616 Section 3.3 requires.



--
____________________________________________________________ ______
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Report this message

#5: Re: APR::Date

Posted on 2005-03-17 04:19:07 by Joe Schaefer

Stas Bekman <stas@stason.org> writes:


[...]

> What should the manpage say? something like the following?
>
> The function assumes GMT, regardless of the used timezone,
> according to RFC 2616 Section 3.3 requires.

No need to mention the RFC; how about this?

APR::Date::parse_http is a perl wrapper for the
apr_date_parse_http() function provided by libaprutil.
Please check your libaprutil documentation for a complete
list of supported formats and restrictions (in particular,
this function assumes GMT, regardless of the used timezone).

--
Joe Schaefer

Report this message

#6: Re: APR::Date

Posted on 2005-03-17 04:37:32 by Stas Bekman

Joe Schaefer wrote:
> Stas Bekman <stas@stason.org> writes:
>
>
> [...]
>
>
>>What should the manpage say? something like the following?
>>
>> The function assumes GMT, regardless of the used timezone,
>> according to RFC 2616 Section 3.3 requires.
>
>
> No need to mention the RFC; how about this?
>
> APR::Date::parse_http is a perl wrapper for the
> apr_date_parse_http() function provided by libaprutil.
> Please check your libaprutil documentation for a complete
> list of supported formats and restrictions (in particular,
> this function assumes GMT, regardless of the used timezone).

Grr, it's OK if you tell me about apr_date_parse_http(), it's the best to
save the perl users the trouble of learning about the existence of the
underlying C API. Especially since for the most part the C API is either
very terse or most of the time lacking completely. And they need to figure
out where to get that documentation. I'd rather document whatever is
needed to help the perl users to get most of the information in the perl
API manpages. And only in the more advanced cases point to the C API.


--
____________________________________________________________ ______
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Report this message

#7: Re: APR::Date

Posted on 2005-03-17 04:55:23 by MJH

On Wednesday 16 March 2005 10:19 pm, Joe Schaefer wrote:

> > What should the manpage say? something like the following?
> > The function assumes GMT, regardless of the used timezone,
> > according to RFC 2616 Section 3.3 requires.
> No need to mention the RFC; how about this?

The current doc says:
# parse RFC822-complient date string

Which it doesn't (as RFC822 includes multiple timezones). In fact none of the
RFCs listed are 2616. Whilst parse_http does seem like it should follow
RFC2616, is thare a reason parse_rfc should too?

> APR::Date::parse_http is a perl wrapper for the
> apr_date_parse_http() function provided by libaprutil.
> Please check your libaprutil documentation for a complete
> list of supported formats and restrictions (in particular,
> this function assumes GMT, regardless of the used timezone).

How about simply correcting the parse_http docs from:
The date string can be in one of the following formats:
to:
The date string can be in one of the following formats (as per RFC2616):

That way anyone interested can look up the correct RFC if they want the gory
details.

I'm not sure about parse_rfc as I'm not sure what it's actually supposed to be
able to parse.

Report this message

#8: Re: APR::Date

Posted on 2005-03-17 05:12:26 by Joe Schaefer

Malcolm J Harwood <mjhlist-modperl@liminalflux.net> writes:

[...]

> The current doc says:
> # parse RFC822-complient date string
>
> Which it doesn't (as RFC822 includes multiple timezones).

Which is *exactly* why I recommended the docs include a pointer to
aprutil. All modperl does it wrap the C function; it provides
no guarantees about the behavior itself (other than what's in
the test suite), so it doesn't surprise me that there's an error
in the wrapper documentation.

[...]

> How about simply correcting the parse_http docs from:
> The date string can be in one of the following formats:
> to:
> The date string can be in one of the following formats (as per RFC2616):
>
> That way anyone interested can look up the correct RFC if they want the gory
> details.

The RFC is a guideline, not the final arbiter. This link is exactly
what you are looking for:

http://apr.apache.org/docs/apr-util/group___a_p_r___util___d ate.html#ga1


--
Joe Schaefer

Report this message

#9: Re: APR::Date

Posted on 2005-03-18 02:16:49 by MJH

On Wednesday 16 March 2005 11:12 pm, Joe Schaefer wrote:

> > How about simply correcting the parse_http docs from:
> > The date string can be in one of the following formats:
> > to:
> > The date string can be in one of the following formats (as per RFC2616):
> >
> > That way anyone interested can look up the correct RFC if they want the
> > gory details.
> The RFC is a guideline, not the final arbiter. This link is exactly
> what you are looking for:

> http://apr.apache.org/docs/apr-util/group___a_p_r___util___d ate.html#ga1

Except that link mirrors the current mod_perl documentation, and doesn't
mention RFC 2616 (and the GMT-only requirement) either. So if the mod_perl
doc is incorrect (or at least incomplete) so is that.

Report this message

#10: Re: APR::Date

Posted on 2005-03-18 02:54:30 by Joe Schaefer

Malcolm J Harwood <mjhlist-modperl@liminalflux.net> writes:

> On Wednesday 16 March 2005 11:12 pm, Joe Schaefer wrote:

[...]

>> The RFC is a guideline, not the final arbiter. This link is exactly
>> what you are looking for:
>
>> http://apr.apache.org/docs/apr-util/group___a_p_r___util___d ate.html#ga1
>
> Except that link mirrors the current mod_perl documentation, and
> doesn't mention RFC 2616 (and the GMT-only requirement) either. So
> if the mod_perl doc is incorrect (or at least incomplete) so is that.

Exactly, by having a reference to libaprutil in our docs,
you now know where to send your documentation patch so
it'll be of maximum benefit.

--
Joe Schaefer

Report this message