[MERGE][bug #175886][RFC][1.0] Read superfluous bytes sent by dumb http servers by chunks.

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Dec 13 15:45:16 GMT 2007


>>>>> "bialix" == Alexander Belchenko <bialix at ukr.net> writes:

    bialix> Vincent Ladeuil пишет:
    >>>>>>> "vila" == Vincent Ladeuil <v.ladeuil+lp at free.fr> writes:
    >> 
    >> <snip/>
    >> 
    vila> Possible solutions:
    >> 
    vila> - we consider that http servers for bzr should be 1.1 and don't
    vila> try too hard for 1.0 servers (bialix said he doesn't care
    vila> because he plan to use the smart server anyway),
    >> 
    vila> - we implement a local http cache either for a single readv or
    vila> preferably for the transport life (but that may interact badly
    vila> for external libraries clients keeping transports for a long
    vila> time, single bzr commands should be ok)
    >> 
    >> - Warn user.
    >> 
    >> Implemented in the attached patch as suggested by Aaron and John,
    >> 
    >> Vincent
    >> 
    >> P.S.: Brrr, feel naked without tests, alexander can you at least
    >> try that patch ? I cheated to test the warning emission (and will
    >> add the corresponding tests in my http/1.1 branch I swear).

Now with test.

    bialix> bb:comment

    bialix> 1) for `bzr log http://` the warning was printed after first portion of
    bialix> data was emitted. It's strange. Looks like the bug for me. If my dumb
    bialix> server always sent full text why you catch this fact only on second readv?

That's the intended behavior, the problem is detected when we try
to issue the next request (the http transport is not notified
when the caller finished processing the readv results).

John's proposal would have provided the behavior you asked for,
but emitting the warning only once and only above a byte threshold
would have been more complicated.

I'd prefer to wait for a bit more feedback from real cases to
decide if this complexity is worth it

    bialix> 2) Your warning message should be marked with some
    bialix> distinct prefix, IMO.  I suggest to use something
    bialix> like: "bzr: WARNING: Got a 200 response..."

Why make a particular case ? Plus, prefixing by 'bzr:' seems a
bit strange, we *are* bzr ;)

        Vincent

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 175886.patch
Type: text/x-diff
Size: 12594 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071213/9c2b733d/attachment-0001.bin 


More information about the bazaar mailing list