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


Message #62 received at 63941 <at> debbugs.gnu.org (full text, mbox):

From: daniel watson <ozzloy <at> each.do>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 63941 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: Fwd: bug#63941: [PATCH] ; always CRLF before non-first boundary
 in multipart form
Date: Mon, 03 Mar 2025 21:22:00 -0800
thanks so much for getting to this!


i replied to stefan monnier's 2 points earlier in this thread:

point 1:

stefan monnier
>> 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).

danny (me)
>While fixing this bug, I found a few more problems in addition to the
>two that you mention here.  I was not addressing them yet, since I
>thought I should fix one bug per patch.


at this point, it's been long enough that i will have to rediscover what
i was talking about here.  i don't remember what the other bugs were.
i'll get right on that as i have time.


point 2:

stefan monnier
>> 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).

danny (me)
>Almost, but not quite, or at least not without some awkward (to my
>eye) repositioning of inserting boundaries, "--", and "\r\n".  The
>final boundary complicates things.  It is different from all the
>others, it is "--BOUNDARY--" instead of "--BOUNDARY"
>
>Here's what I ended up with when I tried that,
>
>https://git.sr.ht/~ozzloy/emacs-bug-63941/tree/simplify-insert-boundaries-and---/item/mm-url.el#L397
>
>This passes the tests in =emacs/tests/lisp/gnus/mm-url-tests.el=.

on a direct email to him, i asked stefan monnier how he was running the
tests and running into problems.  i have not yet heard back from him.  i
did not run in to problems running the tests on my own setup.  but i'm
not super familiar with emacs testing, so i figured it was plausible i
was just doing it wrong.


thanks again and hopefully i can give you a better response in a few
days!




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.