[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 18:35:47 +0400

On Fri, Jun 21, 2013 at 5:51 PM, Greg Stein <gstein_at_gmail.com> wrote:
> On Fri, Jun 21, 2013 at 9:45 AM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
>>> On Fri, Jun 21, 2013 at 9:19 AM, Greg Stein <gstein_at_gmail.com> wrote:
>>>> Please revert this. You *cannot* rely on a 411 response.
>>>>
>>>> You are also not allowed to send a 1.1 request to a server for which
>>>> you don't know if they support 1.0 vs 1.1.
>>
>> On Fri, Jun 21, 2013 at 5:28 PM, Greg Stein <gstein_at_gmail.com> wrote:
>>> This has been quoted before, but I'll repeat it again. RFC 2145, Section 2:
>>>
>>> "One consequence of these rules is that an HTTP/1.1 message sent to an
>>> HTTP/1.0 recipient (or a recipient whose version is unknown) MUST be
>>> constructed so that it remains a valid HTTP/1.0 message when all
>>> headers not defined in the HTTP/1.0 specification [1] are removed."
>>>
>>> Removing the Transfer-Coding: chunked header completely alters the
>>> message. Thus, it cannot be sent to a 1.0 server. This is why you
>>> cannot rely on any particular behavior or response status.
>>
>> Hi Greg! Thanks for review.
>>
>> My patch doesn't rely on 411 response only: ra_serf will downgrade to
>> HTTP/1.0 if *any* HTTP/1.0 response received *or* HTTP/1.1 411 status
>> code.
>
> We've seen 501 responses. We've seen other weird responses in the
> past. I think we even crashed some servers, iirc.
>
> But it just doesn't matter. You're not allowed to send a request like
> that. Period.
>
>> I've tested several browsers and they use HTTP/1.1 as first request.
>
> Doesn't matter what they do. Maybe they already know the target
> supports HTTP/1.1. Who knows? Who cares?
>
> RFC 2145 is very clear here. We've seen problems when we did not obey
> the rules. I spent a good bit of time fixing our code to obey them, in
> order to get this stuff working.
>
Reverted in r1495455.

>>...
>> 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"?

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com
Received on 2013-06-21 16:36:41 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.