[MERGE] squid proxies use boundary="foo"

Martin Pool mbp at canonical.com
Fri Sep 1 01:48:56 BST 2006


On  1 Sep 2006, Michael Ellerman <michael at ellerman.id.au> wrote:
> > This adds another explicit response text to the test suite, and makes
> > sure that we handle the "" properly.
> 
> Nice catch.

mpe, feel free to vote +1 if you've read the patch.  +1 from me anyhow.

> Any reason why you did it this way rather than modifying
> CONTENT_TYPE_RE ?
> 
> eg.
> 
> -        '^\s*multipart/byteranges\s*;\s*boundary\s*=\s*(.*?)\s*$')
> +        '^\s*multipart/byteranges\s*;\s*boundary\s*=\s*"?(.*?)"?\s*$')

That doesn't insist that the quotes be matched, but otherwise it seems
cleaner.  You could do that with something like

  ("?)(.*[^"])\1

(Not tested.)  This says if there's an initial quote, there must be a
trailing quote.

Why do we have the odd construction (.*?) ?  Surely the '?' is
redundant?

-- 
Martin




More information about the bazaar mailing list