Skip to content

Conversation

@Dr4K4n
Copy link

@Dr4K4n Dr4K4n commented May 10, 2023

Tests for the issue #687

@Test
public void testQEncoding() throws Exception {
String disposition = ";\n" +
" filename==?utf-8?Q?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX--111111111-XXXXXXXXXXXXXXXXXXX?=\n" +
Copy link
Contributor

@lukasj lukasj Jan 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filename==?utf-8?Q?X... is invalid - it is missing *, it should be filename*==?utf-8?Q?X..., so the failure here is actually correct behaviour

" filename==?utf-8?Q?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX--111111111-XXXXXXXXXXXXXXXXXXX?=\n" +
" =?utf-8?Q?XXXXXXXXXXXXXXXXXXX=2Epdf?=;\n" +
" filename*0*=utf-8''XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX--111111111-XXXXXXXXXXX;\n" +
" filename*1*=XXXXXXXXXXXXXXXXXXXXXXXXXXX.pdf";
Copy link
Contributor

@lukasj lukasj Jan 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could probably be handled in a way that if there is a valid variant of the parameter then ignore (and just log) the invalid one in non-string operation mode or through some new, different property.

An implementation of this would probably need adding a property to ParameterList to keep track of decoded parameters and tweak the behaviour of combineMultisegmentNames method

@jmehrens jmehrens added the invalid This doesn't seem right label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants