Re: svn commit: r14961 - branches/server-l10n/subversion/libsvn_ra_dav

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r14961 - branches/server-l10n/subversion/libsvn_ra_dav

Daniel Rall
On Fri, 2005-06-03 at 12:02 -0500, [hidden email] wrote:
...
> Log:
> * subversion/libsvn_ra_dav/util.c
>   (parsed_request): Always send the Accept-Language header as part of
>    the request to communicate our language preference to the server.
>    mod_dav_svn doesn't yet do anything with this information (though
>    is likely to eventually), but other modules may.
...
> --- branches/server-l10n/subversion/libsvn_ra_dav/util.c (original)
> +++ branches/server-l10n/subversion/libsvn_ra_dav/util.c Fri Jun  3 12:02:12 2005
...

> @@ -664,6 +666,14 @@
>          ne_add_response_body_reader(req, ne_accept_2xx,
>                                      ne_xml_parse_v, success_parser);
>      }
> +
> +  /* Add the Accept-Language header to announce our language
> +     preferences, as per section 14.4 of RFC 2616
> +     <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>. */
> +  /* ### l10n-problems says that Windows doesn't define LC_MESSAGES,
> +     ### but Visual Studio 2005 appears to:
> +     ### <http://msdn2.microsoft.com/library/x99tb11d(en-us,vs.80).aspx> */
> +  ne_add_request_header(req, "Accept-Language", setlocale(LC_MESSAGES, NULL));
>  
>    /* Register the "error" accepter and body-reader with the request --
>       the one to use when HTTP status is *not* 2XX */

A couple of questions on this one.  I'm seeing a HTTP header of:

  Accept-Language: en_US.UTF-8

The ".UTF-8" portion concerns me, as I've never seen that locale format
passed over the wire.  I assume that I should strip it?

Can I use setlocale(LC_MESSAGES, NULL) on Windows to retrieve the
current locale (as I can on POSIX)?  If not, what's the alternative?

- Dan



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r14961 - branches/server-l10n/subversion/libsvn_ra_dav

Daniel Rall
On Fri, 2005-06-03 at 10:29 -0700, Daniel L. Rall wrote:

> On Fri, 2005-06-03 at 12:02 -0500, [hidden email] wrote:
> ...
> > Log:
> > * subversion/libsvn_ra_dav/util.c
> >   (parsed_request): Always send the Accept-Language header as part of
> >    the request to communicate our language preference to the server.
> >    mod_dav_svn doesn't yet do anything with this information (though
> >    is likely to eventually), but other modules may.
> ...
> > --- branches/server-l10n/subversion/libsvn_ra_dav/util.c (original)
> > +++ branches/server-l10n/subversion/libsvn_ra_dav/util.c Fri Jun  3 12:02:12 2005
> ...
> > @@ -664,6 +666,14 @@
> >          ne_add_response_body_reader(req, ne_accept_2xx,
> >                                      ne_xml_parse_v, success_parser);
> >      }
> > +
> > +  /* Add the Accept-Language header to announce our language
> > +     preferences, as per section 14.4 of RFC 2616
> > +     <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>. */
> > +  /* ### l10n-problems says that Windows doesn't define LC_MESSAGES,
> > +     ### but Visual Studio 2005 appears to:
> > +     ### <http://msdn2.microsoft.com/library/x99tb11d(en-us,vs.80).aspx> */
> > +  ne_add_request_header(req, "Accept-Language", setlocale(LC_MESSAGES, NULL));
> >  
> >    /* Register the "error" accepter and body-reader with the request --
> >       the one to use when HTTP status is *not* 2XX */
>
> A couple of questions on this one.  I'm seeing a HTTP header of:
>
>   Accept-Language: en_US.UTF-8
>
> The ".UTF-8" portion concerns me, as I've never seen that locale format
> passed over the wire.  I assume that I should strip it?

Section 3.10 of RFC 2616 agrees, done in r14963.

> Can I use setlocale(LC_MESSAGES, NULL) on Windows to retrieve the
> current locale (as I can on POSIX)?  If not, what's the alternative?

Still unsure about this one.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r14961 - branches/server-l10n/subversion/libsvn_ra_dav

Erik Huelsmann-2
On 6/3/05, Daniel L. Rall <[hidden email]> wrote:

> On Fri, 2005-06-03 at 10:29 -0700, Daniel L. Rall wrote:
> > On Fri, 2005-06-03 at 12:02 -0500, [hidden email] wrote:
> > ...
> > > Log:
> > > * subversion/libsvn_ra_dav/util.c
> > >   (parsed_request): Always send the Accept-Language header as part of
> > >    the request to communicate our language preference to the server.
> > >    mod_dav_svn doesn't yet do anything with this information (though
> > >    is likely to eventually), but other modules may.
> > ...
> > > --- branches/server-l10n/subversion/libsvn_ra_dav/util.c    (original)
> > > +++ branches/server-l10n/subversion/libsvn_ra_dav/util.c    Fri Jun  3 12:02:12 2005
> > ...
> > > @@ -664,6 +666,14 @@
> > >          ne_add_response_body_reader(req, ne_accept_2xx,
> > >                                      ne_xml_parse_v, success_parser);
> > >      }
> > > +
> > > +  /* Add the Accept-Language header to announce our language
> > > +     preferences, as per section 14.4 of RFC 2616
> > > +     <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>. */
> > > +  /* ### l10n-problems says that Windows doesn't define LC_MESSAGES,
> > > +     ### but Visual Studio 2005 appears to:
> > > +     ### <http://msdn2.microsoft.com/library/x99tb11d(en-us,vs.80).aspx> */
> > > +  ne_add_request_header(req, "Accept-Language", setlocale(LC_MESSAGES, NULL));
> > >
> > >    /* Register the "error" accepter and body-reader with the request --
> > >       the one to use when HTTP status is *not* 2XX */
> >
> > A couple of questions on this one.  I'm seeing a HTTP header of:
> >
> >   Accept-Language: en_US.UTF-8
> >
> > The ".UTF-8" portion concerns me, as I've never seen that locale format
> > passed over the wire.  I assume that I should strip it?
>
> Section 3.10 of RFC 2616 agrees, done in r14963.
>
> > Can I use setlocale(LC_MESSAGES, NULL) on Windows to retrieve the
> > current locale (as I can on POSIX)?  If not, what's the alternative?
>
> Still unsure about this one.

In the absense of LC_MESSAGES, it would be hard.


bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]