Sergey Proskurnya <>

r857623, r852994

r852994 | lundblad | 2005-02-04 22:26:03 +0000 (Fri, 04 Feb 2005)

Produce better error messages for character encoding errors.

The famous "Can't recode string" is hopefully killed and burried
forever and replaced with an error including source and destination
encoding as well as the failing string, fuzzily escaped in the same
way as we do in the cmdline client.

Suggested by: Sergey Proskurnya <>

* subversion/libsvn_subr/utf.c (xlate_handle_node_t): Add frompage and
  topage fields.
  (get_xlate_handle_node): Set the new fields.  Don't use message
  fragments in error message (for l10n).  Assert for unsupported
  combination of magic encoding names.
  (fuzzy_escape): New function, factored out from
  svn_utf__cstring_from_utf8_fuzzy.  Allow null bytes in the string.
  (svn_utf__cstring_from_utf8_fuzzy): Use factored out fuzzy_escape.
  (convert_to_stringbuf): Take xlate_handle_node_t instead of
  Call sites updated.  Improve error message to include more
  (convert_cstring): Take xlate_handle_node_t instead of apr_xlate_t.
  Call sites updated.

r857623 | dlr | 2005-11-29 06:08:02 +0000 (Tue, 29 Nov 2005)

Add the Last-Modified HTTP header to the response as encouraged by
section 13.3.4 of RFC 2616.

* subversion/mod_dav_svn/repos.c
  (RESOURCE_LACKS_ETAG_POTENTIAL): A new macro which returns whether
   the DAV resource lacks potential for generation of an ETag.

  (get_last_modified): A new function used when setting HTTP headers
   in preparation for generating the response which includes the last
   modification time of the requested resource.

  (dav_svn_getetag): Factored complex conditional out into the
   RESOURCE_LACKS_ETAG_POTENTIAL() macro, which is also used by the
   new get_last_modified() function as the heuristic in determining
   whether the Last-Modified header is generated.

  (dav_svn_set_headers): Use httpd's API for setting the modification
   time for request_rec, and its corresponding Last-Modified header.

Suggested by: Sergey Proskurnya <>
              Michael Sinz <>