Re: MailBox Bug: space after "boundary" element causes proc to wedge
Mark Overmeer <[email protected]> Mon, 18 Oct 2004 09:16:02 +0200
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Anthony D. Urso ([email protected]) [041018 01:13]: > Line 84 of Mail/Message/Field/Structured.pm only nukes whitespace if it > comes after a semicolon; thus, the until($string eq '') is never satisfied > and the parse() method loops infinitely. Good catch. Probably you had some blanks at the end of your line. By cut-n-pasting you example message, I was not able to reproduce your problem, because those blanks had disappeared. > I've fixed it locally by changing line 83 to: > until($string =~ /^\s*$/) Changed that into while($string =~ /\S/) which is faster, I presume... > This solves the symptom, but maybe you would be better off with a > consumeWhitespace() method for completeness. I think that is too expensive. Thanks for the patch. -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net