GNU bug report logs - #63941
[PATCH] ; always CRLF before non-first boundary in multipart form

Previous Next

Package: emacs;

Reported by: ozzloy <ozzloy <at> gmail.com>

Date: Wed, 7 Jun 2023 06:53:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: ozzloy <ozzloy <at> gmail.com>
Cc: 63941 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#63941: [PATCH] ; always CRLF before non-first boundary in multipart form
Date: Mon, 3 Mar 2025 18:12:06 -0800
ozzloy <ozzloy <at> gmail.com> writes:

> i've modified the commit with a couple goals.
>   + make the bug fixing part of the diff as small as possible.
>   + made the new tests look more like existing ones.
>   + rebased onto the head of the emacs-29 branch pulled in
>     earlier today.

Sorry for the delayed reply here.  I see that Stefan Monnier asked some
questions as well, could you please take a look?

Stefan Monnier writes:

> There remain some questions on this patch:
>
> 1- When `filedata` is neither a number nor a string this is treated the
>    same as an empty string.  Is that right?  Or should it just never
>    happen (in which case we should probably catch this case and signal
>    an error).
> 2- Should we also remove the `(unless (bolp)` in the default case?
>    I think we do (and my reading of your tests agrees, tho I couldn't
>    run your test suite on this version of the code, among other things
>    because it contains multiple tests with the same name, so it gives
>    me things like (error "Test
>    `test-mm-url-encode-multipart-form-data-A-ab-c' redefined")).
>
> I suspect we can also simply this code by moving the first
> (insert "--" boundary "\r\n") before the loop, and the second into the
> loop so we can make it insert "\r\n--" boundary "\r\n" (and thus remove
> \r\n from the end of each of the preceding branches).




This bug report was last modified 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.