View Issue Details

IDProjectCategoryView StatusLast Update
0000467fileGeneralpublic2023-07-27 18:34
Reportergamma Assigned Tochristos  
PriorityhighSeveritymajorReproducibilityhave not tried
Status feedbackResolutionreopened 
Fixed in Version5.45 
Summary0000467: Improper MIME type for HWPX format
DescriptionThis previous patch https://bugs.astron.com/view.php?id=418 fixed the HWPX format detection,
so HWPX is now recognized as "application/hwp+zip".

But HWPX format is not registered with IANA, custom MIME type should be used with 'x-' prefix (https://en.wikipedia.org/wiki/Media_type#Unregistered_tree)
so using 'application/hwp+zip' would be inappropriate.
I'd suggest using the 'application/x-hwpx' instead.

It follows the rules and has some consistency with the HWP format ('application/x-hwp');
I have a question that is not directly related to this topic:
I found the following line in the HWP format

`#!:mime application/haansofthwp`.
Path 'file/magic/Magdir/ole2compounddocs', line 270, commit HEAD (baebbe86bc8d918103c4079839fc0b8585ef299b)

What is this? Is it just a comment for additional information? I'm asking because application/haansofthwp is also used as MIME type for HWP format. Even it doesn't follow the rules.

Thanks.
Tagshwp, hwpx, magic

Activities

gamma

2023-07-23 06:38

reporter  

HWP2016.hwpx (14,377 bytes)

gamma

2023-07-23 06:49

reporter   ~0003965

Although mimetype has 'application/hwp+zip', it does not follow the protocols.
I think the other solution might be to change to 'application/x-hwpx+zip'.

christos

2023-07-27 17:56

manager   ~0003966

added x-. The other (starts with #) is a comment.

gamma

2023-07-27 18:34

reporter   ~0003967

I think adding only the 'x-' prefix might be a problem.
Because when you use `isMimeType("application/x-hwp")' to check it, HWP5.0 formats and HWPX formats will be considered because they have the same type.

So I think 'application/x-hwpx' or the 'application/x-hwpx+zip' would be better.
I much prefer the 'application/x-hwpx' as the ODT format doesn't add the '+zip' suffix.

Issue History

Date Modified Username Field Change
2023-07-23 06:38 gamma New Issue
2023-07-23 06:38 gamma Tag Attached: hwp
2023-07-23 06:38 gamma Tag Attached: hwpx
2023-07-23 06:38 gamma Tag Attached: magic
2023-07-23 06:38 gamma File Added: HWP2016.hwpx
2023-07-23 06:49 gamma Note Added: 0003965
2023-07-27 17:56 christos Assigned To => christos
2023-07-27 17:56 christos Status new => assigned
2023-07-27 17:56 christos Status assigned => resolved
2023-07-27 17:56 christos Resolution open => fixed
2023-07-27 17:56 christos Fixed in Version => 5.45
2023-07-27 17:56 christos Note Added: 0003966
2023-07-27 18:34 gamma Status resolved => feedback
2023-07-27 18:34 gamma Resolution fixed => reopened
2023-07-27 18:34 gamma Note Added: 0003967