[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1495419 - in /subversion/trunk/subversion/libsvn_ra_serf: options.c ra_serf.h serf.c util.c

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Fri, 21 Jun 2013 19:36:47 +0400

On Fri, Jun 21, 2013 at 7:14 PM, Greg Stein <gstein_at_gmail.com> wrote:
>
> On Jun 21, 2013 10:36 AM, "Ivan Zhakov" <ivan_at_visualsvn.com> wrote:
>>....
>> >> Problem with this approach that some servers may support HTTP/1.1
>> >> partially. I.e. declare them as HTTP/1.1 but do not support chunked
>> >> Transfer-Encoding.
>> >
>> > Then fix that problem. Add a flag saying "busted_http11" and make it
>> > send requests with Content-Length after that.
>> >
>> Do you mean run-time configuration option like "http-force-http10 = yes"?
>
> Oh. Hadn't thought about that. I was thinking dynamic detection.
>
> I would favor dynamic over Yet Another Config Option, but you're the one
> writing this code right now :-)
>
I'm also favor dynamic detection over config option. But I don't see
good way to detect such busted proxies without introducing another
request or risk breaking something when request completed in different
order.

I suggest add config option as immediate fix, because problem reported
at least five times.

The fix seems to be pretty simple and could be safely backported (see
patch). The only problem that probably we cannot backport addition of
new configuration option due our backward compatibility policy. But
may be I'm wrong.

[[[[
Add new 'http-force-http10' configuration option to force using HTTP/1.0
even server declares HTTP/1.1 support.

* subversion/include/svn_config.h
  (SVN_CONFIG_OPTION_HTTP_FORCE_HTTP10): New.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__session_t): Add FORCE_HTTP10 flag.

* subversion/libsvn_ra_serf/serf.c
  (load_config): Parse 'http-force-http10' configuration option.

* subversion/libsvn_ra_serf/util.c
  (handle_response): Do not upgrade to HTTP/1.1 if force_http10 is true.

* subversion/libsvn_subr/config_file.c
  (svn_config_ensure): Mention http-force-http10 in 'servers' file template.
]]]]

(I'm not sure about option name)

PS: I'm going to country until Tuesday, so feel free to commit and
backport this patch.

-- 
Ivan Zhakov

Received on 2013-06-21 17:37:46 CEST

This is an archived mail posted to the Subversion Dev mailing list.