janotav / ali-idea-plugin

HP ALI support for Intellij IDEA
Apache License 2.0
8 stars 10 forks source link

Error adding comment with username with ç #39

Closed fsudrot closed 8 years ago

fsudrot commented 8 years ago

An exception is thrown when adding a comment when username contains a ç (E7) for example.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

qccore.general-error Bad Request javax.ws.rs.WebApplicationException: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0x6f (at char #136, byte #-1) .............

The entity posted : 0000 3c 45 6e 74 69 74 79 20 54 79 70 65 3d 22 64 65 <F 0020 69 65 6c 64 20 4e 61 6d 65 3d 22 64 65 76 2d 63 ield Name="dev-c 0030 6f 6d 6d 65 6e 74 73 22 3e 3c 56 61 6c 75 65 3e omments"> 0040 26 6c 74 3b 68 74 6d 6c 26 67 74 3b 26 6c 74 3b <html>< 0050 62 6f 64 79 26 67 74 3b 26 6c 74 3b 66 6f 6e 74 body><font 0060 20 63 6f 6c 6f 72 3d 22 23 30 30 30 30 38 30 22 color="#000080" 0070 26 67 74 3b 26 6c 74 3b 62 26 67 74 3b 53 55 44 ><b>SUD 0080 52 4f 54 20 46 72 61 6e e7 6f 69 73 20 49 4d 54 ROT Fran.ois IMT 0090 2f 4f 4c 50 53 20 26 61 6d 70 3b 6c 74 3b 61 66 /OLPS &lt;af 00a0 73 79 37 32 34 36 26 61 6d 70 3b 67 74 3b 2c 20 sy7246&gt;, 00b0 32 30 31 35 2d 30 39 2d 31 30 20 31 33 3a 33 37 2015-09-10 13:37 00c0 3a 32 37 20 2b 30 32 30 30 26 6c 74 3b 2f 62 26 :27 +0200</b& 00d0 67 74 3b 26 6c 74 3b 2f 66 6f 6e 74 26 67 74 3b gt;</font> 00e0 26 6c 74 3b 62 72 26 67 74 3b 61 20 73 65 63 74 <br>a sect 00f0 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 61 64 64 ion has been add 0100 65 64 20 69 6e 20 49 4e 53 54 41 4c 4c 2e 6d 64 ed in INSTALL.md 0110 20 6c 69 6b 65 20 69 6e 20 61 64 6d 69 6e 20 63 like in admin c 0120 6f 6d 70 6f 6e 65 6e 74 26 6c 74 3b 2f 62 6f 64 omponent</bod 0130 79 26 67 74 3b 26 6c 74 3b 2f 68 74 6d 6c 26 67 y></html&g 0140 74 3b 3c 2f 56 61 6c 75 65 3e 3c 2f 46 69 65 6c t;</Fiel 0150 64 3e 3c 46 69 65 6c 64 20 4e 61 6d 65 3d 22 69 d>16</Va 0170 6c 75 65 3e 3c 2f 46 69 65 6c 64 3e 3c 2f 46 69 lue></Fi 0180 65 6c 64 73 3e 3c 2f 45 6e 74 69 74 79 3e elds>

janotav commented 8 years ago

What is the ALM server version please?

fsudrot commented 8 years ago

Here are the detailed versions of our ALM

HP Application Lifecycle Management Application Lifecycle Management 11.00

Component Build OTA Client 11.0.0.8357
User Interface 11.0.0.8357
WebGate Client 11.00.0.8357
Test Run Scheduler 11.00.0.8357

janotav commented 8 years ago

I think I understand the issue, although I'm not able to reproduce it locally as it depends both on client and server environment settings. Can you please test the following patched plugin?

https://github.com/janotav/ali-idea-plugin/releases/download/v3.15-RC1-enc/ali-idea-plugin.zip

If you prefer you can build the plugin from the "encodingIssue" branch yourself.

If it works for you I'll include this patch it in the next official release.

Thanks.

fsudrot commented 8 years ago

Same result, the ç doesn't seem to be xml encoded. So the ALM server crashes. I'm going to clone your fixing branch to see if I can help.

janotav commented 8 years ago

I guess that's why they say that blind fixes usually don't work...

The XML declaration should now be present. Can you please check again?

https://github.com/janotav/ali-idea-plugin/releases/download/v3.15-RC2-enc/ali-idea-plugin.zip

janotav commented 8 years ago

Fixed