It's all about the answers!

Ask a question

Why do I get a Bad Request dump "errorCode" 400, "errorTraceMarshall" when loading a HTML file using the WebUI?

Geoff Binns (30625) | asked May 06 '16, 4:39 a.m.

We get this error when trying to load an HTML file into a Component using the WebUI v5.0.2.

Its a Bad Request dump. ...Validatorservice..."errorTraceLineNumber", 37

It seems to default to binary and doesn't recognise the HTML as plain text.

Is there anyway to fix this?

Krzysztof Kaźmierczyk commented May 06 '16, 5:25 a.m.

Hi Geoff,
I was trying it on 5.0.2 and 6.0.1 but do not get any error when adding html file into compopnent. Could you provide more detailed steps/video? Please also provide the file.

Geoff Binns commented May 06 '16, 7:03 a.m.

Hi Krzysztof,

I will try and get it.

Does the Web UI automatically detect the file type, it seems to default to binary, so should we have to change to text or XML?

Is there any configuration that needs to be setup. We may have found some configuration in the Eclipse client, do these affect the Web UI?

Geoff Binns commented May 06 '16, 7:39 a.m.

Hi Krzysztof,

Further information, on a different instance of RTC I get different behaviour.

Loading an HTML file I get "File *.html must supply a character encoding since the media type is text". It seemed to be using text/html but if I use plain/text or XML it loads.

Can you explain why we get this? Is there some Java dependency difference?

Geoff Binns commented May 06 '16, 8:25 a.m. | edited May 06 '16, 8:26 a.m.

Hi Krzysztof,

How can I get the file to you or error dump? It's too big to post. It doesn't see to matter what *.html file I use.

Geoff Binns commented May 06 '16, 8:28 a.m.

Bad Request








Geoff Binns commented May 09 '16, 6:33 a.m.

Hi Krzysztof,

Further playing I find the MIME-Type is text/html but the error is produced because the encoding is not detected as UTF-8. If I set the file properties to UTF-8 it loads without error.

Any ideas why it is not automatically detected?

Donald Nong commented May 10 '16, 12:46 a.m.

My RTC 5.0.2 does not allow me to save the file if the encoding is not right. I have the iFix006 installed though.

That's what I get when trying to upload a UTF-8 encoding file. It does not matter whether BOM exists or not.

Geoff Binns commented May 10 '16, 4:40 a.m. | edited May 10 '16, 4:50 a.m.

Hi Donald,

I have also seen this behaviour in 5.0.2 without any iFixs. Does this mean it is the expected behaviour?

Shouldn't the 'Text File Encoding' as UTF-8 be automatically detected as its specified in the html file? 

What does BOM mean?

Donald Nong commented May 10 '16, 9:30 p.m.

BOM - Byte Order Mark.

It seems that you're confused about the actual file encoding and the encoding declaration in the file. You can convert the file to different encoding settings and they still "look" the same. This is quite significant when you deal with Asian languages. If you convert a double-byte encoding, say GB2312, to UTF-8 (which is multi-byte), the file size increases quite a bit, but the content still look the same - what changes is the binary code of the file.

I know that some smart text editors can determine the file encoding quite accurately (but not always). I'm not positive that RTC has implemented the same algorithm in it.

showing 5 of 9 show 4 more comments

Be the first one to answer this question!

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.